trackler 2.0.8.12 → 2.0.8.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/hamming/canonical-data.json +121 -104
  3. data/lib/trackler/version.rb +1 -1
  4. data/tracks/delphi/.gitignore +40 -2
  5. data/tracks/delphi/config.json +8 -0
  6. data/tracks/delphi/exercises/allergies/{AllergyTests.dpr → Allergies.dpr} +1 -1
  7. data/tracks/delphi/exercises/allergies/uAllergyTests.pas +1 -1
  8. data/tracks/delphi/exercises/bank-account/{BankAccountTests.dpr → BankAccount.dpr} +1 -1
  9. data/tracks/delphi/exercises/bank-account/uBankAccountTests.pas +1 -1
  10. data/tracks/delphi/exercises/beer-song/{BeerSongTests.dpr → BeerSong.dpr} +1 -1
  11. data/tracks/delphi/exercises/beer-song/uBeerSongTests.pas +7 -6
  12. data/tracks/delphi/exercises/binary-search/{BinarySearchTest.dpr → BinarySearch.dpr} +1 -1
  13. data/tracks/delphi/exercises/binary-search/uBinarySearchTest.pas +9 -8
  14. data/tracks/delphi/exercises/bob/uBobTests.pas +18 -17
  15. data/tracks/delphi/exercises/book-store/{BookStoreTests.dpr → BookStore.dpr} +1 -1
  16. data/tracks/delphi/exercises/book-store/uBookStoreTests.pas +12 -11
  17. data/tracks/delphi/exercises/bowling/{BowlingTests.dpr → Bowling.dpr} +1 -1
  18. data/tracks/delphi/exercises/bowling/uBowlingTests.pas +24 -23
  19. data/tracks/delphi/exercises/circular-buffer/{CircularBufferTests.dpr → CircularBuffer.dpr} +1 -1
  20. data/tracks/delphi/exercises/circular-buffer/uCircularBufferTests.pas +1 -1
  21. data/tracks/delphi/exercises/clock/{ClockTest.dpr → Clock.dpr} +1 -1
  22. data/tracks/delphi/exercises/clock/uClockTest.pas +13 -5
  23. data/tracks/delphi/exercises/etl/{ETLtests.dpr → ETL.dpr} +1 -1
  24. data/tracks/delphi/exercises/etl/uETLtests.pas +1 -1
  25. data/tracks/delphi/exercises/grains/{GrainsTests.dpr → Grains.dpr} +1 -1
  26. data/tracks/delphi/exercises/grains/uGrainsTests.pas +11 -10
  27. data/tracks/delphi/exercises/hamming/uHammingTests.pas +1 -0
  28. data/tracks/delphi/exercises/leap/{LeapTest.dpr → Leap.dpr} +1 -1
  29. data/tracks/delphi/exercises/leap/uLeapTests.pas +1 -0
  30. data/tracks/delphi/exercises/nucleotide-count/{NucleotideCountTest.dpr → NucleotideCount.dpr} +1 -1
  31. data/tracks/delphi/exercises/nucleotide-count/uNucleotideCountTest.pas +9 -8
  32. data/tracks/delphi/exercises/perfect-numbers/{PerfectNumbersTest.dpr → PerfectNumbers.dpr} +1 -1
  33. data/tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas +71 -20
  34. data/tracks/delphi/exercises/phone-number/{PhoneNumberTests.dpr → PhoneNumber.dpr} +1 -1
  35. data/tracks/delphi/exercises/phone-number/uPhoneNumberTests.pas +1 -0
  36. data/tracks/delphi/exercises/poker/uPokerTest.pas +1 -0
  37. data/tracks/delphi/exercises/raindrops/raindrops.dpr +60 -0
  38. data/tracks/delphi/exercises/raindrops/uRaindropsExample.pas +27 -0
  39. data/tracks/delphi/exercises/raindrops/uRaindropsTest.pas +180 -0
  40. data/tracks/delphi/exercises/rna-transcription/{TestRnaTranscription.dpr → RnaTranscription.dpr} +1 -1
  41. data/tracks/delphi/exercises/rna-transcription/uTestRnaTranscription.pas +8 -7
  42. data/tracks/delphi/exercises/saddle-points/{TestSaddlePoints.dpr → SaddlePoints.dpr} +1 -1
  43. data/tracks/delphi/exercises/saddle-points/uSaddlePointsTests.pas +6 -5
  44. data/tracks/go/config.json +12 -4
  45. data/tracks/go/exercises/accumulate/accumulate_test.go +2 -4
  46. data/tracks/go/exercises/luhn/cases_test.go +76 -0
  47. data/tracks/go/exercises/luhn/example.go +26 -26
  48. data/tracks/go/exercises/luhn/example_gen.go +50 -0
  49. data/tracks/go/exercises/luhn/luhn_test.go +1 -14
  50. data/tracks/go/exercises/perfect-numbers/perfect_numbers_test.go +14 -13
  51. data/tracks/java/exercises/rna-transcription/src/example/java/RnaTranscription.java +1 -1
  52. data/tracks/java/exercises/rna-transcription/src/main/java/RnaTranscription.java +5 -0
  53. data/tracks/java/exercises/rna-transcription/src/test/java/RnaTranscriptionTest.java +14 -7
  54. data/tracks/julia/.travis.yml +1 -0
  55. data/tracks/lisp/docs/ABOUT.md +10 -7
  56. data/tracks/lisp/docs/INSTALLATION.md +12 -4
  57. data/tracks/lisp/docs/LEARNING.md +11 -5
  58. data/tracks/lisp/docs/RESOURCES.md +18 -9
  59. data/tracks/lisp/docs/TESTS.md +4 -0
  60. data/tracks/scala/exercises/simple-linked-list/src/test/scala/SimpleLinkedListTest.scala +9 -1
  61. data/tracks/typescript/config.json +6 -0
  62. data/tracks/typescript/exercises/food-chain/food-chain.example.ts +54 -0
  63. data/tracks/typescript/exercises/food-chain/food-chain.test.ts +163 -0
  64. data/tracks/typescript/exercises/food-chain/package.json +37 -0
  65. data/tracks/typescript/exercises/food-chain/tsconfig.json +21 -0
  66. data/tracks/typescript/exercises/food-chain/tslint.json +127 -0
  67. data/tracks/typescript/exercises/food-chain/yarn.lock +2697 -0
  68. metadata +30 -19
  69. data/tracks/java/exercises/rna-transcription/src/main/java/.keep +0 -0
