trackler 2.0.8.17 → 2.0.8.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/forth/canonical-data.json +307 -321
  3. data/common/exercises/largest-series-product/canonical-data.json +139 -122
  4. data/common/exercises/list-ops/canonical-data.json +162 -141
  5. data/common/exercises/markdown/canonical-data.json +15 -14
  6. data/common/exercises/pov/canonical-data.json +264 -116
  7. data/common/exercises/prime-factors/canonical-data.json +51 -40
  8. data/common/exercises/rail-fence-cipher/canonical-data.json +56 -44
  9. data/common/exercises/react/canonical-data.json +18 -4
  10. data/common/exercises/rectangles/canonical-data.json +16 -1
  11. data/common/exercises/rotational-cipher/canonical-data.json +81 -67
  12. data/common/exercises/run-length-encoding/canonical-data.json +89 -71
  13. data/common/exercises/space-age/canonical-data.json +61 -45
  14. data/common/exercises/sublist/canonical-data.json +136 -99
  15. data/common/exercises/transpose/canonical-data.json +207 -194
  16. data/common/exercises/variable-length-quantity/canonical-data.json +171 -141
  17. data/lib/trackler/version.rb +1 -1
  18. data/tracks/csharp/exercises/diamond/HINTS.md +9 -0
  19. data/tracks/go/README.md +3 -0
  20. data/tracks/go/exercises/queen-attack/queen_attack_test.go +1 -1
  21. data/tracks/haskell/exercises/hamming/src/Hamming.hs +2 -1
  22. data/tracks/java/exercises/flatten-array/src/test/java/FlattenerTest.java +5 -0
  23. data/tracks/ocaml/exercises/anagram/test.ml +2 -2
  24. data/tracks/ocaml/tools/test-generator/src/controller.ml +7 -2
  25. data/tracks/ocaml/tools/test-generator/src/parser.ml +31 -18
  26. data/tracks/ocaml/tools/test-generator/src/template.ml +10 -8
  27. data/tracks/ocaml/tools/test-generator/src/utils.ml +11 -0
  28. data/tracks/ocaml/tools/test-generator/templates/phone-number/template.ml +4 -5
  29. data/tracks/ocaml/tools/test-generator/test/beer-song.json +77 -0
  30. data/tracks/ocaml/tools/test-generator/test/difference_of_squares.json +76 -62
  31. data/tracks/ocaml/tools/test-generator/test/parser_test.ml +11 -9
  32. data/tracks/ocaml/tools/test-generator/test/template_test.ml +2 -2
  33. metadata +4 -2
