trackler 2.2.1.36 → 2.2.1.37

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/tracks/bash/config.json +1 -0
  4. data/tracks/ecmascript/README.md +2 -2
  5. data/tracks/haskell/config/maintainers.json +2 -2
  6. data/tracks/java/config.json +15 -3
  7. data/tracks/java/exercises/difference-of-squares/src/test/java/DifferenceOfSquaresCalculatorTest.java +9 -9
  8. data/tracks/ruby/exercises/palindrome-products/README.md +12 -6
  9. data/tracks/ruby/exercises/space-age/.meta/generator/test_template.erb +1 -1
  10. data/tracks/ruby/lib/generator/template_values.rb +6 -0
  11. data/tracks/ruby/lib/generator/test_template.erb +1 -1
  12. data/tracks/ruby/test/generator/template_values_test.rb +3 -3
  13. data/tracks/rust/exercises/accumulate/.gitignore +7 -0
  14. data/tracks/rust/exercises/clock/.gitignore +7 -0
  15. data/tracks/rust/exercises/nth-prime/.gitignore +7 -0
  16. data/tracks/rust/exercises/pig-latin/.gitignore +7 -0
  17. data/tracks/rust/exercises/prime-factors/.gitignore +7 -0
  18. data/tracks/rust/exercises/proverb/.gitignore +7 -0
  19. data/tracks/rust/exercises/pythagorean-triplet/.gitignore +7 -0
  20. data/tracks/rust/exercises/run-length-encoding/.gitignore +7 -0
  21. data/tracks/rust/exercises/say/.gitignore +7 -0
  22. data/tracks/scala/config.json +1 -0
  23. data/tracks/scala/exercises/clock/src/test/scala/ClockTest.scala +73 -79
  24. data/tracks/scala/exercises/forth/src/test/scala/ForthTest.scala +128 -133
  25. data/tracks/scala/exercises/kindergarten-garden/example.scala +1 -1
  26. data/tracks/scala/exercises/kindergarten-garden/src/test/scala/GardenTest.scala +77 -52
  27. data/tracks/scala/exercises/nucleotide-count/src/main/scala/.keep +0 -0
  28. data/tracks/scala/exercises/nucleotide-count/src/test/scala/NucleotideCountTest.scala +21 -61
  29. data/tracks/scala/exercises/palindrome-products/example.scala +7 -4
  30. data/tracks/scala/exercises/palindrome-products/src/test/scala/PalindromeProductsTest.scala +54 -34
  31. data/tracks/scala/testgen/src/main/scala/ClockTestGenerator.scala +66 -0
  32. data/tracks/scala/testgen/src/main/scala/ForthTestGenerator.scala +66 -0
  33. data/tracks/scala/testgen/src/main/scala/KindergartenGardenTestGenerator.scala +48 -0
  34. data/tracks/scala/testgen/src/main/scala/NucleotideCountTestGenerator.scala +34 -0
  35. data/tracks/scala/testgen/src/main/scala/PalindromeProductsTestGenerator.scala +50 -0
  36. data/tracks/scala/testgen/src/main/scala/testgen/CanonicalDataParser.scala +7 -6
  37. data/tracks/sml/config.json +21 -0
  38. data/tracks/sml/exercises/phone-number/README.md +64 -0
  39. data/tracks/sml/exercises/phone-number/example.sml +18 -0
  40. data/tracks/sml/exercises/phone-number/phone-number.sml +2 -0
  41. data/tracks/sml/exercises/phone-number/test.sml +50 -0
  42. data/tracks/sml/exercises/phone-number/testlib.sml +159 -0
  43. data/tracks/sml/exercises/roman-numerals/README.md +79 -0
  44. data/tracks/sml/exercises/roman-numerals/example.sml +27 -0
  45. data/tracks/sml/exercises/roman-numerals/roman-numerals.sml +2 -0
  46. data/tracks/sml/exercises/roman-numerals/test.sml +66 -0
  47. data/tracks/sml/exercises/roman-numerals/testlib.sml +159 -0
  48. metadata +26 -3
  49. data/tracks/scala/exercises/nucleotide-count/src/main/scala/DNA.scala +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: faac08c981ca8b1818972ee26618ed44e56105fd
