Skip to content

Commit a6e636e

Browse files
authored
Sync protein-translation tests (#421)
1 parent 4fdb9f4 commit a6e636e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

exercises/practice/protein-translation/.meta/tests.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,16 @@ description = "Translation stops if STOP codon in middle of three-codon sequence
8787
[2c2a2a60-401f-4a80-b977-e0715b23b93d]
8888
description = "Translation stops if STOP codon in middle of six-codon sequence"
8989

90+
[f6f92714-769f-4187-9524-e353e8a41a80]
91+
description = "Sequence of two non-STOP codons does not translate to a STOP codon"
92+
9093
[1e75ea2a-f907-4994-ae5c-118632a1cb0f]
9194
description = "Non-existing codon can't translate"
95+
include = false
9296

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

96101
[9d73899f-e68e-4291-b1e2-7bf87c00f024]
97102
description = "Incomplete RNA sequence can't translate"

exercises/practice/protein-translation/protein-translation-test.rkt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@
113113
(proteins "UGGUGUUAUUAAUGGUUU")
114114
'("Tryptophan" "Cysteine" "Tyrosine"))
115115

116-
(test-exn "Non-existing codon can't translate"
117-
exn:fail?
118-
(lambda () (proteins "AAA")))
116+
(test-equal? "Sequence of two non-STOP codons does not translate to a STOP codon"
117+
(proteins "AUGAUG")
118+
'("Methionine" "Methionine"))
119119

120120
(test-exn "Unknown amino acids, not part of a codon, can't translate"
121121
exn:fail?

0 commit comments

Comments
 (0)