Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync protein-translation #1515

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions exercises/practice/protein-translation/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,15 @@ description = "Translation stops if STOP codon in middle of three-codon sequence
[2c2a2a60-401f-4a80-b977-e0715b23b93d]
description = "Translation stops if STOP codon in middle of six-codon sequence"

[f6f92714-769f-4187-9524-e353e8a41a80]
description = "Sequence of two non-STOP codons does not translate to a STOP codon"

[1e75ea2a-f907-4994-ae5c-118632a1cb0f]
description = "Non-existing codon can't translate"

[9eac93f3-627a-4c90-8653-6d0a0595bc6f]
description = "Unknown amino acids, not part of a codon, can't translate"
reimplements = "1e75ea2a-f907-4994-ae5c-118632a1cb0f"

[9d73899f-e68e-4291-b1e2-7bf87c00f024]
description = "Incomplete RNA sequence can't translate"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ defmodule ProteinTranslationTest do
end

@tag :pending
test "incomplete codon, invalid RNA" do
strand = "UG"
assert ProteinTranslation.of_rna(strand) == {:error, "invalid RNA"}
test "sequence of two non-STOP codons does not translate to a STOP codon" do
strand = "AUGAUG"
assert ProteinTranslation.of_rna(strand) == {:ok, ~w(Methionine Methionine)}
end

@tag :pending
test "known amino acids, but invalid codon, invalid RNA" do
strand = "AAA"
test "incomplete codon, invalid RNA" do
strand = "UG"
assert ProteinTranslation.of_rna(strand) == {:error, "invalid RNA"}
end

Expand Down
Loading