@@ -1,4 +1,4 @@
1
- program BookStoreTests;
1
+ program BookStore;
2
2
 
3
3
  {$IFNDEF TESTINSIGHT}
4
4
  {$APPTYPE CONSOLE}
@@ -9,50 +9,51 @@ type
9
9
  hpTests = class(TObject)
10
10
  public
11
11
  [Test]
12
+ // [Ignore('Comment the "[Ignore]" statement to run the test')]
12
13
  procedure A_basket_containing_only_a_single_book;
13
14
 
14
15
  [Test]
15
- [Ignore('Comment this line to run this test')]
16
+ [Ignore]
16
17
  procedure A_basket_containing_only_two_of_the_same_book;
17
18
 
18
19
  [Test]
19
- [Ignore('Comment this line to run this test')]
20
+ [Ignore]
20
21
  procedure No_charge_to_carry_around_an_empty_basket;
21
22
 
22
23
  [Test]
23
- [Ignore('Comment this line to run this test')]
24
+ [Ignore]
24
25
  procedure A_basket_containing_only_two_different_books;
25
26
 
26
27
  [Test]
27
- [Ignore('Comment this line to run this test')]
28
+ [Ignore]
28
29
  procedure A_basket_with_three_different_books;
29
30
 
30
31
  [Test]
31
- [Ignore('Comment this line to run this test')]
32
+ [Ignore]
32
33
  procedure A_basket_with_four_different_books;