4
- data.tar.gz: b65e1ce9ee9813c786e34f6491aa89ee94a2ce77
3
+ metadata.gz: ad84e4a8d88075679edfbdd19d33960379abd6b9
4
+ data.tar.gz: 6b2b8da9a950f3e6a8a20519e03b34714e151916
5
5
  SHA512:
6
- metadata.gz: 438a77259fe83ef17635fb743bc1148615568deff93f5aef23b933b6cd52c974c8f22c3afe37ffce8cabf3b16b941890d6216b479e6a30e564d71b7b75cd3f40
7
- data.tar.gz: b5e5bae54e3a77d882d93a3b936f37de75b7aa4cd0700e7616435147150a5c64f3d61019bb3775fd989d44e7cf3e1267ee13a6be02e9d3a49193e3b9bb6ad551
6
+ metadata.gz: b2e29119464f07bbfc8eef01b406fbac92996900385f5f86754093749a56c6703e501487bf1f65e080ad04c2e4be2c43b1cd3fe45fd9d6d0690438bb19e9f497
7
+ data.tar.gz: 5189f5e61c75cfdfe895602c768aa10ee3f694f71a9ac3847e6c408a8fbc79ad5f527b6d8d266df6b4ab6af69b5affa3b02a483035219c6d169bea1f2701bbff
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.2.1.36"
2
+ VERSION = "2.2.1.37"
3
3
  end
