trackler 2.1.0.10 → 2.1.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/bin/bump-content +3 -3
  3. data/common/README.md +0 -1
  4. data/common/exercises/kindergarten-garden/canonical-data.json +124 -0
  5. data/lib/trackler/version.rb +1 -1
  6. data/tracks/coq/README.md +8 -6
  7. data/tracks/haskell/exercises/all-your-base/package.yaml +1 -1
  8. data/tracks/haskell/exercises/allergies/package.yaml +1 -1
  9. data/tracks/haskell/exercises/alphametics/package.yaml +1 -1
  10. data/tracks/haskell/exercises/anagram/package.yaml +1 -1
  11. data/tracks/haskell/exercises/anagram/test/Tests.hs +2 -2
  12. data/tracks/haskell/exercises/atbash-cipher/package.yaml +1 -1
  13. data/tracks/haskell/exercises/bob/package.yaml +1 -1
  14. data/tracks/haskell/exercises/change/package.yaml +1 -1
  15. data/tracks/haskell/exercises/change/test/Tests.hs +10 -0
  16. data/tracks/haskell/exercises/clock/package.yaml +1 -1
  17. data/tracks/haskell/exercises/connect/package.yaml +1 -1
  18. data/tracks/haskell/exercises/custom-set/package.yaml +1 -1
  19. data/tracks/haskell/exercises/difference-of-squares/package.yaml +1 -1
  20. data/tracks/haskell/exercises/dominoes/package.yaml +1 -1
  21. data/tracks/haskell/exercises/etl/package.yaml +1 -1
  22. data/tracks/haskell/exercises/forth/package.yaml +1 -1
  23. data/tracks/haskell/exercises/grains/package.yaml +1 -1
  24. data/tracks/haskell/exercises/hamming/package.yaml +1 -1
  25. data/tracks/haskell/exercises/hello-world/package.yaml +1 -1
  26. data/tracks/haskell/exercises/kindergarten-garden/package.yaml +1 -1
  27. data/tracks/haskell/exercises/kindergarten-garden/test/Tests.hs +4 -12
  28. data/tracks/haskell/exercises/largest-series-product/package.yaml +1 -1
  29. data/tracks/haskell/exercises/largest-series-product/test/Tests.hs +4 -31
  30. data/tracks/haskell/exercises/meetup/package.yaml +1 -1
  31. data/tracks/haskell/exercises/minesweeper/package.yaml +1 -1
  32. data/tracks/haskell/exercises/nth-prime/package.yaml +1 -1
  33. data/tracks/haskell/exercises/nucleotide-count/package.yaml +1 -1
  34. data/tracks/haskell/exercises/ocr-numbers/package.yaml +1 -1
  35. data/tracks/haskell/exercises/pascals-triangle/package.yaml +1 -1
  36. data/tracks/haskell/exercises/phone-number/package.yaml +1 -1
  37. data/tracks/haskell/exercises/pig-latin/package.yaml +1 -1
  38. data/tracks/haskell/exercises/pov/package.yaml +1 -1
  39. data/tracks/haskell/exercises/prime-factors/package.yaml +1 -1
  40. data/tracks/haskell/exercises/queen-attack/package.yaml +1 -1
  41. data/tracks/haskell/exercises/raindrops/package.yaml +1 -1
  42. data/tracks/haskell/exercises/rna-transcription/package.yaml +1 -1
  43. data/tracks/haskell/exercises/robot-simulator/package.yaml +1 -1
  44. data/tracks/haskell/exercises/run-length-encoding/package.yaml +1 -1
  45. data/tracks/haskell/exercises/run-length-encoding/test/Tests.hs +16 -0
  46. data/tracks/haskell/exercises/saddle-points/package.yaml +1 -1
  47. data/tracks/haskell/exercises/saddle-points/test/Tests.hs +8 -8
  48. data/tracks/haskell/exercises/say/package.yaml +1 -1
  49. data/tracks/haskell/exercises/scrabble-score/package.yaml +1 -1
  50. data/tracks/haskell/exercises/secret-handshake/package.yaml +1 -1
  51. data/tracks/haskell/exercises/sieve/package.yaml +1 -1
  52. data/tracks/haskell/exercises/space-age/package.yaml +1 -1
  53. data/tracks/haskell/exercises/sublist/package.yaml +1 -1
  54. data/tracks/haskell/exercises/sum-of-multiples/package.yaml +1 -1
  55. data/tracks/haskell/exercises/word-count/package.yaml +1 -1
  56. data/tracks/haskell/exercises/wordy/package.yaml +1 -1
  57. data/tracks/java/exercises/binary-search-tree/src/test/java/BSTTest.java +1 -1
  58. data/tracks/java/exercises/bracket-push/src/test/java/BracketCheckerTest.java +12 -12
  59. data/tracks/java/exercises/simple-linked-list/src/test/java/SimpleLinkedListTest.java +6 -6
  60. data/tracks/javascript/SETUP.md +6 -1
  61. data/tracks/javascript/exercises/hello-world/HINTS.md +2 -2
  62. data/tracks/ruby/exercises/phone-number/phone_number_test.rb +1 -1
  63. data/tracks/ruby/exercises/tournament/.meta/.version +1 -1
  64. data/tracks/ruby/exercises/tournament/example.rb +1 -1
  65. data/tracks/ruby/exercises/tournament/tournament_test.rb +118 -21
  66. data/tracks/ruby/lib/tasks/exercise.rb +1 -1
  67. data/tracks/ruby/test/tasks/exercise_test.rb +4 -2
  68. data/tracks/rust/exercises/acronym/Cargo.toml +1 -1
  69. data/tracks/rust/exercises/all-your-base/Cargo.toml +1 -1
  70. data/tracks/rust/exercises/allergies/Cargo.toml +1 -1
  71. data/tracks/rust/exercises/alphametics/Cargo.toml +1 -1
  72. data/tracks/rust/exercises/atbash-cipher/Cargo.toml +1 -1
  73. data/tracks/rust/exercises/bowling/Cargo.toml +1 -1
  74. data/tracks/rust/exercises/bracket-push/Cargo.toml +1 -1
  75. data/tracks/rust/exercises/custom-set/Cargo.toml +1 -1
  76. data/tracks/rust/exercises/dominoes/Cargo.toml +1 -1
  77. data/tracks/rust/exercises/gigasecond/Cargo.toml +1 -1
  78. data/tracks/rust/exercises/grains/Cargo.toml +1 -1
  79. data/tracks/rust/exercises/hello-world/Cargo.toml +1 -1
  80. data/tracks/rust/exercises/largest-series-product/Cargo.toml +1 -1
  81. data/tracks/rust/exercises/leap/Cargo.toml +1 -1
  82. data/tracks/rust/exercises/pascals-triangle/Cargo.toml +1 -1
  83. data/tracks/rust/exercises/queen-attack/Cargo.toml +1 -1
  84. data/tracks/rust/exercises/react/Cargo.toml +1 -1
  85. data/tracks/rust/exercises/robot-simulator/Cargo.toml +1 -1
  86. data/tracks/rust/exercises/roman-numerals/Cargo.toml +1 -1
  87. data/tracks/rust/exercises/rotational-cipher/Cargo.toml +1 -1
  88. data/tracks/rust/exercises/run-length-encoding/Cargo.lock +1 -1
  89. data/tracks/rust/exercises/run-length-encoding/Cargo.toml +1 -1
  90. data/tracks/rust/exercises/scrabble-score/Cargo.toml +1 -1
  91. data/tracks/rust/exercises/sieve/Cargo.toml +1 -1
  92. data/tracks/rust/exercises/space-age/Cargo.toml +1 -1
  93. data/tracks/rust/exercises/sum-of-multiples/Cargo.toml +1 -1
  94. data/tracks/rust/exercises/variable-length-quantity/Cargo.toml +1 -1
  95. data/tracks/rust/exercises/wordy/Cargo.toml +1 -1
  96. data/tracks/typescript/config.json +6 -1
  97. data/tracks/typescript/exercises/scrabble-score/package.json +36 -0
  98. data/tracks/typescript/exercises/scrabble-score/scrabble-score.example.ts +26 -0
  99. data/tracks/typescript/exercises/scrabble-score/scrabble-score.test.ts +16 -0
  100. data/tracks/typescript/exercises/scrabble-score/tsconfig.json +21 -0
  101. data/tracks/typescript/exercises/scrabble-score/tslint.json +127 -0
  102. data/tracks/typescript/exercises/scrabble-score/yarn.lock +2739 -0
  103. metadata +9 -10
  104. data/tracks/coq/exercises/hello-world/example.v +0 -3
  105. data/tracks/coq/exercises/hello-world/hello-world.v +0 -3
  106. data/tracks/coq/exercises/rna-transcription/DNA.v +0 -4
  107. data/tracks/coq/exercises/rna-transcription/example.v +0 -15
  108. data/tracks/coq/exercises/rna-transcription/rna-transcription.v +0 -5
  109. data/tracks/coq/exercises/tautology/description.md +0 -1
  110. data/tracks/coq/exercises/tautology/example.v +0 -4
  111. data/tracks/coq/exercises/tautology/tautology.v +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2a21bf8340d9ec5c5ee37ef6293c960edcb96a6
