trackler 2.2.1.92 → 2.2.1.93

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/acronym/canonical-data.json +3 -11
  4. data/problem-specifications/exercises/hamming/canonical-data.json +61 -31
  5. data/problem-specifications/exercises/react/canonical-data.json +472 -436
  6. data/tracks/ceylon/exercises/hamming/source/hamming/HammingTest.ceylon +1 -1
  7. data/tracks/ceylon/exercises/largest-series-product/source/largestseriesproduct/SeriesTest.ceylon +1 -1
  8. data/tracks/ceylon/exercises/leap/source/leap/LeapTest.ceylon +1 -1
  9. data/tracks/ceylon/exercises/react/source/react/ReactorTest.ceylon +1 -1
  10. data/tracks/ceylon/exercises/rna-transcription/source/rnatranscription/RNATest.ceylon +1 -1
  11. data/tracks/ceylon/exercises/sieve/source/sieve/SieveTest.ceylon +1 -1
  12. data/tracks/common-lisp/config.json +9 -9
  13. data/tracks/crystal/exercises/acronym/spec/acronym_spec.cr +0 -4
  14. data/tracks/crystal/exercises/binary/spec/binary_spec.cr +6 -6
  15. data/tracks/crystal/exercises/forth/spec/forth_spec.cr +48 -32
  16. data/tracks/crystal/exercises/hello-world/spec/hello_world_spec.cr +1 -9
  17. data/tracks/crystal/exercises/pascals-triangle/spec/pascals_triangle_spec.cr +13 -1
  18. data/tracks/crystal/generator/spec/exercise_generator_spec.cr +1 -1
  19. data/tracks/crystal/generator/src/generators/acronym.cr +1 -1
  20. data/tracks/crystal/generator/src/generators/binary.cr +2 -2
  21. data/tracks/crystal/generator/src/generators/flatten_array.cr +1 -1
  22. data/tracks/crystal/generator/src/generators/forth.cr +3 -3
  23. data/tracks/crystal/generator/src/generators/pascals-triangle.cr +11 -4
  24. data/tracks/delphi/exercises/phone-number/uPhoneNumberTests.pas +35 -10
  25. data/tracks/factor/exercises/isogram/README.md +2 -2
  26. data/tracks/fortran/.travis.yml +0 -1
  27. data/tracks/go/exercises/book-store/.meta/gen.go +3 -3
  28. data/tracks/go/exercises/book-store/.meta/hints.md +14 -0
  29. data/tracks/go/exercises/book-store/README.md +17 -1
  30. data/tracks/go/exercises/book-store/cases_test.go +17 -17
  31. data/tracks/go/exercises/book-store/example.go +13 -11
  32. data/tracks/go/exercises/bowling/.meta/gen.go +10 -8
  33. data/tracks/go/exercises/bowling/cases_test.go +2 -2
  34. data/tracks/go/exercises/bracket-push/.meta/gen.go +5 -3
  35. data/tracks/go/exercises/bracket-push/cases_test.go +2 -2
  36. data/tracks/go/exercises/dominoes/.meta/gen.go +7 -3
  37. data/tracks/go/exercises/dominoes/cases_test.go +12 -2
  38. data/tracks/go/exercises/nucleotide-count/.meta/gen.go +87 -0
  39. data/tracks/go/exercises/nucleotide-count/.meta/hints.md +20 -0
  40. data/tracks/go/exercises/nucleotide-count/cases_test.go +39 -0
  41. data/tracks/go/exercises/nucleotide-count/example.go +6 -16
  42. data/tracks/go/exercises/nucleotide-count/nucleotide_count_test.go +16 -93
  43. data/tracks/go/exercises/sum-of-multiples/.meta/gen.go +6 -4
  44. data/tracks/go/exercises/sum-of-multiples/cases_test.go +2 -2
  45. data/tracks/haskell/README.md +6 -5
  46. data/tracks/haskell/config.json +73 -73
  47. data/tracks/haskell/exercises/allergies/{HINTS.md → .meta/hints.md} +0 -0
  48. data/tracks/haskell/exercises/alphametics/{HINTS.md → .meta/hints.md} +0 -0
  49. data/tracks/haskell/exercises/anagram/{HINTS.md → .meta/hints.md} +0 -0
  50. data/tracks/haskell/exercises/bank-account/{HINTS.md → .meta/hints.md} +0 -0
  51. data/tracks/haskell/exercises/beer-song/{HINTS.md → .meta/hints.md} +0 -0
  52. data/tracks/haskell/exercises/binary-search-tree/{HINTS.md → .meta/hints.md} +0 -0
  53. data/tracks/haskell/exercises/bowling/{HINTS.md → .meta/hints.md} +0 -0
  54. data/tracks/haskell/exercises/clock/{HINTS.md → .meta/hints.md} +0 -0
  55. data/tracks/haskell/exercises/custom-set/{HINTS.md → .meta/hints.md} +0 -0
  56. data/tracks/haskell/exercises/food-chain/{HINTS.md → .meta/hints.md} +0 -0
  57. data/tracks/haskell/exercises/forth/{HINTS.md → .meta/hints.md} +0 -0
  58. data/tracks/haskell/exercises/go-counting/{HINTS.md → .meta/hints.md} +0 -0
  59. data/tracks/haskell/exercises/grade-school/{HINTS.md → .meta/hints.md} +0 -0
  60. data/tracks/haskell/exercises/hello-world/{HINTS.md → .meta/hints.md} +0 -0
  61. data/tracks/haskell/exercises/hello-world/package.yaml +1 -1
  62. data/tracks/haskell/exercises/house/{HINTS.md → .meta/hints.md} +0 -0
  63. data/tracks/haskell/exercises/isbn-verifier/README.md +1 -1
  64. data/tracks/haskell/exercises/largest-series-product/package.yaml +1 -1
  65. data/tracks/haskell/exercises/leap/{HINTS.md → .meta/hints.md} +0 -0
  66. data/tracks/haskell/exercises/leap/package.yaml +1 -1
  67. data/tracks/haskell/exercises/linked-list/{HINTS.md → .meta/hints.md} +0 -0
  68. data/tracks/haskell/exercises/matrix/{HINTS.md → .meta/hints.md} +0 -0
  69. data/tracks/haskell/exercises/meetup/{HINTS.md → .meta/hints.md} +0 -0
  70. data/tracks/haskell/exercises/minesweeper/package.yaml +1 -1
  71. data/tracks/haskell/exercises/nth-prime/package.yaml +1 -1
  72. data/tracks/haskell/exercises/nucleotide-count/package.yaml +1 -1
  73. data/tracks/haskell/exercises/octal/{HINTS.md → .meta/hints.md} +0 -0
  74. data/tracks/haskell/exercises/palindrome-products/{HINTS.md → .meta/hints.md} +0 -0
  75. data/tracks/haskell/exercises/parallel-letter-frequency/{HINTS.md → .meta/hints.md} +0 -0
  76. data/tracks/haskell/exercises/pascals-triangle/package.yaml +1 -1
  77. data/tracks/haskell/exercises/perfect-numbers/package.yaml +1 -1
  78. data/tracks/haskell/exercises/phone-number/package.yaml +1 -1
  79. data/tracks/haskell/exercises/phone-number/test/Tests.hs +10 -2
  80. data/tracks/haskell/exercises/pig-latin/package.yaml +1 -1
  81. data/tracks/haskell/exercises/queen-attack/{HINTS.md → .meta/hints.md} +0 -0
  82. data/tracks/haskell/exercises/rna-transcription/package.yaml +1 -1
  83. data/tracks/haskell/exercises/robot-name/{HINTS.md → .meta/hints.md} +0 -0
  84. data/tracks/haskell/exercises/robot-simulator/{HINTS.md → .meta/hints.md} +0 -0
  85. data/tracks/haskell/exercises/roman-numerals/{HINTS.md → .meta/hints.md} +0 -0
  86. data/tracks/haskell/exercises/roman-numerals/package.yaml +1 -1
  87. data/tracks/haskell/exercises/rotational-cipher/package.yaml +1 -1
  88. data/tracks/haskell/exercises/saddle-points/package.yaml +1 -1
  89. data/tracks/haskell/exercises/scrabble-score/package.yaml +1 -1
  90. data/tracks/haskell/exercises/secret-handshake/package.yaml +1 -1
  91. data/tracks/haskell/exercises/series/{HINTS.md → .meta/hints.md} +0 -0
  92. data/tracks/haskell/exercises/sgf-parsing/{HINTS.md → .meta/hints.md} +0 -0
  93. data/tracks/haskell/exercises/sieve/package.yaml +1 -1
  94. data/tracks/haskell/exercises/simple-linked-list/{HINTS.md → .meta/hints.md} +0 -0
  95. data/tracks/haskell/exercises/space-age/{HINTS.md → .meta/hints.md} +0 -0
  96. data/tracks/haskell/exercises/space-age/package.yaml +1 -1
  97. data/tracks/haskell/exercises/spiral-matrix/package.yaml +1 -1
  98. data/tracks/haskell/exercises/sublist/{HINTS.md → .meta/hints.md} +0 -0
  99. data/tracks/haskell/exercises/sublist/package.yaml +1 -1
  100. data/tracks/haskell/exercises/trinary/{HINTS.md → .meta/hints.md} +0 -0
  101. data/tracks/haskell/exercises/twelve-days/package.yaml +1 -1
  102. data/tracks/haskell/exercises/word-count/{HINTS.md → .meta/hints.md} +0 -0
  103. data/tracks/haskell/exercises/wordy/{HINTS.md → .meta/hints.md} +0 -0
  104. data/tracks/haskell/exercises/zebra-puzzle/package.yaml +1 -1
  105. data/tracks/java/exercises/phone-number/.meta/src/reference/java/PhoneNumber.java +10 -2
  106. data/tracks/java/exercises/phone-number/.meta/version +1 -0
  107. data/tracks/java/exercises/phone-number/src/test/java/PhoneNumberTest.java +56 -19
  108. data/tracks/purescript/config/exercise_readme.go.tmpl +0 -3
  109. data/tracks/swift/.travis.yml +0 -18
  110. data/tracks/swift/circle.yml +17 -6
  111. metadata +41 -37
  112. data/tracks/purescript/docs/EXERCISE_README_INSERT.md +0 -0