33
34
 
34
35
  [Test]
35
- [Ignore('Comment this line to run this test')]
36
+ [Ignore]
36
37
  procedure A_basket_with_five_different_books;
37
38
 
38
39
  [Test]
39
- [Ignore('Comment this line to run this test')]
40
+ [Ignore]
40
41
  procedure A_basket_containing_eight_books_consisting_of_a_pair_each_of_the_first_three_books_plus_one_copy_each_of_the_last_two_books;
41
42
 
42
43
  [Test]
43
- [Ignore('Comment this line to run this test')]
44
+ [Ignore]
44
45
  procedure A_basket_containing_nine_books_consisting_of_a_pair_each_of_the_first_four_books_plus_one_of_the_last_book;
45
46
 
46
47
  [Test]
47
- [Ignore('Comment this line to run this test')]
48
+ [Ignore]
48
49
  procedure A_basket_containing_ten_books_consisting_of_two_copies_of_each_book_in_the_series;
49
50
 
50
51
  [Test]
51
- [Ignore('Comment this line to run this test')]
52
+ [Ignore]
52
53
  procedure A_basket_containing_eleven_books_consisting_of_three_copies_of_the_first_book_plus_two_each_of_the_remaing_four_bookes_in_the_series;
53
54
 
54
55
  [Test]
55
- [Ignore('Comment this line to run this test')]
56
+ [Ignore]
56
57
  procedure A_basket_containing_twelve_books_consisting_of_three_copies_of_the_first_two_books_plus_two_each_of_the_remaining_three_books_in_the_series;
57
58
  end;
58
59
 
@@ -1,4 +1,4 @@
1
- program BowlingTests;
1
+ program Bowling;
2
2
 
3
3
  {$IFNDEF TESTINSIGHT}
4
4
  {$APPTYPE CONSOLE}
@@ -13,98 +13,99 @@ type
13
13
  class function RollMany(pins: array of integer; game: IBowlingGame): IBowlingGame; static;
14
14
  public
15
15
  [Test]
16
+ // [Ignore('Comment the "[Ignore]" statement to run the test')]
16
17
  procedure Should_be_able_to_score_a_game_with_all_zeros;
17
18
 
18
19
  [Test]
19
- [Ignore('Comment this line to run this test')]
20
+ [Ignore]
20
21
  procedure Should_be_able_to_score_a_game_with_no_strikes_or_spares;
21
22
 
22
23
  [Test]
23
- [Ignore('Comment this line to run this test')]
24
+ [Ignore]
24
25
  procedure A_spare_followed_by_zeros_is_worth_ten_points;
25
26
 
26
27
  [Test]
27
- [Ignore('Comment this line to run this test')]
28
+ [Ignore]
28
29
  procedure Points_scored_in_the_roll_after_a_spare_are_counted_twice;
29
30
 
30
31
  [Test]
31
- [Ignore('Comment this line to run this test')]
32
+ [Ignore]
32
33
  procedure Consecutive_spares_each_get_a_one_roll_bonus;
33
34
 
34
35
  [Test]
35
- [Ignore('Comment this line to run this test')]
36
+ [Ignore]
36
37
  procedure A_spare_in_the_last_frame_gets_a_one_roll_bonus_that_is_counted_once;
37
38
 
38
39
  [Test]
39
- [Ignore('Comment this line to run this test')]
40
+ [Ignore]
40
41
  procedure A_strike_earns_ten_points_in_frame_with_a_single_roll;
41
42
 
42
43
  [Test]
43
- [Ignore('Comment this line to run this test')]
44
+ [Ignore]
44
45
  procedure Points_scored_in_the_two_rolls_after_a_strike_are_counted_twice_as_a_bonus;
45
46
 
46
47
  [Test]
47
- [Ignore('Comment this line to run this test')]
48
+ [Ignore]
48
49
  procedure Consecutive_strikes_each_get_the_two_roll_bonus;
49
50
 
50
51
  [Test]
