diff --git a/exercises/practice/protein-translation/test/Tests.hs b/exercises/practice/protein-translation/test/Tests.hs index b2ff2da7e..9cd2e28a1 100644 --- a/exercises/practice/protein-translation/test/Tests.hs +++ b/exercises/practice/protein-translation/test/Tests.hs @@ -116,6 +116,22 @@ cases = [ Case { description = "Methionine RNA sequence" , input = "UGGUGUUAUUAAUGGUUU" , expected = Just ["Tryptophan","Cysteine","Tyrosine"] } + , Case { description = "Translation fails on unknown codon" + , input = "ABC" + , expected = Nothing + } + , Case { description = "Translation stops if STOP codon before invalid codon" + , input = "UAGABC" + , expected = Just [] + } + , Case { description = "Translation fails if codon is too short" + , input = "AUGA" + , expected = Nothing + } + , Case { description = "Translation stops if STOP codon before too short codon" + , input = "UAGA" + , expected = Just [] + } ] -- baf663fecc756872af85e8ae6ed24f3f7cbb9388