@@ -1,8 +1,8 @@
1
1
  package brackets
2
2
 
3
3
  // Source: exercism/problem-specifications
4
- // Commit: 855c591 bracket-push: add test case (#747)
5
- // Problem Specifications Version: 1.1.0
4
+ // Commit: 5c16d05 bracket-push: Apply new "input" policy
5
+ // Problem Specifications Version: 1.2.0
6
6
 
7
7
  type bracketTest struct {
8
8
  input string
@@ -37,8 +37,11 @@ func (d Dominoe) String() string {
37
37
 
38
38
  type OneCase struct {
39
39
  Description string
40
- Dominoes []Dominoe `json:"input"`
41
- Expected bool
40
+ Comments []string
41
+ Input struct {
42
+ Dominoes []Dominoe
43
+ }
44
+ Expected bool
42
45
  }
43
46
 
44
47
  //func (c OneCase)
@@ -54,7 +57,8 @@ var testCases = []struct {
54
57
  }{ {{range .J.Cases}}
55
58
  {
56
59
  {{printf "%q" .Description}},
57
- []Dominoe{ {{range .Dominoes}} {{printf "%v" .}}, {{end}} },
60
+ {{range .Comments}}//{{.}}
61
+ {{end}}[]Dominoe{ {{range .Input.Dominoes}} {{printf "%v" .}}, {{end}} },
58
62
  {{printf "%v" .Expected}},
59
63
  }, {{end}}
60
64
  }
@@ -1,8 +1,8 @@
1
1
  package dominoes
2
2
 
3
3
  // Source: exercism/problem-specifications
4
- // Commit: b4ceaf4 Update dominoes canonical-data expected key (#823)
5
- // Problem Specifications Version: 2.0.0
4
+ // Commit: b5bc74d dominoes: Apply new "input" policy
5
+ // Problem Specifications Version: 2.1.0
6
6
 
7
7
  var testCases = []struct {
8
8
  description string
@@ -41,6 +41,11 @@ var testCases = []struct {
41
41
  },
42
42
  {
43
43
  "disconnected - simple",
44
+ //This meets the requirement of being possibly-Euclidean.
45
+ //All vertices have even degree.
46
+ //Nevertheless, there is no chain here, as there's no way to get from 1 to 2.
47
+ //This test (and the two following) prevent solutions from using the even-degree test as the sole criterion,
48
+ //as that is not a sufficient condition.
44
49
  []Dominoe{Dominoe{1, 1}, Dominoe{2, 2}},
45
50
  false,
46
51
  },
@@ -56,6 +61,11 @@ var testCases = []struct {
56
61
  },
57
62
  {
58
63
  "need backtrack",
64
+ //Some solutions may make a chain out of (1, 2), (2, 3), (3, 1)
65
+ //then decide that since there are no more dominoes containing a 1,
66
+ //there is no chain possible.
67
+ //There is indeed a chain here, so this test checks for this line of reasoning.
68
+ //You need to place the (2, 4) after the (1, 2) rather than the (2, 3).
59
69
  []Dominoe{Dominoe{1, 2}, Dominoe{2, 3}, Dominoe{3, 1}, Dominoe{2, 4}, Dominoe{2, 4}},
60
70
  true,
61
71
  },
@@ -0,0 +1,87 @@
1
+ package main
2
+
3
+ import (
4
+ "log"
5
+ "sort"
6
+ "strconv"
7
+ "strings"
8
+ "text/template"
9
+
10
+ "../../../gen"
11
+ )
12
+
13
+ func main() {
14
+ t, err := template.New("").Parse(tmpl)
15
+ if err != nil {
16
+ log.Fatal(err)
17
+ }
18
+ var j js
19
+ if err := gen.Gen("nucleotide-count", &j, t); err != nil {
20
+ log.Fatal(err)
21
+ }
22
+ }
23
+
24
+ // The JSON structure we expect to be able to unmarshal into
25
+ type js struct {
26
+ exercise string
27
+ version string
28
+ Cases []struct {
29
+ Description string
30
+ Cases []OneCase
31
+ }
32
+ }
33
+
34
+ // OneCase represents each test case
35
+ type OneCase struct {
36
+ Description string
37
+ Property string
38
+ Input struct {
39
+ Strand string
40
+ }
41
+ Expected map[string]interface{}
42
+ }
43
+
44
+ // ErrorExpected returns true if an error should be raised
45
+ func (c OneCase) ErrorExpected() bool {
46
+ _, exists := c.Expected["error"]
47
+ return exists
48
+ }
49
+
50
+ // SortedMapString collects key:values for a map in sorted order
51
+ func (c OneCase) SortedMapString() string {
52
+ strs := make([]string, 0, len(c.Expected))
53
+ for k, v := range c.Expected {
54
+ switch t := v.(type) {
55
+ case float64:
56
+ strs = append(strs, `'`+k+`': `+strconv.FormatFloat(t, 'f', -1, 64))
57
+ default:
58
+ log.Fatalf("unexpected type %T for %v", t, v)
59
+ }
60
+
61
+ }
62
+ sort.Strings(strs)
63
+ return strings.Join(strs, ",")
64
+ }
65
+
66
+ // template applied to above data structure generates the Go test cases
67
+ var tmpl = `package dna
68
+
69
+ {{.Header}}
70
+
71
+ {{range .J.Cases}}// {{.Description}}
72
+ var testCases = []struct {
73
+ description string
74
+ strand string
75
+ expected Histogram
76
+ errorExpected bool
77
+ }{
78
+ {{range .Cases}}{
79
+ description: {{printf "%q" .Description}},
80
+ strand: {{printf "%#v" .Input.Strand}},
81
+ {{if .ErrorExpected}}errorExpected: true,
82
+ {{else}}expected: Histogram{ {{.SortedMapString}} },
83
+ {{- end}}
84
+ },
85
+ {{end}}{{end}}
86
+ }
87
+ `
@@ -0,0 +1,20 @@
1
+ ## Implementation
2
+
3
+ You should define a custom type 'DNA' with a function 'Counts' that outputs two values:
4
+
5
+ - a frequency count for the given DNA strand
6
+ - an error (if there are invalid nucleotides)
7
+
8
+ Which is a good type for a DNA strand ?
9
+
10
+ Which is the best Go types to represent the output values ?
11
+
12
+ Take a look at the test cases to get a hint about what could be the possible inputs.
13
+
14
+
15
+ ## note about the tests
16
+ You may be wondering about the `cases_test.go` file. We explain it in the
17
+ [leap exercise][leap-exercise-readme].
18
+
19
+ [leap-exercise-readme]: https://github.com/exercism/go/blob/master/exercises/leap/README.md
20
+
@@ -0,0 +1,39 @@
1
+ package dna
2
+
3
+ // Source: exercism/problem-specifications
4
+ // Commit: 879a096 nucleotide-count: Apply new "input" policy
5
+ // Problem Specifications Version: 1.3.0
6
+
7
+ // count all nucleotides in a strand
8
+ var testCases = []struct {
9
+ description string
10
+ strand string
11
+ expected Histogram
12
+ errorExpected bool
13
+ }{
14
+ {
15
+ description: "empty strand",
16
+ strand: "",
17
+ expected: Histogram{'A': 0, 'C': 0, 'G': 0, 'T': 0},
18
+ },
19
+ {
20
+ description: "can count one nucleotide in single-character input",
21
+ strand: "G",
22
+ expected: Histogram{'A': 0, 'C': 0, 'G': 1, 'T': 0},
23
+ },
24
+ {
25
+ description: "strand with repeated nucleotide",
26
+ strand: "GGGGGGG",
27
+ expected: Histogram{'A': 0, 'C': 0, 'G': 7, 'T': 0},
28
+ },
29
+ {
30
+ description: "strand with multiple nucleotides",
31
+ strand: "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC",
32
+ expected: Histogram{'A': 20, 'C': 12, 'G': 17, 'T': 21},
33
+ },
34
+ {
35
+ description: "strand with invalid nucleotides",
36
+ strand: "AGXXACT",
37
+ errorExpected: true,
38
+ },
39
+ }
@@ -5,35 +5,25 @@ import (
5
5
  "strings"
6
6
  )
7
7
 
8
- // Histogram is a mapping from nucleotide to its count in given DNA
9
- type Histogram map[byte]int
10
-
11
8
  // DNA is a list of nucleotides
12
9
  type DNA string
10
+ type Histogram map[byte]int
13
11
 
14
12
  const validNucleotides = "ACGT"
15
13
 
16
- // Count counts number of occurrences of given nucleotide in given DNA
17
- func (dna DNA) Count(nucleotide byte) (count int, err error) {
18
- if !strings.Contains(validNucleotides, string(nucleotide)) {
19
- return 0, errors.New("dna: invalid nucleotide " + string(nucleotide))
20
- }
21
-
22
- return strings.Count(string(dna), string(nucleotide)), nil
23
- }
24
-
25
14
  // Counts generates a histogram of valid nucleotides in given DNA.
26
15
  // Returns error if DNA contains invalid nucleotide.
27
16
  func (dna DNA) Counts() (Histogram, error) {
28
17
  var total int
29
- h := Histogram{}
18
+ result := make(Histogram)
19
+
30
20
  for i := range validNucleotides {
31
21
  nucleotide := validNucleotides[i]
32
- h[nucleotide], _ = dna.Count(nucleotide)
33
- total += h[nucleotide]
22
+ result[nucleotide] = strings.Count(string(dna), string(nucleotide))
23
+ total += result[nucleotide]
34
24
  }
35
25
  if total != len(dna) {
36
26
  return nil, errors.New("dna: contains invalid nucleotide")
37
27
  }
38
- return h, nil
28
+ return result, nil
39
29
  }
@@ -5,99 +5,22 @@ import (
5
5
  "testing"
6
6
  )
7
7
 
8
- var tallyTests = []struct {
9
- strand DNA
10
- nucleotide byte
11
- expected int
12
- }{
13
- {"", 'A', 0},
14
- {"ACT", 'G', 0},
15
- {"CCCCC", 'C', 5},
16
- {"GGGGGTAACCCGG", 'T', 1},
17
- }
18
-
19
- func TestNucleotideCounts(t *testing.T) {
20
- for _, tt := range tallyTests {
21
- if count, err := tt.strand.Count(tt.nucleotide); err != nil {
22
- t.Fatal(err)
23
- } else if count != tt.expected {
24
- t.Fatalf("Got \"%v\", expected \"%v\"", count, tt.expected)
25
- }
26
- }
27
- }
28
-
29
- func TestHasErrorForInvalidNucleotides(t *testing.T) {
30
- dna := DNA("GATTACA")
31
- if _, err := dna.Count('X'); err == nil {
32
- t.Fatalf("X is an invalid nucleotide, but no error was raised")
33
- }
34
- }
35
-
36
- // In most cases, this test is pointless.
37
- // Very occasionally it matters.
38
- // Just roll with it.
39
- func TestCountingDoesntChangeCount(t *testing.T) {
40
- dna := DNA("CGATTGGG")
41
- dna.Count('T')
42
- count1, err := dna.Count('T')
43
- if err != nil {
44
- t.Fatal(err)
45
- }
46
- count2, err := dna.Count('T')
47
- if err != nil {
48
- t.Fatal(err)
49
- }
50
- if count1 != count2 || count2 != 2 {
51
- t.Fatalf("Got %v, expected %v", []int{count1, count2}, []int{2, 2})
52
- }
53
- }
54
-
55
- type histogramTest struct {
56
- strand DNA
57
- expected Histogram
58
- err bool
59
- }
60
-
61
- var histogramTests = []histogramTest{
62
- {
63
- "",
64
- Histogram{'A': 0, 'C': 0, 'T': 0, 'G': 0},
65
- false,
66
- },
67
- {
68
- "GGGGGGGG",
69
- Histogram{'A': 0, 'C': 0, 'T': 0, 'G': 8},
70
- false,
71
- },
72
- {
73
- "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC",
74
- Histogram{'A': 20, 'C': 12, 'T': 21, 'G': 17},
75
- false,
76
- },
77
- {
78
- "GGXXX",
79
- nil,
80
- true,
81
- },
82
- }
83
-
84
- func TestSequenceHistograms(t *testing.T) {
85
- for _, tt := range histogramTests {
86
- counts, err := tt.strand.Counts()
87
- if tt.err && err == nil {
88
- t.Fatalf("DNA{ %q }: expected error but didn't get one.", tt.strand)
89
- } else if !tt.err && err != nil {
90
- t.Fatalf("DNA{ %q }: expected no error but got error %s", tt.strand, err.Error())
91
- } else if !tt.err && !reflect.DeepEqual(counts, tt.expected) {
92
- t.Fatalf("DNA{ %q }: Got %v, expected %v", tt.strand, counts, tt.expected)
93
- }
94
- }
95
- }
96
-
97
- func BenchmarkSequenceHistograms(b *testing.B) {
98
- for _, tt := range histogramTests {
99
- for i := 0; i < b.N; i++ {
100
- tt.strand.Counts()
8
+ func TestCounts(t *testing.T) {
9
+ for _, tc := range testCases {
10
+ dna := DNA(tc.strand)
11
+ s, err := dna.Counts()
12
+ if tc.errorExpected {
13
+ if err == nil {
14
+ t.Fatalf("FAIL: %s\nCounts(%q)\nExpected error\nActual: %#v",
15
+ tc.description, tc.strand, s)
16
+ }
17
+ } else if err != nil {
18
+ t.Fatalf("FAIL: %s\nCounts(%q)\nExpected: %#v\nGot error: %q",
19
+ tc.description, tc.strand, tc.expected, err)
20
+ } else if !reflect.DeepEqual(s, tc.expected) {
21
+ t.Fatalf("FAIL: %s\nCounts(%q)\nExpected: %#v\nActual: %#v",
22
+ tc.description, tc.strand, tc.expected, s)
101
23
  }
24
+ t.Logf("PASS: %s", tc.description)
102
25
  }
103
26
  }
@@ -22,9 +22,11 @@ func main() {
22
22
  type js struct {
23
23
  Cases []struct {
24
24
  Description string
25
- Factors []int
26
- Limit int
27
- Expected int
25
+ Input struct {
26
+ Factors []int
27
+ Limit int
28
+ }
29
+ Expected int
28
30
  }
29
31
  }
30
32
 
@@ -38,6 +40,6 @@ var varTests = []struct {
38
40
  limit int
39
41
  sum int
40
42
  }{
41
- {{range .J.Cases}}{ {{.Factors | printf "%#v"}}, {{.Limit}}, {{.Expected}}}, // {{.Description}}
43
+ {{range .J.Cases}}{ {{.Input.Factors | printf "%#v"}}, {{.Input.Limit}}, {{.Expected}}}, // {{.Description}}
42
44
  {{end}}}
43
45
  `
@@ -1,8 +1,8 @@
1
1
  package summultiples
2
2
 
3
3
  // Source: exercism/problem-specifications
4
- // Commit: df076b2 sum-of-multiples: Add up to 7 test case (#896)
5
- // Problem Specifications Version: 1.1.0
4
+ // Commit: fb5b0a1 sum-of-multiples: Apply new "input" policy
5
+ // Problem Specifications Version: 1.2.0
6
6
 
7
7
  var varTests = []struct {
8
8
  divisors []int
@@ -71,14 +71,13 @@ The [track anatomy documentation](https://github.com/exercism/docs/blob/master/l
71
71
  ├── config.json
72
72
  ├── docs
73
73
  │ ├── ABOUT.md
74
+ ├── EXERCISE_README_INSERT.md
74
75
  │ ├── INSTALLATION.md
75
76
  │ ├── LEARNING.md
76
77
  │ ├── RESOURCES.md
77
78
  │ └── TESTS.md
78
79
  └── exercises
79
- ├── TRACK_HINTS.md
80
80
  └── accumulate
81
- │ ├── HINTS.md
82
81
  │ ├── package.yaml
83
82
  │ ├── stack.yaml
84
83
  │ ├── examples
@@ -88,8 +87,10 @@ The [track anatomy documentation](https://github.com/exercism/docs/blob/master/l
88
87
  │ │ └── Accumuĺate.hs
89
88
  │ ├── src
90
89
  │ │ └── Accumuĺate.hs
91
- └── test
92
- └── Tests.hs
90
+ ├── test
91
+ └── Tests.hs
92
+ │ └── .meta
93
+ │ └── hints.md
93
94
  └── allergies
94
95
  │ ├── ...
95
96
  └── ...
@@ -103,11 +104,11 @@ Each exercise has the following structure:
103
104
  resolver for all the exercises.
104
105
  - `package.yaml` is a file in the [hpack](https://github.com/sol/hpack#readme)
105
106
  format that has all dependencies and build instructions for an exercise.
106
- - `HINTS.md` is an optional file containing instructions and/or hints. It is used together with the respective `description.md` for the exercise from [problem-specifications](https://github.com/exercism/problem-specifications) to build the `README.md` file.
107
107
  - `src/ModuleName.hs` is a [stub solution](#stub-solution).
108
108
  - `examples/success-<name>/package.yaml` contains library dependencies for the [example solution](#example-solution). `<name>` is a unique name for the example - usually "standard" (as in `success-standard`), but it can be some other name in case of multiple example solutions.
109
109
  - `examples/success-<name>/src/ModuleName.hs` is the source code of the sample solution.
110
110
  - `test/Tests.hs` is the [test suite](#test-suite).
111
+ - `.meta/hints.md` is an optional file containing instructions and/or hints. It is used together with the respective `description.md` for the exercise from [problem-specifications](https://github.com/exercism/problem-specifications) to build the `README.md` file.
111
112
 
112
113
  ### Writing an issue
113
114
  To report a bug you should [create an issue](https://help.github.com/articles/creating-an-issue/) on the [exercism/haskell repo](https://github.com/exercism/haskell/issues).