4
- data.tar.gz: 19888fea6477f6e3538950844ee946deb33040b1
3
+ metadata.gz: 7bf21708773b7e69a5c627e23fddf13eb4deb32b
4
+ data.tar.gz: a94d4506c17ab1f4b44296362d0ab68b3284eb54
5
5
  SHA512:
6
- metadata.gz: 7aa55c5be13d4c3a2795304620f184f8f05c98453d6dbe6af8da4f546af39fc836bb99cc5e694a5748563625e5ca86f19635906fd9072944ec9f5f4ebff81184
7
- data.tar.gz: 68715d7a0939dba01499480eca11259b3bb3b0497a35fc7b07dfeec70f8da13ec76489f6a41f6a58c07f7250b9f6710283075915eb400ea858dbd5fcc101324f
6
+ metadata.gz: 8797e7b61ed908b9eb0f7b1dc04c6bfbcfc73ea12f1be0c230a44ce65a2f03c69721c793277d761dc5d83260381fdc9353892e785b51edbb7b1fcaeddd2a51ff
7
+ data.tar.gz: ad58f41980127878ac216b207c2e5a6d5ff219fc14acc1ec4945df8111efc690519663837f396452612bd1d511d0958c58f3704f8797299ca60153c172071efd
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- unless system("bin/update")
4
- exit 1
5
- end
3
+ # unless system("bin/update")
4
+ # exit 1
5
+ # end
6
6
 
