trackler 2.0.8.18 → 2.0.8.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/common/.gitignore +1 -0
- data/common/.travis.yml +5 -8
- data/common/README.md +18 -5
- data/common/exercises/grep/canonical-data.json +290 -269
- data/common/exercises/phone-number/canonical-data.json +2 -2
- data/common/exercises/pov/canonical-data.json +2 -5
- data/common/exercises/roman-numerals/canonical-data.json +112 -74
- data/common/exercises/tournament/canonical-data.json +86 -85
- data/common/exercises/two-bucket/canonical-data.json +55 -47
- data/common/package.json +16 -0
- data/common/yarn.lock +195 -0
- data/lib/trackler/version.rb +1 -1
- data/tracks/c/docs/LEARNING.md +1 -1
- data/tracks/c/exercises/space-age/src/example.c +15 -47
- data/tracks/c/exercises/space-age/src/example.h +12 -8
- data/tracks/c/exercises/space-age/test/test_space_age.c +8 -8
- data/tracks/ceylon/docs/TESTS.md +5 -2
- data/tracks/ceylon/exercises/TRACK_HINTS.md +5 -2
- data/tracks/csharp/.gitignore +0 -4
- data/tracks/csharp/.travis.yml +9 -20
- data/tracks/csharp/appveyor.yml +2 -4
- data/tracks/csharp/build.cake +95 -0
- data/tracks/csharp/build.ps1 +189 -0
- data/tracks/csharp/build.sh +99 -31
- data/tracks/csharp/circle.yml +3 -12
- data/tracks/delphi/config.json +8 -0
- data/tracks/delphi/exercises/minesweeper/MineSweeper.dpr +60 -0
- data/tracks/delphi/exercises/minesweeper/uMineSweeperExample.pas +70 -0
- data/tracks/delphi/exercises/minesweeper/uMineSweeperTest.pas +270 -0
- data/tracks/dlang/config.json +86 -31
- data/tracks/elixir/config.json +7 -0
- data/tracks/elixir/exercises/rotational-cipher/example.exs +35 -0
- data/tracks/elixir/exercises/rotational-cipher/rotational_cipher.exs +13 -0
- data/tracks/elixir/exercises/rotational-cipher/rotational_cipher_test.exs +80 -0
- data/tracks/go/exercises/raindrops/raindrops_test.go +4 -1
- data/tracks/go/exercises/react/react_test.go +6 -8
- data/tracks/go/exercises/rna-transcription/rna_transcription_test.go +4 -1
- data/tracks/go/exercises/robot-simulator/robot_simulator_test.go +5 -2
- data/tracks/haskell/exercises/allergies/src/Allergies.hs +2 -2
- data/tracks/haskell/exercises/atbash-cipher/src/Atbash.hs +2 -2
- data/tracks/haskell/exercises/bank-account/src/BankAccount.hs +3 -3
- data/tracks/haskell/exercises/binary-search-tree/src/BST.hs +7 -7
- data/tracks/haskell/exercises/bowling/src/Bowling.hs +1 -1
- data/tracks/haskell/exercises/clock/src/Clock.hs +4 -4
- data/tracks/haskell/exercises/connect/src/Connect.hs +1 -1
- data/tracks/haskell/exercises/crypto-square/src/CryptoSquare.hs +1 -1
- data/tracks/haskell/exercises/custom-set/src/CustomSet.hs +12 -12
- data/tracks/haskell/exercises/difference-of-squares/src/Squares.hs +3 -3
- data/tracks/haskell/exercises/etl/src/ETL.hs +1 -1
- data/tracks/haskell/exercises/forth/src/Forth.hs +2 -2
- data/tracks/haskell/exercises/go-counting/src/Counting.hs +2 -2
- data/tracks/haskell/exercises/kindergarten-garden/src/Garden.hs +3 -3
- data/tracks/haskell/exercises/largest-series-product/src/Series.hs +1 -1
- data/tracks/haskell/exercises/lens-person/src/Person.hs +4 -4
- data/tracks/julia/.travis.yml +3 -2
- data/tracks/ocaml/exercises/all-your-base/test.ml +2 -2
- data/tracks/ocaml/exercises/beer-song/test.ml +25 -24
- data/tracks/ocaml/exercises/phone-number/test.ml +22 -22
- data/tracks/ocaml/exercises/run-length-encoding/test.ml +5 -5
- data/tracks/ocaml/exercises/word-count/test.ml +1 -1
- data/tracks/ocaml/tools/test-generator/templates/beer-song/template.ml +20 -1
- data/tracks/purescript/config.json +7 -0
- data/tracks/purescript/exercises/word-count/bower.json +17 -0
- data/tracks/purescript/exercises/word-count/examples/src/WordCount.purs +31 -0
- data/tracks/purescript/exercises/word-count/src/WordCount.purs +3 -0
- data/tracks/purescript/exercises/word-count/test/Main.purs +89 -0
- data/tracks/python/exercises/accumulate/accumulate.py +2 -0
- data/tracks/python/exercises/acronym/acronym.py +2 -0
- data/tracks/python/exercises/allergies/allergies.py +3 -0
- data/tracks/python/exercises/allergies/example.py +1 -1
- data/tracks/python/exercises/anagram/anagram.py +2 -0
- data/tracks/python/exercises/atbash-cipher/atbash_cipher.py +6 -0
- data/tracks/python/exercises/beer-song/beer_song.py +6 -0
- data/tracks/python/exercises/binary-search/binary_search.py +2 -0
- data/tracks/python/exercises/binary/binary.py +2 -0
- data/tracks/python/exercises/bob/bob.py +2 -8
- data/tracks/python/exercises/bracket-push/bracket_push.py +2 -0
- data/tracks/python/exercises/circular-buffer/circular_buffer.py +11 -0
- data/tracks/python/exercises/clock/clock.py +3 -0
- data/tracks/python/exercises/clock/example.py +1 -1
- data/tracks/python/exercises/crypto-square/crypto_square.py +2 -0
- data/tracks/python/exercises/diamond/diamond.py +2 -0
- data/tracks/python/exercises/difference-of-squares/difference_of_squares.py +10 -0
- data/tracks/python/exercises/etl/etl.py +2 -0
- data/tracks/python/exercises/flatten-array/flatten_array.py +2 -0
- data/tracks/python/exercises/gigasecond/gigasecond.py +2 -0
- data/tracks/python/exercises/grade-school/grade_school.py +3 -0
- data/tracks/python/exercises/grains/grains.py +6 -0
- data/tracks/python/exercises/hamming/hamming.py +2 -0
- data/tracks/python/exercises/hello-world/hello_world.py +2 -7
- data/tracks/python/exercises/hexadecimal/hexadecimal.py +2 -0
- data/tracks/python/exercises/house/house.py +6 -0
- data/tracks/python/exercises/kindergarten-garden/kindergarten_garden.py +3 -0
- data/tracks/python/exercises/largest-series-product/largest_series_product.py +2 -0
- data/tracks/python/exercises/leap/leap.py +2 -0
- data/tracks/python/exercises/linked-list/linked_list.py +2 -8
- data/tracks/python/exercises/list-ops/list_ops.py +18 -22
- data/tracks/python/exercises/luhn/luhn.py +3 -0
- data/tracks/python/exercises/matrix/matrix.py +3 -0
- data/tracks/python/exercises/meetup/meetup.py +2 -0
- data/tracks/python/exercises/minesweeper/minesweeper.py +2 -0
- data/tracks/python/exercises/nth-prime/nth_prime.py +2 -0
- data/tracks/python/exercises/nucleotide-count/nucleotide_count.py +6 -0
- data/tracks/python/exercises/ocr-numbers/ocr_numbers.py +6 -0
- data/tracks/python/exercises/ocr-numbers/{ocr_test.py → ocr_numbers_test.py} +0 -0
- data/tracks/python/exercises/octal/octal.py +2 -0
- data/tracks/python/exercises/palindrome-products/palindrome_products.py +6 -0
- data/tracks/python/exercises/pangram/pangram.py +2 -0
- data/tracks/python/exercises/pascals-triangle/pascals_triangle.py +10 -0
- data/tracks/python/exercises/perfect-numbers/perfect_numbers.py +6 -0
- data/tracks/python/exercises/phone-number/phone_number.py +3 -0
- data/tracks/python/exercises/pig-latin/pig_latin.py +2 -0
- data/tracks/python/exercises/point-mutations/point_mutations.py +2 -0
- data/tracks/python/exercises/poker/poker.py +2 -0
- data/tracks/python/exercises/prime-factors/prime_factors.py +2 -0
- data/tracks/python/exercises/proverb/proverb.py +2 -0
- data/tracks/python/exercises/pythagorean-triplet/pythagorean_triplet.py +10 -0
- data/tracks/python/exercises/queen-attack/queen_attack.py +6 -0
- data/tracks/python/exercises/rail-fence-cipher/rail_fence_cipher.py +10 -0
- data/tracks/python/exercises/raindrops/raindrops.py +2 -0
- data/tracks/python/exercises/rectangles/example.py +1 -1
- data/tracks/python/exercises/rectangles/rectangles.py +2 -0
- data/tracks/python/exercises/rectangles/{rectangles_count_test.py → rectangles_test.py} +0 -0
- data/tracks/python/exercises/rna-transcription/rna_transcription.py +2 -0
- data/tracks/python/exercises/robot-name/robot_name.py +3 -0
- data/tracks/python/exercises/robot-simulator/robot_simulator.py +3 -0
- data/tracks/python/exercises/roman-numerals/roman_numerals.py +2 -0
- data/tracks/python/exercises/run-length-encoding/run_length_encoding.py +6 -0
- data/tracks/python/exercises/run-length-encoding/{run_length_test.py → run_length_encoding_test.py} +1 -1
- data/tracks/python/exercises/saddle-points/saddle_points.py +2 -0
- data/tracks/python/exercises/say/example.py +1 -1
- data/tracks/python/exercises/say/say.py +2 -0
- data/tracks/python/exercises/say/say_test.py +3 -0
- data/tracks/python/exercises/scrabble-score/scrabble_score.py +2 -0
- data/tracks/python/exercises/secret-handshake/secret_handshake.py +6 -0
- data/tracks/python/exercises/secret-handshake/{handshake_test.py → secret_handshake_test.py} +0 -0
- data/tracks/python/exercises/series/series.py +2 -0
- data/tracks/python/exercises/sieve/sieve.py +2 -0
- data/tracks/python/exercises/simple-cipher/example.py +1 -1
- data/tracks/python/exercises/simple-cipher/simple_cipher.py +8 -0
- data/tracks/python/exercises/space-age/space_age.py +3 -0
- data/tracks/python/exercises/strain/strain.py +6 -0
- data/tracks/python/exercises/sublist/sublist.py +2 -0
- data/tracks/python/exercises/sum-of-multiples/sum_of_multiples.py +2 -0
- data/tracks/python/exercises/triangle/triangle.py +7 -0
- data/tracks/python/exercises/trinary/trinary.py +2 -0
- data/tracks/python/exercises/twelve-days/twelve_days.py +10 -0
- data/tracks/python/exercises/word-count/word_count.py +2 -0
- data/tracks/python/exercises/wordy/wordy.py +2 -0
- data/tracks/python/exercises/zebra-puzzle/zebra_puzzle.py +2 -0
- data/tracks/ruby/exercises/beer-song/.meta/.version +1 -0
- data/tracks/ruby/exercises/beer-song/beer_song_test.rb +62 -36
- data/tracks/ruby/exercises/beer-song/example.rb +1 -5
- data/tracks/ruby/exercises/beer-song/example.tt +22 -0
- data/tracks/ruby/lib/beer_song_cases.rb +43 -0
- data/tracks/swift/exercises/matrix/Tests/MatrixTests/MatrixTests.swift +1 -1
- metadata +94 -13
- data/common/bin/jsonlint +0 -27
- data/tracks/csharp/.paket/paket.bootstrapper.exe +0 -0
- data/tracks/csharp/Zipper.cs +0 -137
- data/tracks/csharp/build.cmd +0 -14
- data/tracks/csharp/build.fsx +0 -78
- data/tracks/csharp/paket.dependencies +0 -2
- data/tracks/csharp/paket.lock +0 -3
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"exercise": "phone-number",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.1",
|
4
4
|
"cases": [
|
5
5
|
{
|
6
6
|
"description": "Cleanup user-entered phone numbers",
|
@@ -47,7 +47,7 @@
|
|
47
47
|
"expected": "1234567890"
|
48
48
|
},
|
49
49
|
{
|
50
|
-
"description": "invalid when
|
50
|
+
"description": "invalid when more than 11 digits",
|
51
51
|
"property": "clean",
|
52
52
|
"phrase": "321234567890",
|
53
53
|
"expected": null
|
@@ -1,11 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"exercise": "pov",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.1",
|
4
4
|
"cases": [{
|
5
5
|
"description": "Reroot a tree so that its root is the specified node.",
|
6
6
|
"comments": [
|
7
7
|
"In this way, the tree is presented from the point of view of the specified node.",
|
8
|
-
"The input trees used here are those in the `trees` section of this file.",
|
9
8
|
"",
|
10
9
|
"If appropriate for your track, you may test that the input tree is not modified.",
|
11
10
|
"",
|
@@ -308,9 +307,7 @@
|
|
308
307
|
"comments": [
|
309
308
|
"A typical implementation would first reroot the tree on one of the two nodes.",
|
310
309
|
"",
|
311
|
-
"If appropriate for your track, you may test that the input tree is not modified."
|
312
|
-
"",
|
313
|
-
"The trees used here are those in the `trees` section of this file."
|
310
|
+
"If appropriate for your track, you may test that the input tree is not modified."
|
314
311
|
],
|
315
312
|
"cases": [
|
316
313
|
{
|
@@ -1,76 +1,114 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
2
|
+
"exercise": "roman-numerals",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"cases": [
|
5
|
+
{
|
6
|
+
"description": "1 is a single I",
|
7
|
+
"property": "roman",
|
8
|
+
"number": 1,
|
9
|
+
"expected": "I"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"description": "2 is two I's",
|
13
|
+
"property": "roman",
|
14
|
+
"number": 2,
|
15
|
+
"expected": "II"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"description": "3 is three I's",
|
19
|
+
"property": "roman",
|
20
|
+
"number": 3,
|
21
|
+
"expected": "III"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"description": "4, being 5 - 1, is IV",
|
25
|
+
"property": "roman",
|
26
|
+
"number": 4,
|
27
|
+
"expected": "IV"
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"description": "5 is a single V",
|
31
|
+
"property": "roman",
|
32
|
+
"number": 5,
|
33
|
+
"expected": "V"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"description": "6, being 5 + 1, is VI",
|
37
|
+
"property": "roman",
|
38
|
+
"number": 6,
|
39
|
+
"expected": "VI"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"description": "9, being 10 - 1, is IX",
|
43
|
+
"property": "roman",
|
44
|
+
"number": 9,
|
45
|
+
"expected": "IX"
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"description": "20 is two X's",
|
49
|
+
"property": "roman",
|
50
|
+
"number": 27,
|
51
|
+
"expected": "XXVII"
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"description": "48 is not 50 - 2 but rather 40 + 8",
|
55
|
+
"property": "roman",
|
56
|
+
"number": 48,
|
57
|
+
"expected": "XLVIII"
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"description": "50 is a single L",
|
61
|
+
"property": "roman",
|
62
|
+
"number": 59,
|
63
|
+
"expected": "LIX"
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"description": "90, being 100 - 10, is XC",
|
67
|
+
"property": "roman",
|
68
|
+
"number": 93,
|
69
|
+
"expected": "XCIII"
|
70
|
+
},
|
71
|
+
{
|
72
|
+
"description": "100 is a single C",
|
73
|
+
"property": "roman",
|
74
|
+
"number": 141,
|
75
|
+
"expected": "CXLI"
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"description": "60, being 50 + 10, is LX",
|
79
|
+
"property": "roman",
|
80
|
+
"number": 163,
|
81
|
+
"expected": "CLXIII"
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"description": "400, being 500 - 100, is CD",
|
85
|
+
"property": "roman",
|
86
|
+
"number": 402,
|
87
|
+
"expected": "CDII"
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"description": "500 is a single D",
|
91
|
+
"property": "roman",
|
92
|
+
"number": 575,
|
93
|
+
"expected": "DLXXV"
|
94
|
+
},
|
95
|
+
{
|
96
|
+
"description": "900, being 1000 - 100, is CM",
|
97
|
+
"property": "roman",
|
98
|
+
"number": 911,
|
99
|
+
"expected": "CMXI"
|
100
|
+
},
|
101
|
+
{
|
102
|
+
"description": "1000 is a single M",
|
103
|
+
"property": "roman",
|
104
|
+
"number": 1024,
|
105
|
+
"expected": "MXXIV"
|
106
|
+
},
|
107
|
+
{
|
108
|
+
"description": "3000 is three M's",
|
109
|
+
"property": "roman",
|
110
|
+
"number": 3000,
|
111
|
+
"expected": "MMM"
|
112
|
+
}
|
113
|
+
]
|
76
114
|
}
|
@@ -1,88 +1,89 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
|
4
|
-
|
5
|
-
"
|
2
|
+
"exercise": "tournament",
|
3
|
+
"version": "1.1.0",
|
4
|
+
"comments": [
|
5
|
+
"The inputs and outputs are represented as arrays of strings to",
|
6
|
+
"improve readability in this JSON file.",
|
7
|
+
"Your track may choose whether to present the input as a single",
|
8
|
+
"string (concatenating all the lines) or as the list.",
|
9
|
+
"In most cases, it seems to make sense to expect the output as",
|
10
|
+
"a single string."
|
6
11
|
],
|
7
|
-
"
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
"
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
"
|
72
|
-
"
|
73
|
-
|
74
|
-
|
75
|
-
"
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
"
|
80
|
-
"
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
"input": "Devastating Donkeys;Allegoric Alaskans;dra"
|
85
|
-
}
|
86
|
-
]
|
87
|
-
}
|
12
|
+
"cases": [
|
13
|
+
{
|
14
|
+
"description": "typical input",
|
15
|
+
"property": "tally",
|
16
|
+
"input": [
|
17
|
+
"Allegoric Alaskans;Blithering Badgers;win",
|
18
|
+
"Devastating Donkeys;Courageous Californians;draw",
|
19
|
+
"Devastating Donkeys;Allegoric Alaskans;win",
|
20
|
+
"Courageous Californians;Blithering Badgers;loss",
|
21
|
+
"Blithering Badgers;Devastating Donkeys;loss",
|
22
|
+
"Allegoric Alaskans;Courageous Californians;win"
|
23
|
+
],
|
24
|
+
"expected": [
|
25
|
+
"Team | MP | W | D | L | P",
|
26
|
+
"Devastating Donkeys | 3 | 2 | 1 | 0 | 7",
|
27
|
+
"Allegoric Alaskans | 3 | 2 | 0 | 1 | 6",
|
28
|
+
"Blithering Badgers | 3 | 1 | 0 | 2 | 3",
|
29
|
+
"Courageous Californians | 3 | 0 | 1 | 2 | 1"
|
30
|
+
]
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"description": "incomplete competition (not all pairs have played)",
|
34
|
+
"property": "tally",
|
35
|
+
"input": [
|
36
|
+
"Allegoric Alaskans;Blithering Badgers;loss",
|
37
|
+
"Devastating Donkeys;Allegoric Alaskans;loss",
|
38
|
+
"Courageous Californians;Blithering Badgers;draw",
|
39
|
+
"Allegoric Alaskans;Courageous Californians;win"
|
40
|
+
],
|
41
|
+
"expected": [
|
42
|
+
"Team | MP | W | D | L | P",
|
43
|
+
"Allegoric Alaskans | 3 | 2 | 0 | 1 | 6",
|
44
|
+
"Blithering Badgers | 2 | 1 | 1 | 0 | 4",
|
45
|
+
"Courageous Californians | 2 | 0 | 1 | 1 | 1",
|
46
|
+
"Devastating Donkeys | 1 | 0 | 0 | 1 | 0"
|
47
|
+
]
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"description": "ties broken alphabetically",
|
51
|
+
"property": "tally",
|
52
|
+
"input": [
|
53
|
+
"Courageous Californians;Devastating Donkeys;win",
|
54
|
+
"Allegoric Alaskans;Blithering Badgers;win",
|
55
|
+
"Devastating Donkeys;Allegoric Alaskans;loss",
|
56
|
+
"Courageous Californians;Blithering Badgers;win",
|
57
|
+
"Blithering Badgers;Devastating Donkeys;draw",
|
58
|
+
"Allegoric Alaskans;Courageous Californians;draw"
|
59
|
+
],
|
60
|
+
"expected": [
|
61
|
+
"Team | MP | W | D | L | P",
|
62
|
+
"Allegoric Alaskans | 3 | 2 | 1 | 0 | 7",
|
63
|
+
"Courageous Californians | 3 | 2 | 1 | 0 | 7",
|
64
|
+
"Blithering Badgers | 3 | 0 | 1 | 2 | 1",
|
65
|
+
"Devastating Donkeys | 3 | 0 | 1 | 2 | 1"
|
66
|
+
]
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"comments": [
|
70
|
+
"Invalid input lines in an otherwise-valid game",
|
71
|
+
"still results in valid output."
|
72
|
+
],
|
73
|
+
"description": "mostly invalid lines",
|
74
|
+
"property": "tally",
|
75
|
+
"input": [
|
76
|
+
"",
|
77
|
+
"Allegoric Alaskans@Blithering Badgers;draw",
|
78
|
+
"Blithering Badgers;Devastating Donkeys;loss",
|
79
|
+
"Devastating Donkeys;Courageous Californians;win;5",
|
80
|
+
"Courageous Californians;Allegoric Alaskans;los"
|
81
|
+
],
|
82
|
+
"expected": [
|
83
|
+
"Team | MP | W | D | L | P",
|
84
|
+
"Devastating Donkeys | 1 | 1 | 0 | 0 | 3",
|
85
|
+
"Blithering Badgers | 1 | 0 | 0 | 1 | 0"
|
86
|
+
]
|
87
|
+
}
|
88
|
+
]
|
88
89
|
}
|
@@ -1,50 +1,58 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
2
|
+
"exercise": "two-bucket",
|
3
|
+
"version": "1.0.1",
|
4
|
+
"cases": [
|
5
|
+
{
|
6
|
+
"description": "Measure using bucket one of size 3 and bucket two of size 5 - start with bucket one",
|
7
|
+
"property": "measure",
|
8
|
+
"bucket_one": 3,
|
9
|
+
"bucket_two": 5,
|
10
|
+
"goal": 1,
|
11
|
+
"start_bucket": "one",
|
12
|
+
"expected": {
|
13
|
+
"moves": 4,
|
14
|
+
"goal_bucket": "one",
|
15
|
+
"other_bucket": 5
|
16
|
+
}
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"description": "Measure using bucket one of size 3 and bucket two of size 5 - start with bucket two",
|
20
|
+
"property": "measure",
|
21
|
+
"bucket_one": 3,
|
22
|
+
"bucket_two": 5,
|
23
|
+
"goal": 1,
|
24
|
+
"start_bucket": "two",
|
25
|
+
"expected": {
|
26
|
+
"moves": 8,
|
27
|
+
"goal_bucket": "two",
|
28
|
+
"other_bucket": 3
|
29
|
+
}
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"description": "Measure using bucket one of size 7 and bucket two of size 11 - start with bucket one",
|
33
|
+
"property": "measure",
|
34
|
+
"bucket_one": 7,
|
35
|
+
"bucket_two": 11,
|
36
|
+
"goal": 2,
|
37
|
+
"start_bucket": "one",
|
38
|
+
"expected": {
|
39
|
+
"moves": 14,
|
40
|
+
"goal_bucket": "one",
|
41
|
+
"other_bucket": 11
|
42
|
+
}
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"description": "Measure using bucket one of size 7 and bucket two of size 11 - start with bucket two",
|
46
|
+
"property": "measure",
|
47
|
+
"bucket_one": 7,
|
48
|
+
"bucket_two": 11,
|
49
|
+
"goal": 2,
|
50
|
+
"start_bucket": "two",
|
51
|
+
"expected": {
|
52
|
+
"moves": 18,
|
53
|
+
"goal_bucket": "two",
|
54
|
+
"other_bucket": 7
|
55
|
+
}
|
49
56
|
}
|
57
|
+
]
|
50
58
|
}
|