51
- [Ignore('Comment this line to run this test')]
52
+ [Ignore]
52
53
  procedure A_strike_in_the_last_frame_gets_a_two_roll_bonus_that_is_counted_once;
53
54
 
54
55
  [Test]
55
- [Ignore('Comment this line to run this test')]
56
+ [Ignore]
56
57
  procedure Rolling_a_spare_with_the_two_roll_bonus_does_not_get_a_bonus_roll;
57
58
 
58
59
  [Test]
59
- [Ignore('Comment this line to run this test')]
60
+ [Ignore]
60
61
  procedure Strikes_with_the_two_roll_bonus_do_not_get_bonus_rolls;
61
62
 
62
63
  [Test]
63
- [Ignore('Comment this line to run this test')]
64
+ [Ignore]
64
65
  procedure A_strike_with_the_one_roll_bonus_after_a_spare_in_the_last_frame_does_not_get_a_bonus;
65
66
 
66
67
  [Test]
67
- [Ignore('Comment this line to run this test')]
68
+ [Ignore]
68
69
  procedure All_strikes_is_a_perfect_game;
69
70
 
70
71
  [Test]
71
- [Ignore('Comment this line to run this test')]
72
+ [Ignore]
72
73
  procedure Rolls_can_not_score_negative_points;
73
74
 
74
75
  [Test]
75
- [Ignore('Comment this line to run this test')]
76
+ [Ignore]
76
77
  procedure A_roll_can_not_score_more_than_10_points;
77
78
 
78
79
  [Test]
79
- [Ignore('Comment this line to run this test')]
80
+ [Ignore]
80
81
  procedure Two_rolls_in_a_frame_can_not_score_more_than_10_points;
81
82
 
82
83
  [Test]
83
- [Ignore('Comment this line to run this test')]
84
+ [Ignore]
84
85
  procedure Two_bonus_rolls_after_a_strike_in_the_last_frame_can_not_score_more_than_10_points;
85
86
 
86
87
  [Test]
87
- [Ignore('Comment this line to run this test')]
88
+ [Ignore]
88
89
  procedure An_unstarted_game_can_not_be_scored;
89
90
 
90
91
  [Test]
91
- [Ignore('Comment this line to run this test')]
92
+ [Ignore]
92
93
  procedure An_incomplete_game_can_not_be_scored;
93
94
 
94
95
  [Test]
95
- [Ignore('Comment this line to run this test')]
96
+ [Ignore]
96
97
  procedure A_game_with_more_than_ten_frames_can_not_be_scored;
97
98
 
98
99
  [Test]
99
- [Ignore('Comment this line to run this test')]
100
+ [Ignore]
100
101
  procedure Bonus_rolls_for_a_strike_in_the_last_frame_must_be_rolled_before_score_can_be_calculated;
101
102
 
102
103
  [Test]
103
- [Ignore('Comment this line to run this test')]
104
+ [Ignore]
104
105
  procedure Both_bonus_rolls_for_a_strike_in_the_last_frame_must_be_rolled_before_score_can_be_calculated;
105
106
 
106
107
  [Test]
107
- [Ignore('Comment this line to run this test')]
108
+ [Ignore]
108
109
  procedure Bonus_roll_for_a_spare_in_the_last_frame_must_be_rolled_before_score_can_be_calculated;
109
110
  end;
110
111
 
@@ -1,4 +1,4 @@
1
- program CircularBufferTests;
1
+ program CircularBuffer;
2
2
 
3
3
  {$IFNDEF TESTINSIGHT}
4
4
  {$APPTYPE CONSOLE}
@@ -10,7 +10,7 @@ type
10
10
  TestCircularBuffer = class(TObject)
11
11
  public
12
12
  [Test]
13
- [Ignore]
13
+ // [Ignore('Comment the "[Ignore]" statement to run the test')]
14
14
  procedure Write_and_read_back_one_item;
15
15
 
16
16
  [Test]
@@ -1,4 +1,4 @@
1
- program ClockTest;
1
+ program Clock;
2
2
 