7
7
  file = File.absolute_path("../../lib/trackler/version.rb", __FILE__)
8
8
 
@@ -1,7 +1,6 @@
1
1
  # x-Common
2
2
 
3
3
  Shared metadata for Exercism exercises.
4
- The `doc/` subdirectory contains all documentation that is not specific to a language track.
5
4
 
6
5
  ## Contributing Guide
7
6
 
@@ -0,0 +1,124 @@
1
+ {
2
+ "exercise": "kindergarten-garden",
3
+ "version": "1.0.0",
4
+ "comments": [
5
+ "Garden can be created with just a diagram or a diagram and students."
6
+ ],
7
+ "cases": [
8
+ {
9
+ "description": "partial garden",
10
+ "cases": [
11
+ {
12
+ "description": "garden with single student",
13
+ "property": "plants",
14
+ "diagram": "RC\nGG",
15
+ "student": "Alice",
16
+ "expected": ["radishes", "clover", "grass", "grass"]
17
+ },
18
+ {
19
+ "description": "different garden with single student",
20
+ "property": "plants",
21
+ "diagram": "VC\nRC",
22
+ "student": "Alice",
23
+ "expected": ["violets", "clover", "radishes", "clover"]
24
+ },
25
+ {
26
+ "description": "garden with two students",
27
+ "property": "plants",
28
+ "diagram": "VVCG\nVVRC",
29
+ "student": "Bob",
30
+ "expected": ["clover", "grass", "radishes", "clover"]
31
+ },
32
+ {
33
+ "description": "multiple students for the same garden with three students",
34
+ "cases": [
35
+ {
36
+ "description": "second student's garden",
37
+ "property": "plants",
38
+ "diagram": "VVCCGG\nVVCCGG",
39
+ "student": "Bob",
40
+ "expected": ["clover", "clover", "clover", "clover"]
41
+ },
42
+ {
43
+ "description": "third student's garden",
44
+ "property": "plants",
45
+ "diagram": "VVCCGG\nVVCCGG",
46
+ "student": "Charlie",
47
+ "expected": ["grass", "grass", "grass", "grass"]
48
+ }
49
+ ]
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ "description": "full garden",
55
+ "cases": [
56
+ {
57
+ "description": "first student's garden",
58
+ "property": "plants",
59
+ "diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
60
+ "student": "Alice",
61
+ "expected": ["violets", "radishes", "violets", "radishes"]
62
+ },
63
+ {
64
+ "description": "second student's garden",
65
+ "property": "plants",
66
+ "diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
67
+ "student": "Bob",
68
+ "expected": ["clover", "grass", "clover", "clover"]
69
+ },
70
+ {
71
+ "description": "second to last student's garden",
72
+ "property": "plants",
73
+ "diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
74
+ "student": "Kincaid",
75
+ "expected": ["grass", "clover", "clover", "grass"]
76
+ },
77
+ {
78
+ "description": "last student's garden",
79
+ "property": "plants",
80
+ "diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
81
+ "student": "Larry",
82
+ "expected": ["grass", "violets", "clover", "violets"]
83
+ }
84
+ ]
85
+ },
86
+ {
87
+ "description": "non-alphabetical student list",
88
+ "cases": [
89
+ {
90
+ "description": "first student's garden",
91
+ "property": "plants",
92
+ "students": ["Samantha", "Patricia", "Xander", "Roger"],
93
+ "diagram": "VCRRGVRG\nRVGCCGCV",
94
+ "student": "Patricia",
95
+ "expected": ["violets", "clover", "radishes", "violets"]
96
+ },
97
+ {
98
+ "description": "second student's garden",
99
+ "property": "plants",
100
+ "students": ["Samantha", "Patricia", "Xander", "Roger"],
101
+ "diagram": "VCRRGVRG\nRVGCCGCV",
102
+ "student": "Roger",
103
+ "expected": ["radishes", "radishes", "grass", "clover"]
104
+ },
105
+ {
106
+ "description": "third student's garden",
107
+ "property": "plants",
108
+ "students": ["Samantha", "Patricia", "Xander", "Roger"],
109
+ "diagram": "VCRRGVRG\nRVGCCGCV",
110
+ "student": "Samantha",
111
+ "expected": ["grass", "violets", "clover", "grass"]
112
+ },
113
+ {
114
+ "description": "fourth (last) student's garden",
115
+ "property": "plants",
116
+ "students": ["Samantha", "Patricia", "Xander", "Roger"],
117
+ "diagram": "VCRRGVRG\nRVGCCGCV",
118
+ "student": "Xander",
119
+ "expected": ["radishes", "grass", "clover", "violets"]
120
+ }
121
+ ]
122
+ }
123
+ ]
124
+ }
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.1.0.10"
2
+ VERSION = "2.1.0.11"
3
3
  end
@@ -6,6 +6,8 @@ Exercism exercises in Coq.
6
6
 
7
7
  ## Setup
8
8
 
9
+
10
+
9
11
  There are 2 ways to insal Coq:
10
12
 
11
13
  1. [Recommened] Using OPAM package manger: https://coq.inria.fr/opam/www/using.html
@@ -41,11 +43,8 @@ We simulate Test-Driven Development (TDD) by implementing the tests in order of
41
43
 
42
44
  Test files should use the following format:
43
45
 
44
- ```Coq
45
- Theorem TautologyExercise: True.
46
- Proof.
47
- (* Add your proof here *)
48
- Qed.
46
+ ```
47
+ # include the body of an example test
49
48
  ```
50
49
 
51
50
  ## Submitting a Pull Request ##
@@ -66,13 +65,16 @@ Please keep the following in mind:
66
65
 
67
66
  ## Contributing a New Exercise ##
68
67
 
68
+ - All Exercism exercises must be defined in [x-common](https://github.com/exercism/x-common/tree/master/exercises) before they are implemented for a specific track. Please submit a PR there if your exercise is new to Exercism.
69
+
69
70
  - Please make sure the new exercise conforms to specifications in the [exercism/x-common](https://github.com/exercism/x-common) repo.
70
71
 
71
72
  - Each exercise must stand on its own. Do not reference files outside the exercise directory. They will not be included when the user fetches the exercise.
72
73
 
73
74
  - Exercises should use only the Coq core libraries.
74
75
 
75
- - Please do not add a README or README.md file to the exercise directory. The READMEs are constructed using shared metadata. Further explanation can be found in [fixing-exercise-readmes](https://github.com/exercism/exercism.io/blob/master/docs/fixing-exercise-readmes.md)
76
+ - Please do not add a README or README.md file to the exercise directory. The READMEs are constructed using shared metadata, which lives in the
77
+ [exercism/x-common](https://github.com/exercism/x-common) repository. Further explanation can be found in [fixing-exercise-readmes](https://github.com/exercism/exercism.io/blob/master/docs/fixing-exercise-readmes.md)
76
78
 
77
79
  - Each exercise should have a test suite, an example solution, a template file for the real implementation and ... (anything else that needs to go with each exercise for this track). The CI build expects files to be named using the following convention: (describe the Coq convention for naming the various files that make up an exercise).
78
80
 
@@ -1,5 +1,5 @@
1
1
  name: all-your-base
2
- version: 0.9.0.1 # 2016-06-29
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -1,5 +1,5 @@
1
1
  name: allergies
2
- version: 0.9.0.1 # 2016-08-01
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -1,5 +1,5 @@
1
1
  name: alphametics
2
- version: 0.9.0.1 # 2016-10-26
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -1,5 +1,5 @@
1
1
  name: anagram
2
- version: 0.9.0.1 # 2016-10-26
2
+ version: 1.0.1.3
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -46,7 +46,7 @@ cases = [ Case { description = "no matches"
46
46
  , candidates = ["eagle"]
47
47
  , expected = []
48
48
  }
49
- , Case { description = "detects multiple anagrams"
49
+ , Case { description = "detects two anagrams"
50
50
  , subject = "master"
51
51
  , candidates = ["stream", "pigeon", "maters"]
52
52
  , expected = ["stream", "maters"]
@@ -61,7 +61,7 @@ cases = [ Case { description = "no matches"
61
61
  , candidates = ["enlists", "google", "inlets", "banana"]
62
62
  , expected = ["inlets"]
63
63
  }
64
- , Case { description = "detects multiple anagrams"
64
+ , Case { description = "detects three anagrams"
65
65
  , subject = "allergy"
66
66
  , candidates = ["gallery", "ballerina", "regally", "clergy", "largely", "leading"]
67
67
  , expected = ["gallery", "regally", "largely"]
@@ -1,5 +1,5 @@
1
1
  name: atbash-cipher
2
- version: 0.9.0.1 # 2017-02-01
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -1,5 +1,5 @@
1
1
  name: bob
2
- version: 0.9.0.1 # 2016-11-29
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -1,5 +1,5 @@
1
1
  name: change
2
- version: 0.9.0.1 # 2016-09-17
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -52,6 +52,11 @@ cases = [ Case { description = "single coin change"
52
52
  , target = 999
53
53
  , expected = Just [2, 2, 5, 20, 20, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100]
54
54
  }
55
+ , Case { description = "possible change without unit coins available"
56
+ , coins = [2, 5, 10, 20, 50]
57
+ , target = 21
58
+ , expected = Just [2, 2, 2, 5, 10]
59
+ }
55
60
  , Case { description = "no coins make 0 change"
56
61
  , coins = [1, 5, 10, 21, 25]
57
62
  , target = 0
@@ -62,6 +67,11 @@ cases = [ Case { description = "single coin change"
62
67
  , target = 3
63
68
  , expected = Nothing
64
69
  }
70
+ , Case { description = "error if no combination can add up to target"
71
+ , coins = [5, 10]
72
+ , target = 94
73
+ , expected = Nothing
74
+ }
65
75
  , Case { description = "cannot find negative change values"
66
76
  , coins = [1, 2, 5]
67
77
  , target = -5
@@ -1,5 +1,5 @@
1
1
  name: clock
2
- version: 0.9.0.1 # 2016-03-29
2
+ version: 1.0.1.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -1,5 +1,5 @@
1
1
  name: connect
2
- version: 0.9.0.1 # 2016-09-16
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -1,5 +1,5 @@
1
1
  name: custom-set
2
- version: 0.9.0.1 # 2016-09-03
2
+ version: 1.0.1.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -1,5 +1,5 @@
1
1
  name: difference-of-squares
2
- version: 0.9.0.1 # 2016-08-03
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -1,5 +1,5 @@
1
1
  name: dominoes
2
- version: 0.9.0.1 # 2016-11-11
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -1,5 +1,5 @@
1
1
  name: etl
2
- version: 0.9.0.1 # 2017-01-31
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -1,5 +1,5 @@
1
1
  name: forth
2
- version: 0.9.0.1 # 2017-02-01
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -1,5 +1,5 @@
1
1
  name: grains
2
- version: 0.9.0.1 # 2016-11-06
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -1,5 +1,5 @@
1
1
  name: hamming
2
- version: 0.9.0.1 # 2016-07-12
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -1,5 +1,5 @@
1
1
  name: hello-world
2
- version: 0.1.0.1
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -1,5 +1,5 @@
1
1
  name: kindergarten-garden
2
- version: 0.1.0.1
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -18,21 +18,21 @@ main = hspecWith defaultConfig {configFastFail = True} specs
18
18
  specs :: Spec
19
19
  specs = describe "kindergarten-garden" $ do
20
20
 
21
- it "alice tests" $ do
21
+ it "garden with single student" $ do
22
22
 
23
23
  let alicePlants = lookupPlants "Alice" . defaultGarden
24
24
 
25
25
  alicePlants "RC\nGG" `shouldBe` [ Radishes, Clover, Grass , Grass ]
26
26
  alicePlants "VC\nRC" `shouldBe` [ Violets , Clover, Radishes, Clover ]
27
27
 
28
- it "small garden" $ do
28
+ it "garden with two students" $ do
29
29
 
30
30
  let plants s = lookupPlants s $ defaultGarden plantList
31
31
  plantList = "VVCG\nVVRC"
32
32
 
33
33
  plants "Bob" `shouldBe` [ Clover, Grass, Radishes, Clover ]
34
34
 
35
- it "medium garden" $ do
35
+ it "garden with three students" $ do
36
36
 
37
37
  let plants s = lookupPlants s $ defaultGarden plantList
38
38
  plantList = "VVCCGG\nVVCCGG"
@@ -47,18 +47,10 @@ specs = describe "kindergarten-garden" $ do
47
47
 
48
48
  plants "Alice" `shouldBe` [ Violets , Radishes, Violets , Radishes ]
49
49
  plants "Bob" `shouldBe` [ Clover , Grass , Clover , Clover ]
50
- plants "Charlie" `shouldBe` [ Violets , Violets , Clover , Grass ]
51
- plants "David" `shouldBe` [ Radishes, Violets , Clover , Radishes ]
52
- plants "Eve" `shouldBe` [ Clover , Grass , Radishes, Grass ]
53
- plants "Fred" `shouldBe` [ Grass , Clover , Violets , Clover ]
54
- plants "Ginny" `shouldBe` [ Clover , Grass , Grass , Clover ]
55
- plants "Harriet" `shouldBe` [ Violets , Radishes, Radishes, Violets ]
56
- plants "Ileana" `shouldBe` [ Grass , Clover , Violets , Clover ]
57
- plants "Joseph" `shouldBe` [ Violets , Clover , Violets , Grass ]
58
50
  plants "Kincaid" `shouldBe` [ Grass , Clover , Clover , Grass ]
59
51
  plants "Larry" `shouldBe` [ Grass , Violets , Clover , Violets ]
60
52
 
61
- it "surprise garden" $ do
53
+ it "non-alphabetical student list" $ do
62
54
 
63
55
  let plants s = lookupPlants s $ garden students plantList
64
56
  plantList = "VCRRGVRG\nRVGCCGCV"
@@ -1,5 +1,5 @@
1
1
  name: largest-series-product
2
- version: 0.9.0.1 # 2016-07-27
2
+ version: 1.0.0.2
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -13,6 +13,10 @@ specs = describe "largest-series-product" $
13
13
 
14
14
  describe "largestProduct" $ do
15
15
 
16
+ it "finds the largest product if span equals length" $
17
+ largestProduct 2 "29"
18
+ `shouldBe` Just 18
19
+
16
20
  it "can find the largest product of 2 with numbers in order" $
17
21
  largestProduct 2 "0123456789"
18
22
  `shouldBe` Just 72
@@ -21,10 +25,6 @@ specs = describe "largest-series-product" $
21
25
  largestProduct 2 "576802143"
22
26
  `shouldBe` Just 48
23
27
 
24
- it "finds the largest product if span equals length" $
25
- largestProduct 2 "29"
26
- `shouldBe` Just 18
27
-
28
28
  it "can find the largest product of 3 with numbers in order" $
29
29
  largestProduct 3 "0123456789"
30
30
  `shouldBe` Just 504
@@ -41,33 +41,6 @@ specs = describe "largest-series-product" $
41
41
  largestProduct 6 "73167176531330624919225119674426574742355349194934"
42
42
  `shouldBe` Just 23520
43
43
 
44
- it "can get the largest product of a big number II" $
45
- largestProduct 6 "52677741234314237566414902593461595376319419139427"
46
- `shouldBe` Just 28350
47
-
48
- it "can get the largest product of a big number (Project Euler)" $
49
- largestProduct 13 "73167176531330624919225119674426574742355349194934\
50
- \96983520312774506326239578318016984801869478851843\
51
- \85861560789112949495459501737958331952853208805511\
52
- \12540698747158523863050715693290963295227443043557\
53
- \66896648950445244523161731856403098711121722383113\
54
- \62229893423380308135336276614282806444486645238749\
55
- \30358907296290491560440772390713810515859307960866\
56
- \70172427121883998797908792274921901699720888093776\
57
- \65727333001053367881220235421809751254540594752243\
58
- \52584907711670556013604839586446706324415722155397\
59
- \53697817977846174064955149290862569321978468622482\
60
- \83972241375657056057490261407972968652414535100474\
61
- \82166370484403199890008895243450658541227588666881\
62
- \16427171479924442928230863465674813919123162824586\
63
- \17866458359124566529476545682848912883142607690042\
64
- \24219022671055626321111109370544217506941658960408\
65
- \07198403850962455444362981230987879927244284909188\
66
- \84580156166097919133875499200524063689912560717606\
67
- \05886116467109405077541002256983155200055935729725\
68
- \71636269561882670428252483600823257530420752963450"
69
- `shouldBe` Just 23514624000
70
-
71
44
  it "reports zero if the only digits are zero" $
72
45
  largestProduct 2 "0000"
73
46
  `shouldBe` Just 0