File tree 3 files changed +21
-0
lines changed
exercises/practice/protein-translation
3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 2
2
"authors" : [
3
3
" ryanplusplus"
4
4
],
5
+ "contributors" : [
6
+ " jagdish-15"
7
+ ],
5
8
"files" : {
6
9
"solution" : [
7
10
" protein_translation.c" ,
Original file line number Diff line number Diff line change @@ -87,11 +87,15 @@ description = "Translation stops if STOP codon in middle of three-codon sequence
87
87
[2c2a2a60-401f-4a80-b977-e0715b23b93d ]
88
88
description = " Translation stops if STOP codon in middle of six-codon sequence"
89
89
90
+ [f6f92714-769f-4187-9524-e353e8a41a80 ]
91
+ description = " Sequence of two non-STOP codons does not translate to a STOP codon"
92
+
90
93
[1e75ea2a-f907-4994-ae5c-118632a1cb0f ]
91
94
description = " Non-existing codon can't translate"
92
95
93
96
[9eac93f3-627a-4c90-8653-6d0a0595bc6f ]
94
97
description = " Unknown amino acids, not part of a codon, can't translate"
98
+ reimplements = " 1e75ea2a-f907-4994-ae5c-118632a1cb0f"
95
99
96
100
[9d73899f-e68e-4291-b1e2-7bf87c00f024 ]
97
101
description = " Incomplete RNA sequence can't translate"
Original file line number Diff line number Diff line change @@ -333,6 +333,19 @@ test_translation_stops_if_stop_codon_in_middle_of_six_codon_sequence(void)
333
333
assert_proteins_match (expected , actual );
334
334
}
335
335
336
+ static void
337
+ test_seuence_of_two_non_stop_codons_does_not_translate_to_a_stop_codon (void )
338
+ {
339
+ TEST_IGNORE ();
340
+ proteins_t expected = {
341
+ .valid = true,
342
+ .count = 2 ,
343
+ .proteins = { Methionine , Methionine },
344
+ };
345
+ proteins_t actual = proteins ("AUGAUG" );
346
+ assert_proteins_match (expected , actual );
347
+ }
348
+
336
349
static void test_non_existing_codon_cant_translate (void )
337
350
{
338
351
TEST_IGNORE ();
@@ -407,6 +420,7 @@ int main(void)
407
420
RUN_TEST (test_translation_stops_if_stop_codon_at_end_of_three_codon_sequence );
408
421
RUN_TEST (test_translation_stops_if_stop_codon_in_middle_of_three_codon_sequence );
409
422
RUN_TEST (test_translation_stops_if_stop_codon_in_middle_of_six_codon_sequence );
423
+ RUN_TEST (test_seuence_of_two_non_stop_codons_does_not_translate_to_a_stop_codon );
410
424
RUN_TEST (test_non_existing_codon_cant_translate );
411
425
RUN_TEST (test_unknown_amino_acids_not_part_of_a_codon_cant_translate );
412
426
RUN_TEST (test_invalid_codon_cant_translate );
You can’t perform that action at this time.
0 commit comments