3
3
  {$IFNDEF TESTINSIGHT}
4
4
  {$APPTYPE CONSOLE}
@@ -10,9 +10,12 @@ type
10
10
  TClockTest = class(TObject)
11
11
  public
12
12
  [Test]
13
- [TestCase('Prints the hour','8,08:00')]
14
- [TestCase('Prints the hour','9,09:00')]
15
- procedure Prints_the_hour(const hours: Integer; const expected : string);
13
+ // [Ignore('Comment the "[Ignore]" statement to run the test')]
14
+ procedure Prints_the_hour_8;
15
+
16
+ [Test]
17
+ [Ignore]
18
+ procedure Prints_the_hour_9;
16
19
 
17
20
  [Test]
18
21
  [Ignore]
@@ -70,9 +73,14 @@ type
70
73
  implementation
71
74
  uses uClock;
72
75
 
73
- procedure TClockTest.Prints_the_hour(const hours: Integer; const expected : string);
76
+ procedure TClockTest.Prints_the_hour_8;
77
+ begin
78
+ Assert.AreEqual('08:00', Clock.SetHands(8).ToString);
79
+ end;
80
+
81
+ procedure TClockTest.Prints_the_hour_9;
74
82
  begin
75
- Assert.AreEqual(expected, Clock.SetHands(hours).ToString);
83
+ Assert.AreEqual('09:00', Clock.SetHands(9).ToString);
76
84
  end;
77
85
 
78
86
  procedure TClockTest.Can_add_minutes;
@@ -1,4 +1,4 @@
1
- program ETLtests;
1
+ program ETL;
2
2
 
3
3
  {$IFNDEF TESTINSIGHT}
4
4
  {$APPTYPE CONSOLE}
@@ -15,7 +15,7 @@ type
15
15
  procedure Validate_CompareDictionaries;
16
16
 
17
17
  [Test]
18
- // [Ignore]
18
+ // [Ignore('Comment the "[Ignore]" statement to run the test')]
19
19
  procedure Transforms_one_value;
20
20
 
21
21
  [Test]
@@ -1,4 +1,4 @@
1
- program GrainsTests;
1
+ program Grains;
2
2
 
3
3
  {$IFNDEF TESTINSIGHT}
4
4
  {$APPTYPE CONSOLE}
@@ -9,46 +9,47 @@ type
9
9
  TgrainsTests = class(TObject)
10
10
  public
11
11
  [Test]
12
+ // [Ignore('Comment the "[Ignore]" statement to run the test')]
12
13
  procedure Test_square_1;
13
14
 
14
15
  [Test]
15
- [Ignore('Comment this line to run this test')]
16
+ [Ignore]
16
17
  procedure Test_square_2;
17
18
 
18
19
  [Test]
19
- [Ignore('Comment this line to run this test')]
20
+ [Ignore]
20
21
  procedure Test_square_3;
21
22
 
22
23
  [Test]
23
- [Ignore('Comment this line to run this test')]
24
+ [Ignore]
24
25
  procedure Test_square_4;
25
26
 
26
27
  [Test]
27
- [Ignore('Comment this line to run this test')]
28
+ [Ignore]
28
29
  procedure Test_square_16;
29
30
 
30
31
  [Test]
31
- [Ignore('Comment this line to run this test')]
32
+ [Ignore]
32
33
  procedure Test_square_32;
33
34
 
34
35
  [Test]
35
- [Ignore('Comment this line to run this test')]
36
+ [Ignore]
36
37
  procedure Test_square_64;
37
38
 
38
39
  [Test]
39
- [Ignore('Comment this line to run this test')]
40
+ [Ignore]
40
41
  procedure Square_0_raises_an_exception;
41
42
 
42
43
  [Test]
43
- [Ignore('Comment this line to run this test')]
44
+ [Ignore]
44
45
  procedure Negative_square_raises_an_exception;
45
46
 
46
47
  [Test]
47
- [Ignore('Comment this line to run the test')]
48
+ [Ignore]
48
49
  procedure Square_greater_than_64_raises_an_exception;