@@ -1,4 +1,5 @@
1
1
  {
2
+ "language": "Bash",
2
3
  "active": false,
3
4
  "checklist_issue": 4,
4
5
  "exercises": [
@@ -7,8 +7,8 @@ Exercism exercises in ECMAScript 6
7
7
 
8
8
  ## Running the Unit Test Suite
9
9
 
10
- [Node.js](https://nodejs.org) must be installed. Follow [these instructions](http://exercism.io/languages/ecmascript/installing) for installing nodejs.
11
- We recommend using the latest stable version (v7 at the moment).
10
+ [Node.js](https://nodejs.org) must be installed. Follow these [instructions](http://exercism.io/languages/ecmascript/installation) for installing nodejs.
11
+ We recommend using the latest LTS version.
12
12
 
13
13
  Use `npm` to install all required dependencies:
14
14
 
@@ -22,8 +22,8 @@
22
22
  },
23
23
  {
24
24
  "github_username": "rbasso",
25
- "show_on_website": true,
26
- "alumnus": false,
25
+ "show_on_website": false,
26
+ "alumnus": true,
27
27
  "name": null,
28
28
  "bio": "In a world plagued by mutability, where side-effects scorch the land, a hobbyist programmer joins a fellowship of coders to save The Source.",
29
29
  "link_text": null,
@@ -43,7 +43,11 @@
43
43
  "core": true,
44
44
  "difficulty": 3,
45
45
  "slug": "hamming",
46
- "topics": null,
46
+ "topics": [
47
+ "strings",
48
+ "loops",
49
+ "integers"
50
+ ],
47
51
  "unlocked_by": null,
48
52
  "uuid": "ce899ca6-9cc7-47ba-b76f-1bbcf2630b76"
49
53
  },
@@ -51,7 +55,11 @@
51
55
  "core": true,
52
56
  "difficulty": 3,
53
57
  "slug": "gigasecond",
54
- "topics": null,
58
+ "topics": [
59
+ "dates",
60
+ "time",
61
+ "integers"
62
+ ],
55
63
  "unlocked_by": null,
56
64
  "uuid": "bf1641c8-dc0d-4d38-9cfe-b4c132ea3553"
57
65
  },
@@ -299,7 +307,11 @@
299
307
  "core": false,
300
308
  "difficulty": 5,
301
309
  "slug": "bob",
302
- "topics": null,
310
+ "topics": [
311
+ "strings",
312
+ "booleans",
313
+ "conditionals"
314
+ ],
303
315
  "unlocked_by": "two-fer",
304
316
  "uuid": "34cd328c-cd96-492b-abd4-2b8716cdcd9a"
305
317
  },
@@ -17,7 +17,7 @@ public class DifferenceOfSquaresCalculatorTest {
17
17
  }
18
18
 
19
19
  @Test
20
- public void testSquareOfSum1() {
20
+ public void testSquareOfSumUpToOne() {
21
21
  final int expected = 1;
22
22
  final int actual = calculator.computeSquareOfSumTo(1);
23
23
  assertEquals(expected, actual);
@@ -25,7 +25,7 @@ public class DifferenceOfSquaresCalculatorTest {
25
25
 
26
26
  @Ignore("Remove to run test")
27
27
  @Test
28
- public void testSquareOfSum5() {
28
+ public void testSquareOfSumUpToFive() {
29
29
  final int expected = 225;
30
30
  final int actual = calculator.computeSquareOfSumTo(5);
31
31
  assertEquals(expected, actual);
@@ -33,7 +33,7 @@ public class DifferenceOfSquaresCalculatorTest {
33
33
 
34
34
  @Ignore("Remove to run test")
35
35
  @Test
36
- public void testSquareOfSum100() {
36
+ public void testSquareOfSumUpToHundred() {
37
37
  final int expected = 25502500;
38
38
  final int actual = calculator.computeSquareOfSumTo(100);
39
39
  assertEquals(expected, actual);
@@ -41,7 +41,7 @@ public class DifferenceOfSquaresCalculatorTest {
41
41
 
42
42
  @Ignore("Remove to run test")
43
43
  @Test
44
- public void testSumOfSquares1() {
44
+ public void testSumOfSquaresUpToOne() {
45
45
  final int expected = 1;
46
46
  final int actual = calculator.computeSumOfSquaresTo(1);
47
47
  assertEquals(expected, actual);
@@ -49,7 +49,7 @@ public class DifferenceOfSquaresCalculatorTest {
49
49
 
50
50
  @Ignore("Remove to run test")
51
51
  @Test
52
- public void testSumOfSquares5() {
52
+ public void testSumOfSquaresUpToFive() {
53
53
  final int expected = 55;
54
54
  final int actual = calculator.computeSumOfSquaresTo(5);
55
55
  assertEquals(expected, actual);
@@ -57,7 +57,7 @@ public class DifferenceOfSquaresCalculatorTest {
57
57
 
58
58
  @Ignore("Remove to run test")
59
59
  @Test
60
- public void testSumOfSquares100() {
60
+ public void testSumOfSquaresUpToHundred() {
61
61
  final int expected = 338350;
62
62
  final int actual = calculator.computeSumOfSquaresTo(100);
63
63
  assertEquals(expected, actual);
@@ -65,7 +65,7 @@ public class DifferenceOfSquaresCalculatorTest {
65
65
 
66
66
  @Ignore("Remove to run test")
67
67
  @Test
68
- public void testDifferenceOfSquares1() {
68
+ public void testDifferenceOfSquaresUpToOne() {
69
69
  final int expected = 0;
70
70
  final int actual = calculator.computeDifferenceOfSquares(1);
71
71
  assertEquals(expected, actual);
@@ -73,7 +73,7 @@ public class DifferenceOfSquaresCalculatorTest {
73
73
 
74
74
  @Ignore("Remove to run test")
75
75
  @Test
76
- public void testDifferenceOfSquares5() {
76
+ public void testDifferenceOfSquaresUpToFive() {
77
77
  final int expected = 170;
78
78
  final int actual = calculator.computeDifferenceOfSquares(5);
79
79
  assertEquals(expected, actual);
@@ -81,7 +81,7 @@ public class DifferenceOfSquaresCalculatorTest {
81
81
 
82
82
  @Ignore("Remove to run test")
83
83
  @Test
84
- public void testDifferenceOfSquares100() {
84
+ public void testDifferenceOfSquaresUpToHundred() {
85
85
  final int expected = 25164150;
86
86
  final int actual = calculator.computeDifferenceOfSquares(100);
87
87
  assertEquals(expected, actual);
@@ -14,24 +14,30 @@ product: `91 * 99 = 9009`.
14
14
 
15
15
  It's possible (and indeed common) for a palindrome product to be the product
16
16
  of multiple combinations of numbers. For example, the palindrome product `9` has
17
- the factors `(1, 9)`, `(3, 3)`, and `(9, 1)`.
17
+ the factors `(1, 9)` and `(3, 3)`.
18
18
 
19
19
  Write a program that given a range of integers, returns the smallest and largest
20
- palindromic product within that range, along with all of it's factors.
20
+ palindromic product of factors within that range, along with all the factors in the range for that product.
21
21
 
22
22
  ## Example 1
23
23
 
24
24
  Given the range `[1, 9]` (both inclusive)...
25
25
 
26
- The smallest product is `1`. It's factors are `(1, 1)`.
27
- The largest product is `9`. It's factors are `(1, 9)`, `(3, 3)`, and `(9, 1)`.
26
+ And given the list of all possible products within this range:
27
+ `[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 15, 21, 24, 27, 20, 28, 32, 36, 25, 30, 35, 40, 45, 42, 48, 54, 49, 56, 63, 64, 72, 81]`
28
+
29
+ The palindrome products are all single digit numbers (in this case):
30
+ `[1, 2, 3, 4, 5, 6, 7, 8, 9]`
31
+
32
+ The smallest palindrome product is `1`. Its factors are `(1, 1)`.
33
+ The largest palindrome product is `9`. Its factors are `(1, 9)` and `(3, 3)`.
28
34
 
29
35
  ## Example 2
30
36
 
31
37
  Given the range `[10, 99]` (both inclusive)...
32
38
 
33
- The smallest palindrome product is `121`. It's factors are `(11, 11)`.
34
- The largest palindrome product is `9009`. It's factors are `(91, 99)` and `(99, 91)`.
39
+ The smallest palindrome product is `121`. Its factors are `(11, 11)`.
40
+ The largest palindrome product is `9009`. Its factors are `(91, 99)`.
35
41
 
36
42
  * * * *
37
43
 
@@ -2,7 +2,7 @@ require 'minitest/autorun'
2
2
  require_relative '<%= exercise_name %>'
3
3
 
4
4
  # Common test data version: <%= canonical_data_version %> <%= abbreviated_commit_hash %>
5
- class <%= exercise_name_camel %>Test < Minitest::Test
5
+ class <%= exercise_test_classname %> < Minitest::Test
6
6
  # assert_in_delta will pass if the difference
7
7
  # between the values being compared is less
8
8
  # than the allowed delta
@@ -17,6 +17,12 @@ module Generator
17
17
  binding
18
18
  end
19
19
 
20
+ def exercise_test_classname
21
+ exercise_name_camel + 'Test'
22
+ end
23
+
24
+ private
25
+
20
26
  def exercise_name_camel
21
27
  exercise_name.split('_').map(&:capitalize).join
22
28
  end
@@ -2,7 +2,7 @@ require 'minitest/autorun'
2
2
  require_relative '<%= exercise_name %>'
3
3
 
4
4
  # Common test data version: <%= canonical_data_version %> <%= abbreviated_commit_hash %>
5
- class <%= exercise_name_camel %>Test < Minitest::Test
5
+ class <%= exercise_test_classname %> < Minitest::Test
6
6
  <% test_cases.each_with_index do |test_case, idx| %>
7
7
  def <%= test_case.name %>
8
8
  <%= test_case.skipped(idx) %>
@@ -26,10 +26,10 @@ module Generator
26
26
  assert_equal expected_exercise_name, subject.exercise_name
27
27
  end
28
28
 
29
- def test_exercise_name_camel
30
- expected_exercise_name_camel = 'AlphaBeta'
29
+ def test_exercise_test_classname
30
+ expected = 'AlphaBetaTest'
31
31
  subject = TemplateValues.new(@arguments.merge(exercise_name: 'alpha_beta'))
32
- assert_equal expected_exercise_name_camel, subject.exercise_name_camel
32
+ assert_equal expected, subject.exercise_test_classname
33
33
  end
34
34
 
35
35
  def test_test_cases
@@ -0,0 +1,7 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ /target/
4
+
5
+ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
6
+ # More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock
7
+ Cargo.lock
@@ -0,0 +1,7 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ /target/
4
+
5
+ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
6
+ # More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock
7
+ Cargo.lock
@@ -0,0 +1,7 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ /target/
4
+
5
+ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
6
+ # More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock
7
+ Cargo.lock
@@ -0,0 +1,7 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ /target/
4
+
5
+ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
6
+ # More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock
7
+ Cargo.lock
@@ -0,0 +1,7 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ /target/
4
+
5
+ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
6
+ # More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock
7
+ Cargo.lock
@@ -0,0 +1,7 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ /target/
4
+
5
+ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
6
+ # More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock
7
+ Cargo.lock
@@ -0,0 +1,7 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ /target/
4
+
5
+ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
6
+ # More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock
7
+ Cargo.lock
@@ -0,0 +1,7 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ /target/
4
+
5
+ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
6
+ # More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock
7
+ Cargo.lock
@@ -0,0 +1,7 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ /target/
4
+
5
+ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
6
+ # More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock
7
+ Cargo.lock
@@ -746,6 +746,7 @@
746
746
  "unlocked_by": "sum-of-multiples",
747
747
  "difficulty": 6,
748
748
  "topics": [
749
+ "Optional values",
749
750
  "Sets",
750
751
  "Strings",
751
752
  "Tuples",
@@ -1,260 +1,254 @@
1
- import org.scalatest.{Matchers, FlatSpec}
1
+ import org.scalatest.{Matchers, FunSuite}
2
2
 
3
- class ClockTest extends FlatSpec with Matchers {
4
- it should "construct from hour/min" in {
5
- Clock(8, 0).toString should be ("08:00")
6
- Clock(11, 9).toString should be ("11:09")
3
+ /** @version 1.0.1 */
4
+ class ClockTest extends FunSuite with Matchers {
5
+
6
+ test("on the hour") {
7
+ Clock(8, 0) should be (Clock(8, 0))
7
8
  }
8
9
 
9
- it should "construct from minutes" in {
10
+ test("past the hour") {
10
11
  pending
11
- Clock(3).toString should be ("00:03")
12
+ Clock(11, 9) should be (Clock(11, 9))
12
13
  }
13
14
 
14
- it should "implement equals" in {
15
+ test("midnight is zero hours") {
15
16
  pending
16
- Clock(15, 37) should be (Clock(15, 37))
17
- Clock(15, 37) should not be Clock(15, 36)
17
+ Clock(24, 0) should be (Clock(0, 0))
18
18
  }
19
19
 
20
- it should "support wraparound" in {
20
+ test("hour rolls over") {
21
21
  pending
22
- Clock(24, 0) should be (Clock(0, 0))
23
22
  Clock(25, 0) should be (Clock(1, 0))
24
23
  }
25
24
 
26
- it should "handle hour rolls over continuously" in {
25
+ test("hour rolls over continuously") {
27
26
  pending
28
27
  Clock(100, 0) should be (Clock(4, 0))
29
28
  }
30
29
 
31
- it should "implement 60 min as the next hour" in {
30
+ test("sixty minutes is next hour") {
32
31
  pending
33
32
  Clock(1, 60) should be (Clock(2, 0))
34
33
  }
35
34
 
36
- it should "construct consistently between constructors" in {
37
- pending
38
- Clock(60) should be (Clock(1, 0))
39
- }
40
-
41
- it should "support rolling over minutes" in {
35
+ test("minutes roll over") {
42
36
  pending
43
37
  Clock(0, 160) should be (Clock(2, 40))
44
38
  }
45
39
 
46
- it should "handle minutes rolling over consistently" in {
40
+ test("minutes roll over continuously") {
47
41
  pending
48
42
  Clock(0, 1723) should be (Clock(4, 43))
49
43
  }
50
44
 
51
- it should "support rolling over both hours and minutes" in {
45
+ test("hour and minutes roll over") {
52
46
  pending
53
47
  Clock(25, 160) should be (Clock(3, 40))
54
48
  }
55
49
 
56
- it should "handle hours and minutes rolling over consistently" in {
50
+ test("hour and minutes roll over continuously") {
57
51
  pending
58
52
  Clock(201, 3001) should be (Clock(11, 1))
59
53
  }
60
54
 
61
- it should "handle hours and minutes rolling over to midnight" in {
55
+ test("hour and minutes roll over to exactly midnight") {
62
56
  pending
63
57
  Clock(72, 8640) should be (Clock(0, 0))
64
58
  }
65
59
 
66
- it should "handle negative hour" in {
60
+ test("negative hour") {
67
61
  pending
68
62
  Clock(-1, 15) should be (Clock(23, 15))
69
63
  }
70
64
 
71
- it should "handle rolling over negative hour" in {
65
+ test("negative hour rolls over") {
72
66
  pending
73
67
  Clock(-25, 0) should be (Clock(23, 0))
74
68
  }
75
69
 
76
- it should "handle negative hours rolling over consistently" in {
70
+ test("negative hour rolls over continuously") {
77
71
  pending
78
72
  Clock(-91, 0) should be (Clock(5, 0))
79
73
  }
80
74
 
81
- it should "handle negative minute" in {
75
+ test("negative minutes") {
82
76
  pending
83
77
  Clock(1, -40) should be (Clock(0, 20))
84
78
  }
85
79
 
86
- it should "handle rolling over negative minute" in {
80
+ test("negative minutes roll over") {
87
81
  pending
88
82
  Clock(1, -160) should be (Clock(22, 20))
89
83
  }
90
84
 
91
- it should "handle negative minutes rolling over consistently" in {
85
+ test("negative minutes roll over continuously") {
92
86
  pending
93
87
  Clock(1, -4820) should be (Clock(16, 40))
94
88
  }
95
89
 
96
- it should "handle negative hour and minutes roll over" in {
90
+ test("negative hour and minutes both roll over") {
97
91
  pending
98
92
  Clock(-25, -160) should be (Clock(20, 20))
99
93
  }
100
94
 
101
- it should "handle negative hour and minutes rolling over consistently" in {
95
+ test("negative hour and minutes both roll over continuously") {
102
96
  pending
103
97
  Clock(-121, -5810) should be (Clock(22, 10))
104
98
  }
105
99
 
106
- it should "add minutes" in {
100
+ test("add minutes") {
107
101
  pending
108
102
  Clock(10, 0) + Clock(3) should be (Clock(10, 3))
109
103
  }
110
104
 
111
- it should "add no minutes" in {
105
+ test("add no minutes") {
112
106
  pending
113
107
  Clock(6, 41) + Clock(0) should be (Clock(6, 41))
114
108
  }
115
109
 
116
- it should "add to next hour" in {
110
+ test("add to next hour") {
117
111
  pending
118
112
  Clock(0, 45) + Clock(40) should be (Clock(1, 25))
119
113
  }
120
114
 
121
- it should "add more than one hour" in {
115
+ test("add more than one hour") {
122
116
  pending
123
117
  Clock(10, 0) + Clock(61) should be (Clock(11, 1))
124
118
  }
125
119
 
126
- it should "add more than two hours with carry" in {
120
+ test("add more than two hours with carry") {
127
121
  pending
128
122
  Clock(0, 45) + Clock(160) should be (Clock(3, 25))
129
123
  }
130
124
 
131
- it should "add across midnight" in {
125
+ test("add across midnight") {
132
126
  pending
133
127
  Clock(23, 59) + Clock(2) should be (Clock(0, 1))
134
128
  }
135
129
 
136
- it should "add more than one day (1500 min == 25 hours)" in {
130
+ test("add more than one day (1500 min = 25 hrs)") {
137
131
  pending
138
132
  Clock(5, 32) + Clock(1500) should be (Clock(6, 32))
139
133
  }
140
134
 
141
- it should "add more than 2 days" in {
135
+ test("add more than two days") {
142
136
  pending
143
137
  Clock(1, 1) + Clock(3500) should be (Clock(11, 21))
144
138
  }
145
139
 
146
- it should "subtract minutes" in {
140
+ test("subtract minutes") {
147
141
  pending
148
142
  Clock(10, 3) - Clock(3) should be (Clock(10, 0))
149
143
  }
150
144
 
151
- it should "subtract to previous hour" in {
145
+ test("subtract to previous hour") {
152
146
  pending
153
147
  Clock(10, 3) - Clock(30) should be (Clock(9, 33))
154
148
  }
155
149
 
156
- it should "subtract more than an hour" in {
150
+ test("subtract more than an hour") {
157
151
  pending
158
152
  Clock(10, 3) - Clock(70) should be (Clock(8, 53))
159
153
  }
160
154
 
161
- it should "subtract across midnight" in {
155
+ test("subtract across midnight") {
162
156
  pending
163
157
  Clock(0, 3) - Clock(4) should be (Clock(23, 59))
164
158
  }
165
159
 
166
- it should "subtract more than two hours" in {
160
+ test("subtract more than two hours") {
167
161
  pending
168
162
  Clock(0, 0) - Clock(160) should be (Clock(21, 20))
169
163
  }
170
164
 
171
- it should "subtract more than two hours with borrow" in {
165
+ test("subtract more than two hours with borrow") {
172
166
  pending
173
167
  Clock(6, 15) - Clock(160) should be (Clock(3, 35))
174
168
  }
175
169
 
176
- it should "subtract more than one day (1500 min = 25 hrs)" in {
170
+ test("subtract more than one day (1500 min = 25 hrs)") {
177
171
  pending
178
172
  Clock(5, 32) - Clock(1500) should be (Clock(4, 32))
179
173
  }
180
174
 
181
- it should "subtract more than two days" in {
175
+ test("subtract more than two days") {
182
176
  pending
183
177
  Clock(2, 20) - Clock(3000) should be (Clock(0, 20))
184
178
  }
185
179
 
186
- it should "handle equality of clocks with same time" in {
180
+ test("clocks with same time") {
187
181
  pending
188
- Clock(15, 37) should be (Clock(15, 37))
182
+ Clock(15, 37) == Clock(15, 37) should be (true)
189
183
  }
190
184
 
191
- it should "handle equality of clocks that are one minute apart" in {
185
+ test("clocks a minute apart") {
192
186
  pending
193
- Clock(15, 36) should not be (Clock(15, 37))
187
+ Clock(15, 36) == Clock(15, 37) should be (false)
194
188
  }
195
189
 
196
- it should "handle equality of clocks that are one hour apart" in {
190
+ test("clocks an hour apart") {
197
191
  pending
198
- Clock(14, 37) should not be (Clock(15, 37))
192
+ Clock(14, 37) == Clock(15, 37) should be (false)
199
193
  }
200
194
 
201
- it should "handle equality of clocks with hour overflow" in {
195
+ test("clocks with hour overflow") {
202
196
  pending
203
- Clock(10, 37) should be (Clock(34, 37))
197
+ Clock(10, 37) == Clock(34, 37) should be (true)
204
198
  }
205
199
 
206
- it should "handle equality of clocks with hour overflow by several days" in {
200
+ test("clocks with hour overflow by several days") {
207
201
  pending
208
- Clock(3, 11) should be (Clock(99, 11))
202
+ Clock(3, 11) == Clock(99, 11) should be (true)
209
203
  }
210
204
 
211
- it should "handle equality of clocks with negative hour" in {
205
+ test("clocks with negative hour") {
212
206
  pending
213
- Clock(22, 40) should be (Clock(-2, 40))
207
+ Clock(22, 40) == Clock(-2, 40) should be (true)
214
208
  }
215
209
 
216
- it should "handle equality of clocks with negative hour that wraps" in {
210
+ test("clocks with negative hour that wraps") {
217
211
  pending
218
- Clock(17, 3) should be (Clock(-31, 3))
212
+ Clock(17, 3) == Clock(-31, 3) should be (true)
219
213
  }
220
214
 
221
- it should "handle equality of clocks with negative hour that wraps multiple times" in {
215
+ test("clocks with negative hour that wraps multiple times") {
222
216
  pending
223
- Clock(13, 49) should be (Clock(-83, 49))
217
+ Clock(13, 49) == Clock(-83, 49) should be (true)
224
218
  }
225
219
 
226
- it should "handle equality of clocks with minute overflow" in {
220
+ test("clocks with minute overflow") {
227
221
  pending
228
- Clock(0, 1) should be (Clock(0, 1441))
222
+ Clock(0, 1) == Clock(0, 1441) should be (true)
229
223
  }
230
224
 
231
- it should "handle equality of clocks with minute overflow by several days" in {
225
+ test("clocks with minute overflow by several days") {
232
226
  pending
233
- Clock(2, 2) should be (Clock(2, 4322))
227
+ Clock(2, 2) == Clock(2, 4322) should be (true)
234
228
  }
235
229
 
236
- it should "handle equality of clocks with negative minute" in {
230
+ test("clocks with negative minute") {
237
231
  pending
238
- Clock(2, 40) should be (Clock(3, -20))
232
+ Clock(2, 40) == Clock(3, -20) should be (true)
239
233
  }
240
234
 
241
- it should "handle equality of clocks with negative minute that wraps" in {
235
+ test("clocks with negative minute that wraps") {
242
236
  pending
243
- Clock(4, 10) should be (Clock(5, -1490))
237
+ Clock(4, 10) == Clock(5, -1490) should be (true)
244
238
  }
245
239
 
246
- it should "handle equality of clocks with negative minute that wraps mutiple times" in {
240
+ test("clocks with negative minute that wraps multiple times") {
247
241
  pending
248
- Clock(6, 15) should be (Clock(6, -4305))
242
+ Clock(6, 15) == Clock(6, -4305) should be (true)
249
243
  }
250
244
 
251
- it should "handle equality of clocks with negative hours and minute" in {
245
+ test("clocks with negative hours and minutes") {
252
246
  pending
253
- Clock(7, 32) should be (Clock(-12, -268))
247
+ Clock(7, 32) == Clock(-12, -268) should be (true)
254
248
  }
255
249
 
256
- it should "handle equality of clocks with negative hours and minute that wrap" in {
250
+ test("clocks with negative hours and minutes that wrap") {
257
251
  pending
258
- Clock(18, 7) should be (Clock(-54, -11513))
252
+ Clock(18, 7) == Clock(-54, -11513) should be (true)
259
253
  }
260
- }
254
+ }