Skip to content

Commit b8607c4

Browse files
authored
Nucleotide Count: Fix syntax error (#368)
* Nucleotide Count: Fix syntax error * Update expected value type in nucleotide count tests
1 parent 435286d commit b8607c4

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

exercises/practice/nucleotide-count/.meta/zcl_nucleotide_count.clas.abap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ CLASS zcl_nucleotide_count DEFINITION
99
nucleotide TYPE c LENGTH 1,
1010
count TYPE i,
1111
END OF count_by_nucleotide,
12-
nucleotide_counts TYPE STANDARD TABLE OF count_by_nucleotide WITH KEY nucleotide.
12+
ty_nucleotide_counts TYPE STANDARD TABLE OF count_by_nucleotide WITH KEY nucleotide.
1313
METHODS nucleotide_counts
1414
IMPORTING
1515
strand TYPE string
1616
RETURNING
17-
VALUE(result) TYPE nucleotide_counts
17+
VALUE(result) TYPE ty_nucleotide_counts
1818
RAISING
1919
cx_parameter_invalid.
2020
PROTECTED SECTION.

exercises/practice/nucleotide-count/zcl_nucleotide_count.clas.abap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ CLASS zcl_nucleotide_count DEFINITION
99
nucleotide TYPE c LENGTH 1,
1010
count TYPE i,
1111
END OF count_by_nucleotide,
12-
nucleotide_counts TYPE STANDARD TABLE OF count_by_nucleotide WITH KEY nucleotide.
12+
ty_nucleotide_counts TYPE STANDARD TABLE OF count_by_nucleotide WITH KEY nucleotide.
1313
METHODS nucleotide_counts
1414
IMPORTING
1515
strand TYPE string
1616
RETURNING
17-
VALUE(result) TYPE nucleotide_counts
17+
VALUE(result) TYPE ty_nucleotide_counts
1818
RAISING
1919
cx_parameter_invalid.
2020
PROTECTED SECTION.

exercises/practice/nucleotide-count/zcl_nucleotide_count.clas.testclasses.abap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ CLASS ltcl_nucleotide_count IMPLEMENTATION.
2323
METHOD test_empty_strand.
2424
cl_abap_unit_assert=>assert_equals(
2525
act = cut->nucleotide_counts( '' )
26-
exp = VALUE zcl_nucleotide_count=>nucleotide_counts(
26+
exp = VALUE zcl_nucleotide_count=>ty_nucleotide_counts(
2727
( nucleotide = 'A' count = 0 )
2828
( nucleotide = 'C' count = 0 )
2929
( nucleotide = 'G' count = 0 )
@@ -33,7 +33,7 @@ CLASS ltcl_nucleotide_count IMPLEMENTATION.
3333
METHOD test_single_character.
3434
cl_abap_unit_assert=>assert_equals(
3535
act = cut->nucleotide_counts( 'G' )
36-
exp = VALUE zcl_nucleotide_count=>nucleotide_counts(
36+
exp = VALUE zcl_nucleotide_count=>ty_nucleotide_counts(
3737
( nucleotide = 'A' count = 0 )
3838
( nucleotide = 'C' count = 0 )
3939
( nucleotide = 'G' count = 1 )
@@ -43,7 +43,7 @@ CLASS ltcl_nucleotide_count IMPLEMENTATION.
4343
METHOD test_repeated_nucleotide.
4444
cl_abap_unit_assert=>assert_equals(
4545
act = cut->nucleotide_counts( 'GGGGGGG' )
46-
exp = VALUE zcl_nucleotide_count=>nucleotide_counts(
46+
exp = VALUE zcl_nucleotide_count=>ty_nucleotide_counts(
4747
( nucleotide = 'A' count = 0 )
4848
( nucleotide = 'C' count = 0 )
4949
( nucleotide = 'G' count = 7 )
@@ -53,7 +53,7 @@ CLASS ltcl_nucleotide_count IMPLEMENTATION.
5353
METHOD test_multiple_nucleotides.
5454
cl_abap_unit_assert=>assert_equals(
5555
act = cut->nucleotide_counts( 'AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC' )
56-
exp = VALUE zcl_nucleotide_count=>nucleotide_counts(
56+
exp = VALUE zcl_nucleotide_count=>ty_nucleotide_counts(
5757
( nucleotide = 'A' count = 20 )
5858
( nucleotide = 'C' count = 12 )
5959
( nucleotide = 'G' count = 17 )

0 commit comments

Comments
 (0)