49
50
 
50
51
  [Test]
51
- [Ignore('Comment this line to run this test')]
52
+ [Ignore]
52
53
  procedure Test_total_grains;
53
54
  end;
54
55
 
@@ -10,6 +10,7 @@ type
10
10
  HammingTests = class(TObject)
11
11
  public
12
12
  [Test]
13
+ // [Ignore('Comment the "[Ignore]" statement to run the test')]
13
14
  procedure test_identical_strands;
14
15
 
15
16
  [Test]
@@ -1,4 +1,4 @@
1
- program LeapTest;
1
+ program Leap;
2
2
 
3
3
  {$IFNDEF TESTINSIGHT}
4
4
  {$APPTYPE CONSOLE}
@@ -10,6 +10,7 @@ type
10
10
  YearTest = class(TObject)
11
11
  public
12
12
  [Test]
13
+ // [Ignore('Comment the "[Ignore]" statement to run the test')]
13
14
  procedure test_leap_year;
14
15
 
15
16
  [Test]
@@ -1,4 +1,4 @@
1
- program NucleotideCountTest;
1
+ program NucleotideCount;
2
2
 
3
3
  {$IFNDEF TESTINSIGHT}
4
4
  {$APPTYPE CONSOLE}
@@ -2,7 +2,7 @@ unit uNucleotideCountTest;
2
2
 
3
3
  interface
4
4
  uses
5
- DUnitX.TestFramework, System.Generics.Collections;
5
+ DUnitX.TestFramework, System.Generics.Collections;
6
6
 
7
7
  type
8
8
 
@@ -15,34 +15,35 @@ type
15
15
  procedure Validate_CompareDictionaries;
16
16
 
17
17
  [Test]
18
+ // [Ignore('Comment the "[Ignore]" statement to run the test')]
18
19
  procedure Has_no_nucleotides;
19
20
 
20
21
  [Test]
21
- [Ignore('Comment this line to run this test')]
22
+ [Ignore]
22
23
  procedure Has_no_adenosine;
23
24
 
24
25
  [Test]
25
- [Ignore('Comment this line to run this test')]
26
+ [Ignore]
26
27
  procedure Repetitive_cytidine_gets_counts;
27
28
 
28
29
  [Test]
29
- [Ignore('Comment this line to run this test')]
30
+ [Ignore]
30
31
  procedure Repetitive_sequence_has_only_guanosine;
31
32
 
32
33
  [Test]
33
- [Ignore('Comment this line to run this test')]
34
+ [Ignore]
34
35
  procedure Counts_only_thymidine;
35
36
 
36
37
  [Test]
37
- [Ignore('Comment this line to run this test')]
38
+ [Ignore]
38
39
  procedure Counts_a_nucleotide_only_once;
39
40
 
40
41
  [Test]
41
- [Ignore('Comment this line to run this test')]
42
+ [Ignore]
42
43
  procedure Validates_nucleotides;
43
44
 
44
45
  [Test]
45
- [Ignore('Comment this line to run this test')]
46
+ [Ignore]
46
47
  procedure Counts_all_nucleotides;
47
48
  end;
48
49
 
@@ -1,4 +1,4 @@
1
- program PerfectNumbersTest;
1
+ program PerfectNumbers;
2
2
 
3
3
  {$IFNDEF TESTINSIGHT}
4
4
  {$APPTYPE CONSOLE}
@@ -9,38 +9,89 @@ type
9
9
  [TestFixture]
10
10
  PerfectNumbersTest = class(TObject)
11
11
  public
