trackler 2.2.1.101 → 2.2.1.102

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/protein-translation/description.md +2 -2
  4. data/problem-specifications/exercises/robot-simulator/canonical-data.json +27 -27
  5. data/problem-specifications/exercises/run-length-encoding/canonical-data.json +40 -14
  6. data/problem-specifications/exercises/tournament/canonical-data.json +71 -49
  7. data/tracks/bash/CONTRIBUTING.md +5 -10
  8. data/tracks/bash/POLICIES.md +57 -0
  9. data/tracks/bash/_template/example.sh +20 -1
  10. data/tracks/bash/exercises/hello-world/hello_world.sh +22 -0
  11. data/tracks/ceylon/exercises/anagram/source/anagram/AnagramTest.ceylon +1 -9
  12. data/tracks/ceylon/exercises/rna-transcription/README.md +1 -1
  13. data/tracks/fsharp/exercises/matrix/Example.fs +16 -13
  14. data/tracks/fsharp/exercises/matrix/Matrix.fs +2 -4
  15. data/tracks/fsharp/exercises/matrix/MatrixTest.fs +26 -67
  16. data/tracks/fsharp/exercises/saddle-points/Example.fs +19 -15
  17. data/tracks/fsharp/exercises/saddle-points/SaddlePointsTest.fs +31 -31
  18. data/tracks/fsharp/exercises/sublist/SublistTest.fs +71 -41
  19. data/tracks/fsharp/exercises/tournament/TournamentTest.fs +115 -48
  20. data/tracks/fsharp/exercises/transpose/Example.fs +10 -13
  21. data/tracks/fsharp/exercises/transpose/TransposeTest.fs +150 -219
  22. data/tracks/fsharp/generators/Generators.fs +55 -0
  23. data/tracks/go/exercises/clock/clock_test.go +1 -1
  24. data/tracks/go/exercises/poker/.meta/gen.go +5 -3
  25. data/tracks/go/exercises/poker/cases_test.go +2 -2
  26. data/tracks/go/exercises/prime-factors/.meta/gen.go +5 -3
  27. data/tracks/go/exercises/prime-factors/cases_test.go +2 -2
  28. data/tracks/go/exercises/rail-fence-cipher/.meta/gen.go +9 -7
  29. data/tracks/go/exercises/rail-fence-cipher/cases_test.go +2 -2
  30. data/tracks/go/exercises/raindrops/.meta/gen.go +4 -2
  31. data/tracks/go/exercises/raindrops/cases_test.go +2 -2
  32. data/tracks/go/exercises/reverse-string/.meta/gen.go +5 -3
  33. data/tracks/go/exercises/reverse-string/cases_test.go +2 -2
  34. data/tracks/go/exercises/rna-transcription/.meta/gen.go +11 -19
  35. data/tracks/go/exercises/rna-transcription/cases_test.go +20 -18
  36. data/tracks/go/exercises/rna-transcription/rna_transcription_test.go +3 -2
  37. data/tracks/go/exercises/run-length-encoding/.meta/gen.go +15 -9
  38. data/tracks/go/exercises/run-length-encoding/cases_test.go +2 -2
  39. data/tracks/go/exercises/sieve/.meta/gen.go +5 -3
  40. data/tracks/go/exercises/sieve/cases_test.go +2 -2
  41. data/tracks/go/exercises/space-age/.meta/gen.go +7 -5
  42. data/tracks/go/exercises/space-age/cases_test.go +2 -2
  43. data/tracks/go/exercises/sublist/.meta/gen.go +7 -5
  44. data/tracks/go/exercises/sublist/cases_test.go +2 -2
  45. data/tracks/go/exercises/variable-length-quantity/.meta/gen.go +7 -5
  46. data/tracks/go/exercises/variable-length-quantity/cases_test.go +2 -2
  47. data/tracks/haskell/exercises/rna-transcription/README.md +1 -1
  48. data/tracks/haskell/exercises/rna-transcription/package.yaml +1 -1
  49. data/tracks/haskell/exercises/rna-transcription/test/Tests.hs +12 -0
  50. data/tracks/javascript/.travis.yml +1 -1
  51. data/tracks/ruby/exercises/accumulate/.meta/hints.md +6 -3
  52. data/tracks/ruby/exercises/accumulate/README.md +6 -3
  53. metadata +4 -3
  54. data/tracks/fsharp/exercises/transpose/TrinaryTest.fs +0 -26
