[Edit: first time bringing a PR to exercism! Sorry if this is lacking context - I’m just figuring things out]
For context, this is for the protein-translation
practice exercise. I caught this as I was implementing and realized that some of the community solutions have made the same error. This will likely break existing solutions.
When AUG
and AUG
(also UUA
and AUG
) are combined, they contain a substring that potentially matches a STOP codon. A naive implementation may falsely match the non-STOP sequence as a STOP codon.
This simple test covers a gap in the current suite.
AUGAUG
^^^ - not a STOP codon
UUAAUG
^^^ - not a STOP codon