12
- [TestCase('3','3')]
13
- // [TestCase('7','7')]
14
- // [TestCase('13','13')]
15
- procedure Can_classify_deficient_numbers(const aNumber: Integer);
16
-
17
- // [TestCase('6','6')]
18
- // [TestCase('28','28')]
19
- // [TestCase('496','496')]
20
- procedure Can_classify_perfect_numbers(const aNumber: Integer);
21
-
22
- // [TestCase('12','12')]
23
- // [TestCase('18','18')]
24
- // [TestCase('20','20')]
25
- procedure Can_classify_abundant_numbers(const aNumber: Integer);
12
+ [Test]
13
+ // [Ignore('Comment the "[Ignore]" statement to run the test')]
14
+ procedure Can_classify_3_as_deficient;
15
+
16
+ [Test]
17
+ [Ignore]
18
+ procedure Can_classify_7_as_deficient;
19
+
20
+ [Test]
21
+ [Ignore]
22
+ procedure Can_classify_13_as_deficient;
23
+
24
+ [Test]
25
+ [Ignore]
26
+ procedure Can_classify_6_as_perfect;
27
+
28
+ [Test]
29
+ [Ignore]
30
+ procedure Can_classify_28_as_perfect;
31
+
32
+ [Test]
33
+ [Ignore]
34
+ procedure Can_classify_496_as_perfect;
35
+
36
+ [Test]
37
+ [Ignore]
38
+ procedure Can_classify_12_as_abundant;
39
+
40
+ [Test]
41
+ [Ignore]
42
+ procedure Can_classify_18_as_abundant;
43
+
44
+ [Test]
45
+ [Ignore]
46
+ procedure Can_classify_20_as_abundant;
26
47
  end;
27
48
 
28
49
  implementation
29
50
  uses uPerfectNumbers;
30
51
 
31
- procedure PerfectNumbersTest.Can_classify_deficient_numbers(const aNumber: Integer);
52
+ procedure PerfectNumbersTest.Can_classify_3_as_deficient;
53
+ begin
54
+ Assert.AreEqual(Deficient, PerfectNumber.Classify(3));
55
+ end;
56
+
57
+ procedure PerfectNumbersTest.Can_classify_7_as_deficient;
58
+ begin
59
+ Assert.AreEqual(Deficient, PerfectNumber.Classify(7));
60
+ end;
61
+
62
+ procedure PerfectNumbersTest.Can_classify_13_as_deficient;
63
+ begin
64
+ Assert.AreEqual(Deficient, PerfectNumber.Classify(13));
65
+ end;
66
+
67
+ procedure PerfectNumbersTest.Can_classify_6_as_perfect;
68
+ begin
69
+ Assert.AreEqual(Perfect, PerfectNumber.Classify(6));
70
+ end;
71
+
72
+ procedure PerfectNumbersTest.Can_classify_28_as_perfect;
73
+ begin
74
+ Assert.AreEqual(Perfect, PerfectNumber.Classify(28));
75
+ end;
76
+
77
+ procedure PerfectNumbersTest.Can_classify_496_as_perfect;
78
+ begin
79
+ Assert.AreEqual(Perfect, PerfectNumber.Classify(496));
80
+ end;
81
+
82
+ procedure PerfectNumbersTest.Can_classify_12_as_abundant;
32
83
  begin
33
- Assert.AreEqual(Deficient, PerfectNumber.Classify(aNumber));
84
+ Assert.AreEqual(Abundant, PerfectNumber.Classify(12));
34
85
  end;
35
86
 
36
- procedure PerfectNumbersTest.Can_classify_perfect_numbers(const aNumber: Integer);
87
+ procedure PerfectNumbersTest.Can_classify_18_as_abundant;
37
88
  begin
38
- Assert.AreEqual(Perfect, PerfectNumber.Classify(aNumber));
89
+ Assert.AreEqual(Abundant, PerfectNumber.Classify(18));
39
90
  end;
40
91
 
41
- procedure PerfectNumbersTest.Can_classify_abundant_numbers(const aNumber: Integer);
92
+ procedure PerfectNumbersTest.Can_classify_20_as_abundant;
42
93
  begin
43
- Assert.AreEqual(Abundant, PerfectNumber.Classify(aNumber));
94
+ Assert.AreEqual(Abundant, PerfectNumber.Classify(20));
44
95
  end;
45
96
 
46
97
  initialization