@@ -22,8 +22,10 @@ func main() {
22
22
  type js struct {
23
23
  Cases []struct {
24
24
  Description string
25
- Limit int
26
- Expected []int
25
+ Input struct {
26
+ Limit int
27
+ }
28
+ Expected []int
27
29
  }
28
30
  }
29
31
 
@@ -39,7 +41,7 @@ var testCases = []struct {
39
41
  }{
40
42
  {{range .J.Cases}}{
41
43
  "{{.Description}}",
42
- {{.Limit}},
44
+ {{.Input.Limit}},
43
45
  {{printf "%#v" .Expected}},
44
46
  },
45
47
  {{end}}}
@@ -1,8 +1,8 @@
1
1
  package sieve
2
2
 
3
3
  // Source: exercism/problem-specifications
4
- // Commit: f2b2693 sieve: Fix canonical-data.json formatting
5
- // Problem Specifications Version: 1.0.0
4
+ // Commit: 8bbb634 sieve: Apply new "input" policy
5
+ // Problem Specifications Version: 1.1.0
6
6
 
7
7
  var testCases = []struct {
8
8
  description string
@@ -30,9 +30,11 @@ type js struct {
30
30
  type oneCase struct {
31
31
  Description string
32
32
  Property string
33
- Planet space.Planet
34
- Seconds float64
35
- Expected float64
33
+ Input struct {
34
+ Planet space.Planet
35
+ Seconds float64
36
+ }
37
+ Expected float64
36
38
  }
37
39
 
38
40
  // Template to generate test cases.
@@ -48,8 +50,8 @@ var testCases = []struct {
48
50
  }{ {{range .J.Cases}}
49
51
  {
50
52
  description: {{printf "%q" .Description}},
51
- planet: {{printf "%#v" .Planet}},
52
- seconds: {{printf "%.0f" .Seconds}},
53
+ planet: {{printf "%#v" .Input.Planet}},
54
+ seconds: {{printf "%.0f" .Input.Seconds}},
53
55
  expected: {{printf "%.2f" .Expected}},
54
56
  },{{end}}
55
57
  }
@@ -1,8 +1,8 @@
1
1
  package space
2
2
 
3
3
  // Source: exercism/problem-specifications
4
- // Commit: 7c63e40 space-age: Fix canonical-data.json formatting
5
- // Problem Specifications Version: 1.0.0
4
+ // Commit: 8d4df79 space-age: Apply new "input" policy
5
+ // Problem Specifications Version: 1.1.0
6
6
 
7
7
  var testCases = []struct {
8
8
  description string
@@ -30,9 +30,11 @@ type js struct {
30
30
  type oneCase struct {
31
31
  Description string
32
32
  Property string
33
- ListOne []int `json:"listOne"`
34
- ListTwo []int `json:"listTwo"`
35
- Expected sublist.Relation
33
+ Input struct {
34
+ ListOne []int `json:"listOne"`
35
+ ListTwo []int `json:"listTwo"`
36
+ }
37
+ Expected sublist.Relation
36
38
  }
37
39
 
38
40
  // Template to generate test cases.
@@ -48,8 +50,8 @@ var testCases = []struct {
48
50
  }{ {{range .J.Cases}}
49
51
  {
50
52
  description: {{printf "%q" .Description}},
51
- listOne: {{printf "%#v" .ListOne}},
52
- listTwo: {{printf "%#v" .ListTwo}},
53
+ listOne: {{printf "%#v" .Input.ListOne}},
54
+ listTwo: {{printf "%#v" .Input.ListTwo}},
53
55
  expected: {{printf "%#v" .Expected}},
54
56
  },{{end}}
55
57
  }
@@ -1,8 +1,8 @@
1
1
  package sublist
2
2
 
3
3
  // Source: exercism/problem-specifications
4
- // Commit: 71e24b5 sublist: Fix canonical-data.json formatting
5
- // Problem Specifications Version: 1.0.0
4
+ // Commit: 1854cd4 sublist: Apply new "input" policy
5
+ // Problem Specifications Version: 1.1.0
6
6
 
7
7
  var testCases = []struct {
8
8
  description string
@@ -43,9 +43,11 @@ type TestGroup struct {
43
43
 
44
44
  type OneCase struct {
45
45
  Description string
46
- Property string // "encode" or "decode"
47
- Input []uint32 // supports both []byte and []uint32 in JSON.
48
- Expected []uint32 // supports []byte, []uint32, or null in JSON.
46
+ Property string // "encode" or "decode"
47
+ Input struct {
48
+ Integers []uint32 // supports both []byte and []uint32 in JSON.
49
+ }
50
+ Expected []uint32 // supports []byte, []uint32, or null in JSON.
49
51
  }
50
52
 
51
53
  // PropertyMatch returns true when given test case c has .Property field matching property;
@@ -85,7 +87,7 @@ var encodeTestCases = []struct {
85
87
  }{ {{range .J.Groups}} {{range .Cases}}
86
88
  {{if .PropertyMatch "encode"}} {
87
89
  {{printf "%q" .Description}},
88
- {{printf "%#v" .Input }},
90
+ {{printf "%#v" .Input.Integers }},
89
91
  {{byteSlice .Expected | printf "%#v" }},
90
92
  },{{- end}}{{end}}{{end}}
91
93
  }
@@ -98,7 +100,7 @@ var decodeTestCases = []struct {
98
100
  }{ {{range .J.Groups}} {{range .Cases}}
99
101
  {{if .PropertyMatch "decode"}} {
100
102
  {{printf "%q" .Description}},
101
- {{byteSlice .Input | printf "%#v" }},
103
+ {{byteSlice .Input.Integers | printf "%#v" }},
102
104
  {{printf "%#v" .Expected }},
103
105
  },{{- end}}{{end}}{{end}}
104
106
  }
@@ -1,8 +1,8 @@
1
1
  package variablelengthquantity
2
2
 
3
3
  // Source: exercism/problem-specifications
4
- // Commit: d6a62f7 variable-length-quantity: Fix canonical-data.json formatting
5
- // Problem Specifications Version: 1.0.0
4
+ // Commit: 48dc5e6 variable-length-quantity: Apply new "input" policy
5
+ // Problem Specifications Version: 1.1.0
6
6
 
7
7
  // Encode a series of integers, producing a series of bytes.
8
8
  var encodeTestCases = []struct {
@@ -73,7 +73,7 @@ one, head over there and create an issue. We'll do our best to help you!
73
73
 
74
74
  ## Source
75
75
 
76
- Rosalind [http://rosalind.info/problems/rna](http://rosalind.info/problems/rna)
76
+ Hyperphysics [http://hyperphysics.phy-astr.gsu.edu/hbase/Organic/transcription.html](http://hyperphysics.phy-astr.gsu.edu/hbase/Organic/transcription.html)
77
77
 
78
78
  ## Submitting Incomplete Solutions
79
79
  It's possible to submit an incomplete solution so you can see how others have completed the exercise.
@@ -1,5 +1,5 @@
1
1
  name: rna-transcription
2
- version: 1.2.0.6
2
+ version: 1.2.0.7
3
3
 
4
4
  dependencies:
5
5
  - base
@@ -40,4 +40,16 @@ cases = [ Case { description = "RNA complement of cytosine is guanine"
40
40
  , dna = "ACGTGGTCTTAA"
41
41
  , expected = Just "UGCACCAGAAUU"
42
42
  }
43
+ , Case { description = "correctly handles invalid input (RNA instead of DNA)"
44
+ , dna = "U"
45
+ , expected = Nothing
46
+ }
47
+ , Case { description = "correctly handles completely invalid DNA input"
48
+ , dna = "XXX"
49
+ , expected = Nothing
50
+ }
51
+ , Case { description = "correctly handles partially invalid DNA input"
52
+ , dna = "ACGTXXXCTTAA"
53
+ , expected = Nothing
54
+ }
43
55
  ]
@@ -3,7 +3,7 @@ language: node_js
3
3
  sudo: false
4
4
 
5
5
  node_js:
6
- - "node"
6
+ - "lts/*"
7
7
 
8
8
  install:
9
9
  - "npm install"
@@ -5,9 +5,12 @@ It is typical to call [#to_enum](http://ruby-doc.org/core-2.3.1/Object.html#meth
5
5
  Here is an additional test you could add:
6
6
 
7
7
  ```ruby
8
- def test_no_block_is_passed
8
+ def test_accumulate_when_block_is_deferred
9
9
  skip
10
- result = [1, 2, 3].accumulate
11
- assert_instance_of Enumerator, result
10
+ accumulate_enumerator = [1, 2, 3].accumulate
11
+ accumulated_result = accumulate_enumerator.each do |number|
12
+ number * number
13
+ end
14
+ assert_equal [1, 4, 9], accumulated_result
12
15
  end
13
16
  ```
@@ -32,10 +32,13 @@ It is typical to call [#to_enum](http://ruby-doc.org/core-2.3.1/Object.html#meth
32
32
  Here is an additional test you could add:
33
33
 
34
34
  ```ruby
35
- def test_no_block_is_passed
35
+ def test_accumulate_when_block_is_deferred
36
36
  skip
37
- result = [1, 2, 3].accumulate
38
- assert_instance_of Enumerator, result
37
+ accumulate_enumerator = [1, 2, 3].accumulate
38
+ accumulated_result = accumulate_enumerator.each do |number|
39
+ number * number
40
+ end
41
+ assert_equal [1, 4, 9], accumulated_result
39
42
  end
40
43
  ```
41
44
 
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.2.1.101
4
+ version: 2.2.1.102
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Owen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-30 00:00:00.000000000 Z
11
+ date: 2018-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -594,6 +594,7 @@ files:
594
594
  - tracks/bash/.travis.yml
595
595
  - tracks/bash/CONTRIBUTING.md
596
596
  - tracks/bash/LICENSE
597
+ - tracks/bash/POLICIES.md
597
598
  - tracks/bash/README.md
598
599
  - tracks/bash/_template/.meta/.keep
599
600
  - tracks/bash/_template/README.md
@@ -648,6 +649,7 @@ files:
648
649
  - tracks/bash/exercises/hello-world/.meta/hints.md
649
650
  - tracks/bash/exercises/hello-world/README.md
650
651
  - tracks/bash/exercises/hello-world/example.sh
652
+ - tracks/bash/exercises/hello-world/hello_world.sh
651
653
  - tracks/bash/exercises/hello-world/hello_world_test.sh
652
654
  - tracks/bash/exercises/leap/.meta/version
653
655
  - tracks/bash/exercises/leap/README.md
@@ -5706,7 +5708,6 @@ files:
5706
5708
  - tracks/fsharp/exercises/transpose/Transpose.fs
5707
5709
  - tracks/fsharp/exercises/transpose/Transpose.fsproj
5708
5710
  - tracks/fsharp/exercises/transpose/TransposeTest.fs
5709
- - tracks/fsharp/exercises/transpose/TrinaryTest.fs
5710
5711
  - tracks/fsharp/exercises/tree-building/Example.fs
5711
5712
  - tracks/fsharp/exercises/tree-building/Program.fs
5712
5713
  - tracks/fsharp/exercises/tree-building/README.md
@@ -1,26 +0,0 @@
1
- // This file was created manually and its version is 1.0.0.
2
-
3
- module TrinaryTest
4
-
5
- open NUnit.Framework
6
- open Trinary
7
-
8
- [<TestCase("1", ExpectedResult = 1)>]
9
- [<TestCase("2", ExpectedResult = 2, Ignore = "Remove to run test case")>]
10
- [<TestCase("10", ExpectedResult = 3, Ignore = "Remove to run test case")>]
11
- [<TestCase("11", ExpectedResult = 4, Ignore = "Remove to run test case")>]
12
- [<TestCase("100", ExpectedResult = 9, Ignore = "Remove to run test case")>]
13
- [<TestCase("112", ExpectedResult = 14, Ignore = "Remove to run test case")>]
14
- [<TestCase("222", ExpectedResult = 26, Ignore = "Remove to run test case")>]
15
- [<TestCase("1122000120", ExpectedResult = 32091, Ignore = "Remove to run test case")>]
16
- let ``Binary converts to decimal`` input =
17
- toDecimal input
18
-
19
- [<TestCase("carrot", Ignore = "Remove to run test case")>]
20
- [<TestCase("3", Ignore = "Remove to run test case")>]
21
- [<TestCase("6", Ignore = "Remove to run test case")>]
22
- [<TestCase("9", Ignore = "Remove to run test case")>]
23
- [<TestCase("124578", Ignore = "Remove to run test case")>]
24
- [<TestCase("abc1z", Ignore = "Remove to run test case")>]
25
- let ``Invalid binary is decimal 0`` input =
26
- Assert.That(toDecimal input, Is.EqualTo(0))