@@ -0,0 +1,77 @@
1
+ {
2
+ "exercise": "beer-song",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "description": "verse",
7
+ "cases": [
8
+ {
9
+ "description": "single verse",
10
+ "cases": [
11
+ {
12
+ "description": "first generic verse",
13
+ "property": "verse",
14
+ "number": 99,
15
+ "expected": "99 bottles of beer on the wall, 99 bottles of beer.\nTake one down and pass it around, 98 bottles of beer on the wall.\n"
16
+ },
17
+ {
18
+ "description": "last generic verse",
19
+ "property": "verse",
20
+ "number": 3,
21
+ "expected": "3 bottles of beer on the wall, 3 bottles of beer.\nTake one down and pass it around, 2 bottles of beer on the wall.\n"
22
+ },
23
+ {
24
+ "description": "verse 2",
25
+ "property": "verse",
26
+ "number": 2,
27
+ "expected": "2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n"
28
+ },
29
+ {
30
+ "description": "verse 1",
31
+ "property": "verse",
32
+ "number": 1,
33
+ "expected": "1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n"
34
+ },
35
+ {
36
+ "description": "verse 0",
37
+ "property": "verse",
38
+ "number": 0,
39
+ "expected": "No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n"
40
+ }
41
+ ]
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "description": "lyrics",
47
+ "cases": [
48
+ {
49
+ "description": "multiple verses",
50
+ "cases": [
51
+ {
52
+ "description": "first two verses",
53
+ "property": "verses",
54
+ "beginning": 99,
55
+ "end": 98,
56
+ "expected": "99 bottles of beer on the wall, 99 bottles of beer.\nTake one down and pass it around, 98 bottles of beer on the wall.\n\n98 bottles of beer on the wall, 98 bottles of beer.\nTake one down and pass it around, 97 bottles of beer on the wall.\n"
57
+ },
58
+ {
59
+ "description": "last three verses",
60
+ "property": "verses",
61
+ "beginning": 2,
62
+ "end": 0,
63
+ "expected": "2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n\n1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n"
64
+ },
65
+ {
66
+ "description": "all verses",
67
+ "property": "verses",
68
+ "beginning": 99,
69
+ "end": 0,
70
+ "expected": "99 bottles of beer on the wall, 99 bottles of beer.\nTake one down and pass it around, 98 bottles of beer on the wall.\n\n98 bottles of beer on the wall, 98 bottles of beer.\nTake one down and pass it around, 97 bottles of beer on the wall.\n\n97 bottles of beer on the wall, 97 bottles of beer.\nTake one down and pass it around, 96 bottles of beer on the wall.\n\n96 bottles of beer on the wall, 96 bottles of beer.\nTake one down and pass it around, 95 bottles of beer on the wall.\n\n95 bottles of beer on the wall, 95 bottles of beer.\nTake one down and pass it around, 94 bottles of beer on the wall.\n\n94 bottles of beer on the wall, 94 bottles of beer.\nTake one down and pass it around, 93 bottles of beer on the wall.\n\n93 bottles of beer on the wall, 93 bottles of beer.\nTake one down and pass it around, 92 bottles of beer on the wall.\n\n92 bottles of beer on the wall, 92 bottles of beer.\nTake one down and pass it around, 91 bottles of beer on the wall.\n\n91 bottles of beer on the wall, 91 bottles of beer.\nTake one down and pass it around, 90 bottles of beer on the wall.\n\n90 bottles of beer on the wall, 90 bottles of beer.\nTake one down and pass it around, 89 bottles of beer on the wall.\n\n89 bottles of beer on the wall, 89 bottles of beer.\nTake one down and pass it around, 88 bottles of beer on the wall.\n\n88 bottles of beer on the wall, 88 bottles of beer.\nTake one down and pass it around, 87 bottles of beer on the wall.\n\n87 bottles of beer on the wall, 87 bottles of beer.\nTake one down and pass it around, 86 bottles of beer on the wall.\n\n86 bottles of beer on the wall, 86 bottles of beer.\nTake one down and pass it around, 85 bottles of beer on the wall.\n\n85 bottles of beer on the wall, 85 bottles of beer.\nTake one down and pass it around, 84 bottles of beer on the wall.\n\n84 bottles of beer on the wall, 84 bottles of beer.\nTake one down and pass it around, 83 bottles of beer on the wall.\n\n83 bottles of beer on the wall, 83 bottles of beer.\nTake one down and pass it around, 82 bottles of beer on the wall.\n\n82 bottles of beer on the wall, 82 bottles of beer.\nTake one down and pass it around, 81 bottles of beer on the wall.\n\n81 bottles of beer on the wall, 81 bottles of beer.\nTake one down and pass it around, 80 bottles of beer on the wall.\n\n80 bottles of beer on the wall, 80 bottles of beer.\nTake one down and pass it around, 79 bottles of beer on the wall.\n\n79 bottles of beer on the wall, 79 bottles of beer.\nTake one down and pass it around, 78 bottles of beer on the wall.\n\n78 bottles of beer on the wall, 78 bottles of beer.\nTake one down and pass it around, 77 bottles of beer on the wall.\n\n77 bottles of beer on the wall, 77 bottles of beer.\nTake one down and pass it around, 76 bottles of beer on the wall.\n\n76 bottles of beer on the wall, 76 bottles of beer.\nTake one down and pass it around, 75 bottles of beer on the wall.\n\n75 bottles of beer on the wall, 75 bottles of beer.\nTake one down and pass it around, 74 bottles of beer on the wall.\n\n74 bottles of beer on the wall, 74 bottles of beer.\nTake one down and pass it around, 73 bottles of beer on the wall.\n\n73 bottles of beer on the wall, 73 bottles of beer.\nTake one down and pass it around, 72 bottles of beer on the wall.\n\n72 bottles of beer on the wall, 72 bottles of beer.\nTake one down and pass it around, 71 bottles of beer on the wall.\n\n71 bottles of beer on the wall, 71 bottles of beer.\nTake one down and pass it around, 70 bottles of beer on the wall.\n\n70 bottles of beer on the wall, 70 bottles of beer.\nTake one down and pass it around, 69 bottles of beer on the wall.\n\n69 bottles of beer on the wall, 69 bottles of beer.\nTake one down and pass it around, 68 bottles of beer on the wall.\n\n68 bottles of beer on the wall, 68 bottles of beer.\nTake one down and pass it around, 67 bottles of beer on the wall.\n\n67 bottles of beer on the wall, 67 bottles of beer.\nTake one down and pass it around, 66 bottles of beer on the wall.\n\n66 bottles of beer on the wall, 66 bottles of beer.\nTake one down and pass it around, 65 bottles of beer on the wall.\n\n65 bottles of beer on the wall, 65 bottles of beer.\nTake one down and pass it around, 64 bottles of beer on the wall.\n\n64 bottles of beer on the wall, 64 bottles of beer.\nTake one down and pass it around, 63 bottles of beer on the wall.\n\n63 bottles of beer on the wall, 63 bottles of beer.\nTake one down and pass it around, 62 bottles of beer on the wall.\n\n62 bottles of beer on the wall, 62 bottles of beer.\nTake one down and pass it around, 61 bottles of beer on the wall.\n\n61 bottles of beer on the wall, 61 bottles of beer.\nTake one down and pass it around, 60 bottles of beer on the wall.\n\n60 bottles of beer on the wall, 60 bottles of beer.\nTake one down and pass it around, 59 bottles of beer on the wall.\n\n59 bottles of beer on the wall, 59 bottles of beer.\nTake one down and pass it around, 58 bottles of beer on the wall.\n\n58 bottles of beer on the wall, 58 bottles of beer.\nTake one down and pass it around, 57 bottles of beer on the wall.\n\n57 bottles of beer on the wall, 57 bottles of beer.\nTake one down and pass it around, 56 bottles of beer on the wall.\n\n56 bottles of beer on the wall, 56 bottles of beer.\nTake one down and pass it around, 55 bottles of beer on the wall.\n\n55 bottles of beer on the wall, 55 bottles of beer.\nTake one down and pass it around, 54 bottles of beer on the wall.\n\n54 bottles of beer on the wall, 54 bottles of beer.\nTake one down and pass it around, 53 bottles of beer on the wall.\n\n53 bottles of beer on the wall, 53 bottles of beer.\nTake one down and pass it around, 52 bottles of beer on the wall.\n\n52 bottles of beer on the wall, 52 bottles of beer.\nTake one down and pass it around, 51 bottles of beer on the wall.\n\n51 bottles of beer on the wall, 51 bottles of beer.\nTake one down and pass it around, 50 bottles of beer on the wall.\n\n50 bottles of beer on the wall, 50 bottles of beer.\nTake one down and pass it around, 49 bottles of beer on the wall.\n\n49 bottles of beer on the wall, 49 bottles of beer.\nTake one down and pass it around, 48 bottles of beer on the wall.\n\n48 bottles of beer on the wall, 48 bottles of beer.\nTake one down and pass it around, 47 bottles of beer on the wall.\n\n47 bottles of beer on the wall, 47 bottles of beer.\nTake one down and pass it around, 46 bottles of beer on the wall.\n\n46 bottles of beer on the wall, 46 bottles of beer.\nTake one down and pass it around, 45 bottles of beer on the wall.\n\n45 bottles of beer on the wall, 45 bottles of beer.\nTake one down and pass it around, 44 bottles of beer on the wall.\n\n44 bottles of beer on the wall, 44 bottles of beer.\nTake one down and pass it around, 43 bottles of beer on the wall.\n\n43 bottles of beer on the wall, 43 bottles of beer.\nTake one down and pass it around, 42 bottles of beer on the wall.\n\n42 bottles of beer on the wall, 42 bottles of beer.\nTake one down and pass it around, 41 bottles of beer on the wall.\n\n41 bottles of beer on the wall, 41 bottles of beer.\nTake one down and pass it around, 40 bottles of beer on the wall.\n\n40 bottles of beer on the wall, 40 bottles of beer.\nTake one down and pass it around, 39 bottles of beer on the wall.\n\n39 bottles of beer on the wall, 39 bottles of beer.\nTake one down and pass it around, 38 bottles of beer on the wall.\n\n38 bottles of beer on the wall, 38 bottles of beer.\nTake one down and pass it around, 37 bottles of beer on the wall.\n\n37 bottles of beer on the wall, 37 bottles of beer.\nTake one down and pass it around, 36 bottles of beer on the wall.\n\n36 bottles of beer on the wall, 36 bottles of beer.\nTake one down and pass it around, 35 bottles of beer on the wall.\n\n35 bottles of beer on the wall, 35 bottles of beer.\nTake one down and pass it around, 34 bottles of beer on the wall.\n\n34 bottles of beer on the wall, 34 bottles of beer.\nTake one down and pass it around, 33 bottles of beer on the wall.\n\n33 bottles of beer on the wall, 33 bottles of beer.\nTake one down and pass it around, 32 bottles of beer on the wall.\n\n32 bottles of beer on the wall, 32 bottles of beer.\nTake one down and pass it around, 31 bottles of beer on the wall.\n\n31 bottles of beer on the wall, 31 bottles of beer.\nTake one down and pass it around, 30 bottles of beer on the wall.\n\n30 bottles of beer on the wall, 30 bottles of beer.\nTake one down and pass it around, 29 bottles of beer on the wall.\n\n29 bottles of beer on the wall, 29 bottles of beer.\nTake one down and pass it around, 28 bottles of beer on the wall.\n\n28 bottles of beer on the wall, 28 bottles of beer.\nTake one down and pass it around, 27 bottles of beer on the wall.\n\n27 bottles of beer on the wall, 27 bottles of beer.\nTake one down and pass it around, 26 bottles of beer on the wall.\n\n26 bottles of beer on the wall, 26 bottles of beer.\nTake one down and pass it around, 25 bottles of beer on the wall.\n\n25 bottles of beer on the wall, 25 bottles of beer.\nTake one down and pass it around, 24 bottles of beer on the wall.\n\n24 bottles of beer on the wall, 24 bottles of beer.\nTake one down and pass it around, 23 bottles of beer on the wall.\n\n23 bottles of beer on the wall, 23 bottles of beer.\nTake one down and pass it around, 22 bottles of beer on the wall.\n\n22 bottles of beer on the wall, 22 bottles of beer.\nTake one down and pass it around, 21 bottles of beer on the wall.\n\n21 bottles of beer on the wall, 21 bottles of beer.\nTake one down and pass it around, 20 bottles of beer on the wall.\n\n20 bottles of beer on the wall, 20 bottles of beer.\nTake one down and pass it around, 19 bottles of beer on the wall.\n\n19 bottles of beer on the wall, 19 bottles of beer.\nTake one down and pass it around, 18 bottles of beer on the wall.\n\n18 bottles of beer on the wall, 18 bottles of beer.\nTake one down and pass it around, 17 bottles of beer on the wall.\n\n17 bottles of beer on the wall, 17 bottles of beer.\nTake one down and pass it around, 16 bottles of beer on the wall.\n\n16 bottles of beer on the wall, 16 bottles of beer.\nTake one down and pass it around, 15 bottles of beer on the wall.\n\n15 bottles of beer on the wall, 15 bottles of beer.\nTake one down and pass it around, 14 bottles of beer on the wall.\n\n14 bottles of beer on the wall, 14 bottles of beer.\nTake one down and pass it around, 13 bottles of beer on the wall.\n\n13 bottles of beer on the wall, 13 bottles of beer.\nTake one down and pass it around, 12 bottles of beer on the wall.\n\n12 bottles of beer on the wall, 12 bottles of beer.\nTake one down and pass it around, 11 bottles of beer on the wall.\n\n11 bottles of beer on the wall, 11 bottles of beer.\nTake one down and pass it around, 10 bottles of beer on the wall.\n\n10 bottles of beer on the wall, 10 bottles of beer.\nTake one down and pass it around, 9 bottles of beer on the wall.\n\n9 bottles of beer on the wall, 9 bottles of beer.\nTake one down and pass it around, 8 bottles of beer on the wall.\n\n8 bottles of beer on the wall, 8 bottles of beer.\nTake one down and pass it around, 7 bottles of beer on the wall.\n\n7 bottles of beer on the wall, 7 bottles of beer.\nTake one down and pass it around, 6 bottles of beer on the wall.\n\n6 bottles of beer on the wall, 6 bottles of beer.\nTake one down and pass it around, 5 bottles of beer on the wall.\n\n5 bottles of beer on the wall, 5 bottles of beer.\nTake one down and pass it around, 4 bottles of beer on the wall.\n\n4 bottles of beer on the wall, 4 bottles of beer.\nTake one down and pass it around, 3 bottles of beer on the wall.\n\n3 bottles of beer on the wall, 3 bottles of beer.\nTake one down and pass it around, 2 bottles of beer on the wall.\n\n2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n\n1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n"
71
+ }
72
+ ]
73
+ }
74
+ ]
75
+ }
76
+ ]
77
+ }
@@ -1,67 +1,81 @@
1
1
  {
2
- "square_of_sum": {
3
- "description": ["Square the sum of the numbers up to the given number"],
4
- "cases": [
5
- {
6
- "description": "square of sum 5",
7
- "number": 5,
8
- "expected": 225
9
- },
10
- {
11
- "description": "square of sum 10",
12
- "number": 10,
13
- "expected": 3025
14
- },
15
- {
16
- "description": "square of sum 100",
17
- "number": 100,
18
- "expected": 25502500
19
- }
20
- ]
2
+ "exercise": "difference-of-squares",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "description": "Square the sum of the numbers up to the given number",
7
+ "cases": [
8
+ {
9
+ "description": "square of sum 5",
10
+ "property": "squareOfSum",
11
+ "number": 5,
12
+ "expected": 225
13
+ },
14
+ {
15
+ "description": "square of sum 10",
16
+ "property": "squareOfSum",
17
+ "number": 10,
18
+ "expected": 3025
19
+ },
20
+ {
21
+ "description": "square of sum 100",
22
+ "property": "squareOfSum",
23
+ "number": 100,
24
+ "expected": 25502500
25
+ }
26
+ ]
21
27
  },
22
- "sum_of_squares": {
23
- "description": ["Sum the squares of the numbers up to the given number"],
24
- "cases": [
25
- {
26
- "description": "sum of squares 5",
27
- "number": 5,
28
- "expected": 55
29
- },
30
- {
31
- "description": "sum of squares 10",
32
- "number": 10,
33
- "expected": 385
34
- },
35
- {
36
- "description": "sum of squares 100",
37
- "number": 100,
38
- "expected": 338350
39
- }
40
- ]
28
+ {
29
+ "description": "Sum the squares of the numbers up to the given number",
30
+ "cases": [
31
+ {
32
+ "description": "sum of squares 5",
33
+ "property": "sumOfSquares",
34
+ "number": 5,
35
+ "expected": 55
36
+ },
37
+ {
38
+ "description": "sum of squares 10",
39
+ "property": "sumOfSquares",
40
+ "number": 10,
41
+ "expected": 385
42
+ },
43
+ {
44
+ "description": "sum of squares 100",
45
+ "property": "sumOfSquares",
46
+ "number": 100,
47
+ "expected": 338350
48
+ }
49
+ ]
41
50
  },
42
- "difference_of_squares": {
43
- "description": ["Subtract sum of squares from square of sums"],
44
- "cases": [
45
- {
46
- "description": "difference of squares 0",
47
- "number": 0,
48
- "expected": 0
49
- },
50
- {
51
- "description": "difference of squares 5",
52
- "number": 5,
53
- "expected": 170
54
- },
55
- {
56
- "description": "difference of squares 10",
57
- "number": 10,
58
- "expected": 2640
59
- },
60
- {
61
- "description": "difference of squares 100",
62
- "number": 100,
63
- "expected": 25164150
64
- }
65
- ]
51
+ {
52
+ "description": "Subtract sum of squares from square of sums",
53
+ "cases": [
54
+ {
55
+ "description": "difference of squares 0",
56
+ "property": "differenceOfSquares",
57
+ "number": 0,
58
+ "expected": 0
59
+ },
60
+ {
61
+ "description": "difference of squares 5",
62
+ "property": "differenceOfSquares",
63
+ "number": 5,
64
+ "expected": 170
65
+ },
66
+ {
67
+ "description": "difference of squares 10",
68
+ "property": "differenceOfSquares",
69
+ "number": 10,
70
+ "expected": 2640
71
+ },
72
+ {
73
+ "description": "difference of squares 100",
74
+ "property": "differenceOfSquares",
75
+ "number": 100,
76
+ "expected": 25164150
77
+ }
78
+ ]
66
79
  }
80
+ ]
67
81
  }
@@ -10,11 +10,8 @@ let single x = Ok (Single x)
10
10
  let call_parser json = parse_json_text json "expected" "cases"
11
11
 
12
12
  let parser_tests = [
13
- "parses empty json as empty list" >::
14
- ae (single []) (parse_json_text "{\"test-cases\" : []}" "expected" "test-cases");
15
-
16
13
  "gives an error with a json map that does not have the key cases in" >::
17
- ae (Error (TestMustHaveKeyCalledCases "case"))
14
+ ae (Error (TestMustHaveKeyCalledCases "cases"))
18
15
  (call_parser "{\"case\" : [{\"description\" : \"d1\", \"expected\" : 100}]}");
19
16
 
20
17
  "gives an error with cases that is not a json list" >::
@@ -90,16 +87,21 @@ let parser_tests = [
90
87
 
91
88
  "parses difference_of_squares.json" >::(fun ctxt ->
92
89
  match call_parser @@ In_channel.read_all "test/difference_of_squares.json" with
93
- | Ok (Suite p) -> assert_equal ["square_of_sum"; "sum_of_squares"; "difference_of_squares"] (List.map ~f:(fun x -> x.name) p)
90
+ | Ok (Suite p) -> assert_equal [
91
+ "square_the_sum_of_the_numbers_up_to_the_given_number";
92
+ "sum_the_squares_of_the_numbers_up_to_the_given_number";
93
+ "subtract_sum_of_squares_from_square_of_sums"] (List.map ~f:(fun x -> x.name) p)
94
94
  | Ok (Single p) -> assert_failure "was single"
95
95
  | Error e -> assert_failure ("failed to parse difference_of_squares.json: " ^ show_error e)
96
96
  );
97
97
 
98
- "parses clock.json" >::(fun ctxt ->
99
- match call_parser @@ In_channel.read_all "test/clock.json" with
100
- | Ok (Suite p) -> assert_equal ["create"; "add"; "equal"] (List.map ~f:(fun x -> x.name) p)
98
+ "parses nested json in beer-song by dropping intermediate nesting levels" >::(fun ctxt ->
99
+ match call_parser @@ In_channel.read_all "test/beer-song.json" with
100
+ | Ok (Suite p) -> assert_equal [
101
+ "verse";
102
+ "lyrics"] (List.map ~f:(fun x -> x.name) p)
101
103
  | Ok (Single p) -> assert_failure "was single"
102
- | Error e -> assert_failure ("failed to parse clock.json: " ^ show_error e)
104
+ | Error e -> assert_failure ("failed to parse beer-song.json: " ^ show_error e)
103
105
  );
104
106
 
105
107
  "parses json with a methods key for dynamic languages" >::(fun ctxt ->
@@ -51,10 +51,10 @@ let template_tests = [
51
51
  let template = {start=7; finish=9; file_text=template_text;template="code";
52
52
  suite_name_line=Some 6; suite_end = Some 14; suite_all_names_line = None} in
53
53
  let subst = ("tests1", [Subst "line1"; Subst "line2"]) in
54
- let filled = fill_single_suite template subst in
54
+ let filled = Result.ok_or_failwith @@ fill_single_suite template subst in
55
55
  assert_equal ~printer:Bool.to_string true (String.substr_index filled ~pattern:"let tests1_tests = [" |> Option.is_some);
56
56
  assert_equal ~printer:Bool.to_string true (String.substr_index filled ~pattern:"line1" |> Option.is_some);
57
57
  assert_equal ~printer:Bool.to_string true (String.substr_index filled ~pattern:"line2" |> Option.is_some);
58
- assert_equal ~printer:Int.to_string 6 (String.count ~f:(fun ch -> ch = '\n') filled);
58
+ assert_equal ~printer:Int.to_string 7 (String.count ~f:(fun ch -> ch = '\n') filled);
59
59
  );
60
60
  ]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trackler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.8.17
4
+ version: 2.0.8.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Owen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-10 00:00:00.000000000 Z
11
+ date: 2017-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -1454,6 +1454,7 @@ files:
1454
1454
  - tracks/csharp/exercises/diamond/Diamond.csproj
1455
1455
  - tracks/csharp/exercises/diamond/DiamondTest.cs
1456
1456
  - tracks/csharp/exercises/diamond/Example.cs
1457
+ - tracks/csharp/exercises/diamond/HINTS.md
1457
1458
  - tracks/csharp/exercises/difference-of-squares/DifferenceOfSquares.cs
1458
1459
  - tracks/csharp/exercises/difference-of-squares/DifferenceOfSquares.csproj
1459
1460
  - tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs
@@ -5813,6 +5814,7 @@ files:
5813
5814
  - tracks/ocaml/tools/test-generator/templates/say/template.ml
5814
5815
  - tracks/ocaml/tools/test-generator/templates/word-count/template.ml
5815
5816
  - tracks/ocaml/tools/test-generator/test/all_tests.ml
5817
+ - tracks/ocaml/tools/test-generator/test/beer-song.json
5816
5818
  - tracks/ocaml/tools/test-generator/test/clock.json
5817
5819
  - tracks/ocaml/tools/test-generator/test/codegen_test.ml
5818
5820
  - tracks/ocaml/tools/test-generator/test/difference_of_squares.json