trackler 2.2.1.15 → 2.2.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/TOPICS.txt +8 -1
- data/tracks/c/docs/SNIPPET.txt +11 -0
- data/tracks/ceylon/docs/SNIPPET.txt +3 -0
- data/tracks/clojure/docs/SNIPPET.txt +5 -0
- data/tracks/csharp/build.cake +23 -16
- data/tracks/csharp/build.ps1 +1 -1
- data/tracks/csharp/build.sh +1 -1
- data/tracks/csharp/exercises/pangram/PangramTest.cs +9 -18
- data/tracks/csharp/generators/.gitignore +2 -1
- data/tracks/csharp/generators/Exercise.cs +11 -12
- data/tracks/csharp/generators/Exercises/AllYourBase.cs +2 -2
- data/tracks/csharp/generators/Exercises/Allergies.cs +1 -1
- data/tracks/csharp/generators/Exercises/Alphametics.cs +1 -1
- data/tracks/csharp/generators/Exercises/Anagram.cs +1 -1
- data/tracks/csharp/generators/Exercises/BeerSong.cs +1 -1
- data/tracks/csharp/generators/Exercises/BinarySearch.cs +1 -1
- data/tracks/csharp/generators/Exercises/BookStore.cs +1 -1
- data/tracks/csharp/generators/Exercises/BracketPush.cs +1 -1
- data/tracks/csharp/generators/Exercises/CollatzConjecture.cs +2 -2
- data/tracks/csharp/generators/Exercises/CryptoSquare.cs +1 -1
- data/tracks/csharp/generators/Exercises/FoodChain.cs +1 -1
- data/tracks/csharp/generators/Exercises/Gigasecond.cs +1 -1
- data/tracks/csharp/generators/Exercises/Hamming.cs +1 -1
- data/tracks/csharp/generators/Exercises/House.cs +1 -1
- data/tracks/csharp/generators/Exercises/Leap.cs +1 -1
- data/tracks/csharp/generators/Exercises/Luhn.cs +1 -1
- data/tracks/csharp/generators/Exercises/NthPrime.cs +1 -1
- data/tracks/csharp/generators/Exercises/Pangram.cs +1 -11
- data/tracks/csharp/generators/Exercises/PerfectNumbers.cs +1 -1
- data/tracks/csharp/generators/Exercises/PhoneNumber.cs +1 -1
- data/tracks/csharp/generators/Exercises/RailFenceCipher.cs +1 -1
- data/tracks/csharp/generators/Exercises/RnaTranscription.cs +1 -1
- data/tracks/csharp/generators/Exercises/RomanNumerals.cs +1 -1
- data/tracks/csharp/generators/Exercises/RunLengthEncoding.cs +1 -1
- data/tracks/csharp/generators/Exercises/Say.cs +2 -7
- data/tracks/csharp/generators/Exercises/SecretHandshake.cs +1 -1
- data/tracks/csharp/generators/Exercises/Sieve.cs +1 -1
- data/tracks/csharp/generators/Exercises/SpaceAge.cs +1 -1
- data/tracks/csharp/generators/Exercises/SumOfMultiples.cs +1 -1
- data/tracks/csharp/generators/Exercises/Transpose.cs +1 -1
- data/tracks/csharp/generators/Exercises/WordCount.cs +1 -1
- data/tracks/csharp/generators/Exercises/Wordy.cs +1 -1
- data/tracks/csharp/generators/Output/FormattingExtensions.cs +4 -2
- data/tracks/csharp/generators/Output/ValueFormatter.cs +1 -1
- data/tracks/delphi/docs/SNIPPET.txt +6 -13
- data/tracks/ecmascript/docs/SNIPPET.txt +7 -0
- data/tracks/elisp/docs/SNIPPET.txt +13 -0
- data/tracks/elixir/config.json +2 -2
- data/tracks/elixir/docs/SNIPPET.txt +10 -0
- data/tracks/erlang/docs/SNIPPET.txt +8 -0
- data/tracks/fsharp/docs/SNIPPET.txt +3 -0
- data/tracks/go/config.json +174 -174
- data/tracks/go/config/maintainers.json +6 -9
- data/tracks/go/docs/SNIPPET.txt +6 -0
- data/tracks/groovy/config.json +4 -4
- data/tracks/groovy/docs/SNIPPET.txt +12 -0
- data/tracks/haskell/config.json +2 -0
- data/tracks/haskell/docs/SNIPPET.txt +4 -0
- data/tracks/java/docs/SNIPPET.txt +7 -0
- data/tracks/java/exercises/robot-simulator/src/example/java/GridPosition.java +21 -16
- data/tracks/java/exercises/robot-simulator/src/test/java/RobotTest.java +24 -24
- data/tracks/javascript/docs/SNIPPET.txt +10 -0
- data/tracks/kotlin/docs/SNIPPET.txt +3 -0
- data/tracks/kotlin/exercises/change/src/example/kotlin/ChangeCalculator.kt +35 -0
- data/tracks/kotlin/exercises/change/src/test/kotlin/ChangeCalculatorTest.kt +105 -0
- data/tracks/lfe/docs/SNIPPET.txt +12 -0
- data/tracks/lua/docs/SNIPPET.txt +7 -0
- data/tracks/mips/docs/SNIPPET.txt +23 -0
- data/tracks/ocaml/docs/SNIPPET.txt +1 -0
- data/tracks/purescript/config.json +1 -1
- data/tracks/purescript/docs/SNIPPET.txt +8 -0
- data/tracks/python/exercises/saddle-points/README.md +1 -1
- data/tracks/racket/docs/SNIPPET.txt +6 -0
- data/tracks/ruby/docs/SNIPPET.txt +5 -0
- data/tracks/rust/docs/SNIPPET.txt +3 -0
- data/tracks/scala/docs/SNIPPET.txt +4 -0
- data/tracks/scala/exercises/ocr-numbers/example.scala +17 -11
- data/tracks/scala/exercises/ocr-numbers/src/test/scala/OcrNumbersTest.scala +153 -0
- data/tracks/scala/exercises/pig-latin/example.scala +11 -6
- data/tracks/scala/exercises/pig-latin/src/test/scala/PigLatinTest.scala +80 -10
- data/tracks/scala/testgen/src/main/scala/OcrNumbersTestGenerator.scala +34 -0
- data/tracks/scala/testgen/src/main/scala/PigLatinTestGenerator.scala +16 -0
- data/tracks/scheme/docs/SNIPPET.txt +7 -0
- data/tracks/sml/bin/generate +277 -0
- data/tracks/sml/config.json +30 -0
- data/tracks/sml/docs/ABOUT.md +32 -0
- data/tracks/sml/docs/LEARNING.md +37 -0
- data/tracks/sml/docs/SNIPPET.txt +3 -0
- data/tracks/sml/exercises/bob/README.md +48 -0
- data/tracks/sml/exercises/bob/bob.sml +2 -0
- data/tracks/sml/exercises/bob/example.sml +22 -0
- data/tracks/sml/exercises/bob/test.sml +87 -0
- data/tracks/sml/exercises/bob/testlib.sml +159 -0
- data/tracks/sml/exercises/difference-of-squares/README.md +49 -0
- data/tracks/sml/exercises/difference-of-squares/difference-of-squares.sml +8 -0
- data/tracks/sml/exercises/difference-of-squares/example.sml +11 -0
- data/tracks/sml/exercises/difference-of-squares/test.sml +45 -0
- data/tracks/sml/exercises/difference-of-squares/testlib.sml +159 -0
- data/tracks/sml/exercises/hello-world/README.md +51 -0
- data/tracks/sml/exercises/hello-world/example.sml +1 -0
- data/tracks/sml/exercises/hello-world/hello-world.sml +2 -0
- data/tracks/sml/exercises/hello-world/test.sml +15 -0
- data/tracks/sml/exercises/hello-world/testlib.sml +159 -0
- data/tracks/sml/lib/testlib.sml +159 -0
- data/tracks/swift/docs/SNIPPET.txt +9 -0
- data/tracks/typescript/docs/SNIPPET.txt +8 -0
- metadata +53 -6
- data/tracks/csharp/generators/Generators.csproj.user +0 -6
- data/tracks/kotlin/exercises/change/src/example/kotlin/Change.kt +0 -70
- data/tracks/kotlin/exercises/change/src/test/kotlin/ChangeTest.kt +0 -55
- data/tracks/scala/exercises/ocr-numbers/src/test/scala/OcrTest.scala +0 -138
@@ -0,0 +1,51 @@
|
|
1
|
+
# Hello World
|
2
|
+
|
3
|
+
The classical introductory exercise. Just say "Hello, World!".
|
4
|
+
|
5
|
+
["Hello, World!"](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program) is
|
6
|
+
the traditional first program for beginning programming in a new language
|
7
|
+
or environment.
|
8
|
+
|
9
|
+
The objectives are simple:
|
10
|
+
|
11
|
+
- Write a function that returns the string "Hello, World!".
|
12
|
+
- Run the test suite and make sure that it succeeds.
|
13
|
+
- Submit your solution and check it at the website.
|
14
|
+
|
15
|
+
If everything goes well, you will be ready to fetch your first real exercise.
|
16
|
+
|
17
|
+
## Loading your exercise implementation in PolyML
|
18
|
+
|
19
|
+
```
|
20
|
+
$ poly --use {exercise}.sml
|
21
|
+
```
|
22
|
+
|
23
|
+
Or:
|
24
|
+
|
25
|
+
```
|
26
|
+
$ poly
|
27
|
+
> use "{exercise}.sml";
|
28
|
+
```
|
29
|
+
|
30
|
+
**Note:** You have to replace {exercise}.
|
31
|
+
|
32
|
+
## Running the tests
|
33
|
+
|
34
|
+
```
|
35
|
+
$ poly -q --use test.sml
|
36
|
+
```
|
37
|
+
|
38
|
+
## Feedback, Issues, Pull Requests
|
39
|
+
|
40
|
+
The [exercism/sml](https://github.com/exercism/sml) repository on
|
41
|
+
GitHub is the home for all of the Standard ML exercises.
|
42
|
+
|
43
|
+
If you have feedback about an exercise, or want to help implementing a new
|
44
|
+
one, head over there and create an issue. We'll do our best to help you!
|
45
|
+
|
46
|
+
## Source
|
47
|
+
|
48
|
+
This is an exercise to introduce users to using Exercism [http://en.wikipedia.org/wiki/%22Hello,_world!%22_program](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program)
|
49
|
+
|
50
|
+
## Submitting Incomplete Solutions
|
51
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1 @@
|
|
1
|
+
fun hello (): string = "Hello, World!"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
(* version 1.0.0 *)
|
2
|
+
|
3
|
+
use "hello-world.sml";
|
4
|
+
use "testlib.sml";
|
5
|
+
|
6
|
+
infixr |>
|
7
|
+
fun x |> f = f x
|
8
|
+
|
9
|
+
val testsuite =
|
10
|
+
describe "hello-world" [
|
11
|
+
test "Say Hi!"
|
12
|
+
(fn _ => hello () |> Expect.equalTo "Hello, World!")
|
13
|
+
]
|
14
|
+
|
15
|
+
val _ = Test.run testsuite
|
@@ -0,0 +1,159 @@
|
|
1
|
+
structure Expect =
|
2
|
+
struct
|
3
|
+
datatype expectation = Pass | Fail of string * string
|
4
|
+
|
5
|
+
local
|
6
|
+
fun failEq b a =
|
7
|
+
Fail ("Expected: " ^ b, "Got: " ^ a)
|
8
|
+
|
9
|
+
fun failExn b a =
|
10
|
+
Fail ("Expected: " ^ b, "Raised: " ^ a)
|
11
|
+
|
12
|
+
fun exnName (e: exn): string = General.exnName e
|
13
|
+
in
|
14
|
+
fun truthy a =
|
15
|
+
if a
|
16
|
+
then Pass
|
17
|
+
else failEq "true" "false"
|
18
|
+
|
19
|
+
fun falsy a =
|
20
|
+
if a
|
21
|
+
then failEq "false" "true"
|
22
|
+
else Pass
|
23
|
+
|
24
|
+
fun equalTo b a =
|
25
|
+
if a = b
|
26
|
+
then Pass
|
27
|
+
else failEq (PolyML.makestring b) (PolyML.makestring a)
|
28
|
+
|
29
|
+
fun nearTo b a =
|
30
|
+
if Real.== (a, b)
|
31
|
+
then Pass
|
32
|
+
else failEq (Real.toString b) (Real.toString a)
|
33
|
+
|
34
|
+
fun anyError f =
|
35
|
+
(
|
36
|
+
f ();
|
37
|
+
failExn "an exception" "Nothing"
|
38
|
+
) handle _ => Pass
|
39
|
+
|
40
|
+
fun error e f =
|
41
|
+
(
|
42
|
+
f ();
|
43
|
+
failExn (exnName e) "Nothing"
|
44
|
+
) handle e' => if exnMessage e' = exnMessage e
|
45
|
+
then Pass
|
46
|
+
else failExn (exnMessage e) (exnMessage e')
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
structure TermColor =
|
51
|
+
struct
|
52
|
+
datatype color = Red | Green | Yellow | Normal
|
53
|
+
|
54
|
+
fun f Red = "\027[31m"
|
55
|
+
| f Green = "\027[32m"
|
56
|
+
| f Yellow = "\027[33m"
|
57
|
+
| f Normal = "\027[0m"
|
58
|
+
|
59
|
+
fun colorize color s = (f color) ^ s ^ (f Normal)
|
60
|
+
|
61
|
+
val redit = colorize Red
|
62
|
+
|
63
|
+
val greenit = colorize Green
|
64
|
+
|
65
|
+
val yellowit = colorize Yellow
|
66
|
+
end
|
67
|
+
|
68
|
+
structure Test =
|
69
|
+
struct
|
70
|
+
datatype testnode = TestGroup of string * testnode list
|
71
|
+
| Test of string * (unit -> Expect.expectation)
|
72
|
+
|
73
|
+
local
|
74
|
+
datatype evaluation = Success of string
|
75
|
+
| Failure of string * string * string
|
76
|
+
| Error of string * string
|
77
|
+
|
78
|
+
fun indent n s = (implode (List.tabulate (n, fn _ => #" "))) ^ s
|
79
|
+
|
80
|
+
fun fmt indentlvl ev =
|
81
|
+
let
|
82
|
+
val check = TermColor.greenit "\226\156\148 " (* ✔ *)
|
83
|
+
val cross = TermColor.redit "\226\156\150 " (* ✖ *)
|
84
|
+
val indentlvl = indentlvl * 2
|
85
|
+
in
|
86
|
+
case ev of
|
87
|
+
Success descr => indent indentlvl (check ^ descr)
|
88
|
+
| Failure (descr, exp, got) =>
|
89
|
+
String.concatWith "\n" [indent indentlvl (cross ^ descr),
|
90
|
+
indent (indentlvl + 2) exp,
|
91
|
+
indent (indentlvl + 2) got]
|
92
|
+
| Error (descr, reason) =>
|
93
|
+
String.concatWith "\n" [indent indentlvl (cross ^ descr),
|
94
|
+
indent (indentlvl + 2) (TermColor.redit reason)]
|
95
|
+
end
|
96
|
+
|
97
|
+
fun eval (TestGroup _) = raise Fail "Only a 'Test' can be evaluated"
|
98
|
+
| eval (Test (descr, thunk)) =
|
99
|
+
(
|
100
|
+
case thunk () of
|
101
|
+
Expect.Pass => ((1, 0, 0), Success descr)
|
102
|
+
| Expect.Fail (s, s') => ((0, 1, 0), Failure (descr, s, s'))
|
103
|
+
)
|
104
|
+
handle e => ((0, 0, 1), Error (descr, "Unexpected error: " ^ exnMessage e))
|
105
|
+
|
106
|
+
fun flatten depth testnode =
|
107
|
+
let
|
108
|
+
fun sum (x, y, z) (a, b, c) = (x + a, y + b, z + c)
|
109
|
+
|
110
|
+
fun aux (t, (counter, acc)) =
|
111
|
+
let
|
112
|
+
val (counter', texts) = flatten (depth + 1) t
|
113
|
+
in
|
114
|
+
(sum counter' counter, texts :: acc)
|
115
|
+
end
|
116
|
+
in
|
117
|
+
case testnode of
|
118
|
+
TestGroup (descr, ts) =>
|
119
|
+
let
|
120
|
+
val (counter, texts) = foldr aux ((0, 0, 0), []) ts
|
121
|
+
in
|
122
|
+
(counter, (indent (depth * 2) descr) :: List.concat texts)
|
123
|
+
end
|
124
|
+
| Test _ =>
|
125
|
+
let
|
126
|
+
val (counter, evaluation) = eval testnode
|
127
|
+
in
|
128
|
+
(counter, [fmt depth evaluation])
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
fun println s = print (s ^ "\n")
|
133
|
+
in
|
134
|
+
fun run suite =
|
135
|
+
let
|
136
|
+
val ((succeeded, failed, errored), texts) = flatten 0 suite
|
137
|
+
|
138
|
+
val summary = String.concatWith ", " [
|
139
|
+
TermColor.greenit ((Int.toString succeeded) ^ " passed"),
|
140
|
+
TermColor.redit ((Int.toString failed) ^ " failed"),
|
141
|
+
TermColor.redit ((Int.toString errored) ^ " errored"),
|
142
|
+
(Int.toString (succeeded + failed + errored)) ^ " total"
|
143
|
+
]
|
144
|
+
|
145
|
+
val status = if failed = 0 andalso errored = 0
|
146
|
+
then OS.Process.success
|
147
|
+
else OS.Process.failure
|
148
|
+
|
149
|
+
in
|
150
|
+
List.app println texts;
|
151
|
+
println "";
|
152
|
+
println ("Tests: " ^ summary);
|
153
|
+
OS.Process.exit status
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
fun describe description tests = Test.TestGroup (description, tests)
|
159
|
+
fun test description thunk = Test.Test (description, thunk)
|
@@ -0,0 +1,159 @@
|
|
1
|
+
structure Expect =
|
2
|
+
struct
|
3
|
+
datatype expectation = Pass | Fail of string * string
|
4
|
+
|
5
|
+
local
|
6
|
+
fun failEq b a =
|
7
|
+
Fail ("Expected: " ^ b, "Got: " ^ a)
|
8
|
+
|
9
|
+
fun failExn b a =
|
10
|
+
Fail ("Expected: " ^ b, "Raised: " ^ a)
|
11
|
+
|
12
|
+
fun exnName (e: exn): string = General.exnName e
|
13
|
+
in
|
14
|
+
fun truthy a =
|
15
|
+
if a
|
16
|
+
then Pass
|
17
|
+
else failEq "true" "false"
|
18
|
+
|
19
|
+
fun falsy a =
|
20
|
+
if a
|
21
|
+
then failEq "false" "true"
|
22
|
+
else Pass
|
23
|
+
|
24
|
+
fun equalTo b a =
|
25
|
+
if a = b
|
26
|
+
then Pass
|
27
|
+
else failEq (PolyML.makestring b) (PolyML.makestring a)
|
28
|
+
|
29
|
+
fun nearTo b a =
|
30
|
+
if Real.== (a, b)
|
31
|
+
then Pass
|
32
|
+
else failEq (Real.toString b) (Real.toString a)
|
33
|
+
|
34
|
+
fun anyError f =
|
35
|
+
(
|
36
|
+
f ();
|
37
|
+
failExn "an exception" "Nothing"
|
38
|
+
) handle _ => Pass
|
39
|
+
|
40
|
+
fun error e f =
|
41
|
+
(
|
42
|
+
f ();
|
43
|
+
failExn (exnName e) "Nothing"
|
44
|
+
) handle e' => if exnMessage e' = exnMessage e
|
45
|
+
then Pass
|
46
|
+
else failExn (exnMessage e) (exnMessage e')
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
structure TermColor =
|
51
|
+
struct
|
52
|
+
datatype color = Red | Green | Yellow | Normal
|
53
|
+
|
54
|
+
fun f Red = "\027[31m"
|
55
|
+
| f Green = "\027[32m"
|
56
|
+
| f Yellow = "\027[33m"
|
57
|
+
| f Normal = "\027[0m"
|
58
|
+
|
59
|
+
fun colorize color s = (f color) ^ s ^ (f Normal)
|
60
|
+
|
61
|
+
val redit = colorize Red
|
62
|
+
|
63
|
+
val greenit = colorize Green
|
64
|
+
|
65
|
+
val yellowit = colorize Yellow
|
66
|
+
end
|
67
|
+
|
68
|
+
structure Test =
|
69
|
+
struct
|
70
|
+
datatype testnode = TestGroup of string * testnode list
|
71
|
+
| Test of string * (unit -> Expect.expectation)
|
72
|
+
|
73
|
+
local
|
74
|
+
datatype evaluation = Success of string
|
75
|
+
| Failure of string * string * string
|
76
|
+
| Error of string * string
|
77
|
+
|
78
|
+
fun indent n s = (implode (List.tabulate (n, fn _ => #" "))) ^ s
|
79
|
+
|
80
|
+
fun fmt indentlvl ev =
|
81
|
+
let
|
82
|
+
val check = TermColor.greenit "\226\156\148 " (* ✔ *)
|
83
|
+
val cross = TermColor.redit "\226\156\150 " (* ✖ *)
|
84
|
+
val indentlvl = indentlvl * 2
|
85
|
+
in
|
86
|
+
case ev of
|
87
|
+
Success descr => indent indentlvl (check ^ descr)
|
88
|
+
| Failure (descr, exp, got) =>
|
89
|
+
String.concatWith "\n" [indent indentlvl (cross ^ descr),
|
90
|
+
indent (indentlvl + 2) exp,
|
91
|
+
indent (indentlvl + 2) got]
|
92
|
+
| Error (descr, reason) =>
|
93
|
+
String.concatWith "\n" [indent indentlvl (cross ^ descr),
|
94
|
+
indent (indentlvl + 2) (TermColor.redit reason)]
|
95
|
+
end
|
96
|
+
|
97
|
+
fun eval (TestGroup _) = raise Fail "Only a 'Test' can be evaluated"
|
98
|
+
| eval (Test (descr, thunk)) =
|
99
|
+
(
|
100
|
+
case thunk () of
|
101
|
+
Expect.Pass => ((1, 0, 0), Success descr)
|
102
|
+
| Expect.Fail (s, s') => ((0, 1, 0), Failure (descr, s, s'))
|
103
|
+
)
|
104
|
+
handle e => ((0, 0, 1), Error (descr, "Unexpected error: " ^ exnMessage e))
|
105
|
+
|
106
|
+
fun flatten depth testnode =
|
107
|
+
let
|
108
|
+
fun sum (x, y, z) (a, b, c) = (x + a, y + b, z + c)
|
109
|
+
|
110
|
+
fun aux (t, (counter, acc)) =
|
111
|
+
let
|
112
|
+
val (counter', texts) = flatten (depth + 1) t
|
113
|
+
in
|
114
|
+
(sum counter' counter, texts :: acc)
|
115
|
+
end
|
116
|
+
in
|
117
|
+
case testnode of
|
118
|
+
TestGroup (descr, ts) =>
|
119
|
+
let
|
120
|
+
val (counter, texts) = foldr aux ((0, 0, 0), []) ts
|
121
|
+
in
|
122
|
+
(counter, (indent (depth * 2) descr) :: List.concat texts)
|
123
|
+
end
|
124
|
+
| Test _ =>
|
125
|
+
let
|
126
|
+
val (counter, evaluation) = eval testnode
|
127
|
+
in
|
128
|
+
(counter, [fmt depth evaluation])
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
fun println s = print (s ^ "\n")
|
133
|
+
in
|
134
|
+
fun run suite =
|
135
|
+
let
|
136
|
+
val ((succeeded, failed, errored), texts) = flatten 0 suite
|
137
|
+
|
138
|
+
val summary = String.concatWith ", " [
|
139
|
+
TermColor.greenit ((Int.toString succeeded) ^ " passed"),
|
140
|
+
TermColor.redit ((Int.toString failed) ^ " failed"),
|
141
|
+
TermColor.redit ((Int.toString errored) ^ " errored"),
|
142
|
+
(Int.toString (succeeded + failed + errored)) ^ " total"
|
143
|
+
]
|
144
|
+
|
145
|
+
val status = if failed = 0 andalso errored = 0
|
146
|
+
then OS.Process.success
|
147
|
+
else OS.Process.failure
|
148
|
+
|
149
|
+
in
|
150
|
+
List.app println texts;
|
151
|
+
println "";
|
152
|
+
println ("Tests: " ^ summary);
|
153
|
+
OS.Process.exit status
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
fun describe description tests = Test.TestGroup (description, tests)
|
159
|
+
fun test description thunk = Test.Test (description, thunk)
|
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.
|
4
|
+
version: 2.2.1.16
|
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-08-
|
11
|
+
date: 2017-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -637,6 +637,7 @@ files:
|
|
637
637
|
- tracks/c/docs/INSTALLATION.md
|
638
638
|
- tracks/c/docs/LEARNING.md
|
639
639
|
- tracks/c/docs/RESOURCES.md
|
640
|
+
- tracks/c/docs/SNIPPET.txt
|
640
641
|
- tracks/c/docs/TESTS.md
|
641
642
|
- tracks/c/exercises/acronym/README.md
|
642
643
|
- tracks/c/exercises/acronym/makefile
|
@@ -966,6 +967,7 @@ files:
|
|
966
967
|
- tracks/ceylon/docs/INSTALLATION.md
|
967
968
|
- tracks/ceylon/docs/LEARNING.md
|
968
969
|
- tracks/ceylon/docs/RESOURCES.md
|
970
|
+
- tracks/ceylon/docs/SNIPPET.txt
|
969
971
|
- tracks/ceylon/docs/TESTS.md
|
970
972
|
- tracks/ceylon/exercises/anagram/README.md
|
971
973
|
- tracks/ceylon/exercises/anagram/example/Anagram.ceylon
|
@@ -1025,6 +1027,7 @@ files:
|
|
1025
1027
|
- tracks/clojure/docs/INSTALLATION.org
|
1026
1028
|
- tracks/clojure/docs/LEARNING.org
|
1027
1029
|
- tracks/clojure/docs/RESOURCES.org
|
1030
|
+
- tracks/clojure/docs/SNIPPET.txt
|
1028
1031
|
- tracks/clojure/docs/TESTS.org
|
1029
1032
|
- tracks/clojure/exercises/accumulate/README.md
|
1030
1033
|
- tracks/clojure/exercises/accumulate/project.clj
|
@@ -2383,7 +2386,6 @@ files:
|
|
2383
2386
|
- tracks/csharp/generators/Exercises/WordCount.cs
|
2384
2387
|
- tracks/csharp/generators/Exercises/Wordy.cs
|
2385
2388
|
- tracks/csharp/generators/Generators.csproj
|
2386
|
-
- tracks/csharp/generators/Generators.csproj.user
|
2387
2389
|
- tracks/csharp/generators/Generators.sln
|
2388
2390
|
- tracks/csharp/generators/Input/CanonicalData.cs
|
2389
2391
|
- tracks/csharp/generators/Input/CanonicalDataCase.cs
|
@@ -2740,6 +2742,7 @@ files:
|
|
2740
2742
|
- tracks/ecmascript/docs/INSTALLATION.md
|
2741
2743
|
- tracks/ecmascript/docs/LEARNING.md
|
2742
2744
|
- tracks/ecmascript/docs/RESOURCES.md
|
2745
|
+
- tracks/ecmascript/docs/SNIPPET.txt
|
2743
2746
|
- tracks/ecmascript/docs/TESTS.md
|
2744
2747
|
- tracks/ecmascript/exercises/accumulate/README.md
|
2745
2748
|
- tracks/ecmascript/exercises/accumulate/accumulate.spec.js
|
@@ -3070,6 +3073,7 @@ files:
|
|
3070
3073
|
- tracks/elisp/docs/INSTALLATION.org
|
3071
3074
|
- tracks/elisp/docs/LEARNING.org
|
3072
3075
|
- tracks/elisp/docs/RESOURCES.org
|
3076
|
+
- tracks/elisp/docs/SNIPPET.txt
|
3073
3077
|
- tracks/elisp/docs/TESTS.org
|
3074
3078
|
- tracks/elisp/docs/img/dual-pane.png
|
3075
3079
|
- tracks/elisp/exercises/allergies/README.md
|
@@ -3169,6 +3173,7 @@ files:
|
|
3169
3173
|
- tracks/elixir/docs/INSTALLATION.md
|
3170
3174
|
- tracks/elixir/docs/LEARNING.md
|
3171
3175
|
- tracks/elixir/docs/RESOURCES.md
|
3176
|
+
- tracks/elixir/docs/SNIPPET.txt
|
3172
3177
|
- tracks/elixir/docs/TESTS.md
|
3173
3178
|
- tracks/elixir/exercises/accumulate/README.md
|
3174
3179
|
- tracks/elixir/exercises/accumulate/accumulate.exs
|
@@ -3785,6 +3790,7 @@ files:
|
|
3785
3790
|
- tracks/erlang/docs/EXERCISE_README_INSERT.md
|
3786
3791
|
- tracks/erlang/docs/INSTALLATION.md
|
3787
3792
|
- tracks/erlang/docs/LEARNING.md
|
3793
|
+
- tracks/erlang/docs/SNIPPET.txt
|
3788
3794
|
- tracks/erlang/docs/TESTS.md
|
3789
3795
|
- tracks/erlang/exercises/accumulate/README.md
|
3790
3796
|
- tracks/erlang/exercises/accumulate/include/exercism.hrl
|
@@ -4146,6 +4152,7 @@ files:
|
|
4146
4152
|
- tracks/fsharp/docs/INSTALLATION.md
|
4147
4153
|
- tracks/fsharp/docs/LEARNING.md
|
4148
4154
|
- tracks/fsharp/docs/RESOURCES.md
|
4155
|
+
- tracks/fsharp/docs/SNIPPET.txt
|
4149
4156
|
- tracks/fsharp/docs/TESTS.md
|
4150
4157
|
- tracks/fsharp/docs/img/SolutionExplorer.png
|
4151
4158
|
- tracks/fsharp/docs/img/TestExplorer.png
|
@@ -4533,6 +4540,7 @@ files:
|
|
4533
4540
|
- tracks/go/docs/INSTALLATION.md
|
4534
4541
|
- tracks/go/docs/LEARNING.md
|
4535
4542
|
- tracks/go/docs/RESOURCES.md
|
4543
|
+
- tracks/go/docs/SNIPPET.txt
|
4536
4544
|
- tracks/go/docs/TESTS.md
|
4537
4545
|
- tracks/go/exercises/accumulate/README.md
|
4538
4546
|
- tracks/go/exercises/accumulate/accumulate.go
|
@@ -4912,6 +4920,7 @@ files:
|
|
4912
4920
|
- tracks/groovy/docs/INSTALLATION.md
|
4913
4921
|
- tracks/groovy/docs/LEARNING.md
|
4914
4922
|
- tracks/groovy/docs/RESOURCES.md
|
4923
|
+
- tracks/groovy/docs/SNIPPET.txt
|
4915
4924
|
- tracks/groovy/docs/TESTS.md
|
4916
4925
|
- tracks/groovy/exercises/difference-of-squares/DifferenceOfSquares.groovy
|
4917
4926
|
- tracks/groovy/exercises/difference-of-squares/DifferenceOfSquaresSpec.groovy
|
@@ -4987,6 +4996,7 @@ files:
|
|
4987
4996
|
- tracks/haskell/docs/INSTALLATION.md
|
4988
4997
|
- tracks/haskell/docs/LEARNING.md
|
4989
4998
|
- tracks/haskell/docs/RESOURCES.md
|
4999
|
+
- tracks/haskell/docs/SNIPPET.txt
|
4990
5000
|
- tracks/haskell/docs/TESTS.md
|
4991
5001
|
- tracks/haskell/exercises/accumulate/README.md
|
4992
5002
|
- tracks/haskell/exercises/accumulate/examples/fail-reverse/package.yaml
|
@@ -5708,6 +5718,7 @@ files:
|
|
5708
5718
|
- tracks/java/docs/LEARNING.md
|
5709
5719
|
- tracks/java/docs/MAINTAINING.md
|
5710
5720
|
- tracks/java/docs/RESOURCES.md
|
5721
|
+
- tracks/java/docs/SNIPPET.txt
|
5711
5722
|
- tracks/java/docs/TESTS.md
|
5712
5723
|
- tracks/java/exercises/accumulate/README.md
|
5713
5724
|
- tracks/java/exercises/accumulate/build.gradle
|
@@ -6205,6 +6216,7 @@ files:
|
|
6205
6216
|
- tracks/javascript/docs/INSTALLATION.md
|
6206
6217
|
- tracks/javascript/docs/LEARNING.md
|
6207
6218
|
- tracks/javascript/docs/RESOURCES.md
|
6219
|
+
- tracks/javascript/docs/SNIPPET.txt
|
6208
6220
|
- tracks/javascript/docs/TESTS.md
|
6209
6221
|
- tracks/javascript/docs/img/AddFiles.png
|
6210
6222
|
- tracks/javascript/docs/img/SolutionExplorer.png
|
@@ -6605,6 +6617,7 @@ files:
|
|
6605
6617
|
- tracks/kotlin/docs/INSTALLATION.md
|
6606
6618
|
- tracks/kotlin/docs/LEARNING.md
|
6607
6619
|
- tracks/kotlin/docs/RESOURCES.md
|
6620
|
+
- tracks/kotlin/docs/SNIPPET.txt
|
6608
6621
|
- tracks/kotlin/docs/TESTS.md
|
6609
6622
|
- tracks/kotlin/docs/img/mac-osx--idea-ce-gradle-import-dialog.png
|
6610
6623
|
- tracks/kotlin/docs/img/mac-osx--idea-ce-run-unit-tests.png
|
@@ -6673,9 +6686,9 @@ files:
|
|
6673
6686
|
- tracks/kotlin/exercises/build.gradle
|
6674
6687
|
- tracks/kotlin/exercises/change/README.md
|
6675
6688
|
- tracks/kotlin/exercises/change/build.gradle
|
6676
|
-
- tracks/kotlin/exercises/change/src/example/kotlin/
|
6689
|
+
- tracks/kotlin/exercises/change/src/example/kotlin/ChangeCalculator.kt
|
6677
6690
|
- tracks/kotlin/exercises/change/src/main/kotlin/.keep
|
6678
|
-
- tracks/kotlin/exercises/change/src/test/kotlin/
|
6691
|
+
- tracks/kotlin/exercises/change/src/test/kotlin/ChangeCalculatorTest.kt
|
6679
6692
|
- tracks/kotlin/exercises/clock/README.md
|
6680
6693
|
- tracks/kotlin/exercises/clock/build.gradle
|
6681
6694
|
- tracks/kotlin/exercises/clock/src/example/kotlin/Clock.kt
|
@@ -6971,6 +6984,7 @@ files:
|
|
6971
6984
|
- tracks/lfe/docs/INSTALLATION.md
|
6972
6985
|
- tracks/lfe/docs/LEARNING.md
|
6973
6986
|
- tracks/lfe/docs/RESOURCES.md
|
6987
|
+
- tracks/lfe/docs/SNIPPET.txt
|
6974
6988
|
- tracks/lfe/docs/TESTS.md
|
6975
6989
|
- tracks/lfe/exercises/accumulate/.gitignore
|
6976
6990
|
- tracks/lfe/exercises/accumulate/Makefile
|
@@ -7378,6 +7392,7 @@ files:
|
|
7378
7392
|
- tracks/lua/docs/INSTALLATION.md
|
7379
7393
|
- tracks/lua/docs/LEARNING.md
|
7380
7394
|
- tracks/lua/docs/RESOURCES.md
|
7395
|
+
- tracks/lua/docs/SNIPPET.txt
|
7381
7396
|
- tracks/lua/docs/TESTS.md
|
7382
7397
|
- tracks/lua/exercises/acronym/README.md
|
7383
7398
|
- tracks/lua/exercises/acronym/acronym_spec.lua
|
@@ -7623,6 +7638,7 @@ files:
|
|
7623
7638
|
- tracks/mips/docs/INSTALLATION.md
|
7624
7639
|
- tracks/mips/docs/LEARNING.md
|
7625
7640
|
- tracks/mips/docs/RESOURCES.md
|
7641
|
+
- tracks/mips/docs/SNIPPET.txt
|
7626
7642
|
- tracks/mips/docs/TESTS.md
|
7627
7643
|
- tracks/mips/exercises/atbash-cipher/README.md
|
7628
7644
|
- tracks/mips/exercises/atbash-cipher/example.mips
|
@@ -7927,6 +7943,7 @@ files:
|
|
7927
7943
|
- tracks/ocaml/docs/INSTALLATION.md
|
7928
7944
|
- tracks/ocaml/docs/LEARNING.md
|
7929
7945
|
- tracks/ocaml/docs/RESOURCES.md
|
7946
|
+
- tracks/ocaml/docs/SNIPPET.txt
|
7930
7947
|
- tracks/ocaml/docs/TESTS.md
|
7931
7948
|
- tracks/ocaml/exercises/acronym/.merlin
|
7932
7949
|
- tracks/ocaml/exercises/acronym/Makefile
|
@@ -9004,6 +9021,7 @@ files:
|
|
9004
9021
|
- tracks/purescript/docs/INSTALLATION.md
|
9005
9022
|
- tracks/purescript/docs/LEARNING.md
|
9006
9023
|
- tracks/purescript/docs/RESOURCES.md
|
9024
|
+
- tracks/purescript/docs/SNIPPET.txt
|
9007
9025
|
- tracks/purescript/docs/TESTS.md
|
9008
9026
|
- tracks/purescript/exercises/accumulate/README.md
|
9009
9027
|
- tracks/purescript/exercises/accumulate/bower.json
|
@@ -9655,6 +9673,7 @@ files:
|
|
9655
9673
|
- tracks/racket/docs/INSTALLATION.md
|
9656
9674
|
- tracks/racket/docs/LEARNING.md
|
9657
9675
|
- tracks/racket/docs/RESOURCES.md
|
9676
|
+
- tracks/racket/docs/SNIPPET.txt
|
9658
9677
|
- tracks/racket/docs/TESTS.md
|
9659
9678
|
- tracks/racket/exercises/accumulate/README.md
|
9660
9679
|
- tracks/racket/exercises/accumulate/accumulate-test.rkt
|
@@ -9775,6 +9794,7 @@ files:
|
|
9775
9794
|
- tracks/ruby/docs/INSTALLATION.md
|
9776
9795
|
- tracks/ruby/docs/LEARNING.md
|
9777
9796
|
- tracks/ruby/docs/RESOURCES.md
|
9797
|
+
- tracks/ruby/docs/SNIPPET.txt
|
9778
9798
|
- tracks/ruby/docs/TESTS.md
|
9779
9799
|
- tracks/ruby/exercises/accumulate/.meta/solutions/accumulate.rb
|
9780
9800
|
- tracks/ruby/exercises/accumulate/HINTS.md
|
@@ -10220,6 +10240,7 @@ files:
|
|
10220
10240
|
- tracks/rust/docs/INSTALLATION.md
|
10221
10241
|
- tracks/rust/docs/LEARNING.md
|
10222
10242
|
- tracks/rust/docs/RESOURCES.md
|
10243
|
+
- tracks/rust/docs/SNIPPET.txt
|
10223
10244
|
- tracks/rust/docs/TESTS.md
|
10224
10245
|
- tracks/rust/exercises/accumulate/.meta/hints.md
|
10225
10246
|
- tracks/rust/exercises/accumulate/Cargo.lock
|
@@ -10683,6 +10704,7 @@ files:
|
|
10683
10704
|
- tracks/scala/docs/INSTALLATION.md
|
10684
10705
|
- tracks/scala/docs/LEARNING.md
|
10685
10706
|
- tracks/scala/docs/RESOURCES.md
|
10707
|
+
- tracks/scala/docs/SNIPPET.txt
|
10686
10708
|
- tracks/scala/docs/TESTS.md
|
10687
10709
|
- tracks/scala/exercises/accumulate/README.md
|
10688
10710
|
- tracks/scala/exercises/accumulate/build.sbt
|
@@ -10924,7 +10946,7 @@ files:
|
|
10924
10946
|
- tracks/scala/exercises/ocr-numbers/build.sbt
|
10925
10947
|
- tracks/scala/exercises/ocr-numbers/example.scala
|
10926
10948
|
- tracks/scala/exercises/ocr-numbers/src/main/scala/.keep
|
10927
|
-
- tracks/scala/exercises/ocr-numbers/src/test/scala/
|
10949
|
+
- tracks/scala/exercises/ocr-numbers/src/test/scala/OcrNumbersTest.scala
|
10928
10950
|
- tracks/scala/exercises/octal/README.md
|
10929
10951
|
- tracks/scala/exercises/octal/build.sbt
|
10930
10952
|
- tracks/scala/exercises/octal/example.scala
|
@@ -11167,10 +11189,12 @@ files:
|
|
11167
11189
|
- tracks/scala/testgen/src/main/scala/MinesweeperTestGenerator.scala
|
11168
11190
|
- tracks/scala/testgen/src/main/scala/NthPrimeTestGenerator.scala
|
11169
11191
|
- tracks/scala/testgen/src/main/scala/NucleotideCountTestGenerator.scala
|
11192
|
+
- tracks/scala/testgen/src/main/scala/OcrNumbersTestGenerator.scala
|
11170
11193
|
- tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
|
11171
11194
|
- tracks/scala/testgen/src/main/scala/PascalsTriangleTestGenerator.scala
|
11172
11195
|
- tracks/scala/testgen/src/main/scala/PerfectNumbersTestGenerator.scala
|
11173
11196
|
- tracks/scala/testgen/src/main/scala/PhoneNumberTestGenerator.scala
|
11197
|
+
- tracks/scala/testgen/src/main/scala/PigLatinTestGenerator.scala
|
11174
11198
|
- tracks/scala/testgen/src/main/scala/PrimeFactorsTestGenerator.scala
|
11175
11199
|
- tracks/scala/testgen/src/main/scala/RailFenceCipherTestGenerator.scala
|
11176
11200
|
- tracks/scala/testgen/src/main/scala/RaindropsTestGenerator.scala
|
@@ -11204,6 +11228,7 @@ files:
|
|
11204
11228
|
- tracks/scheme/docs/EXERCISE_README_INSERT.md
|
11205
11229
|
- tracks/scheme/docs/INSTALLATION.md
|
11206
11230
|
- tracks/scheme/docs/RESOURCES.md
|
11231
|
+
- tracks/scheme/docs/SNIPPET.txt
|
11207
11232
|
- tracks/scheme/docs/TESTS.md
|
11208
11233
|
- tracks/scheme/exercises/anagram/README.md
|
11209
11234
|
- tracks/scheme/exercises/anagram/anagram-test.scm
|
@@ -11271,12 +11296,16 @@ files:
|
|
11271
11296
|
- tracks/sml/README.md
|
11272
11297
|
- tracks/sml/SETUP.md
|
11273
11298
|
- tracks/sml/bin/fetch-configlet
|
11299
|
+
- tracks/sml/bin/generate
|
11274
11300
|
- tracks/sml/config.json
|
11275
11301
|
- tracks/sml/config/exercise_readme.go.tmpl
|
11276
11302
|
- tracks/sml/config/maintainers.json
|
11303
|
+
- tracks/sml/docs/ABOUT.md
|
11277
11304
|
- tracks/sml/docs/EXERCISE_README_INSERT.md
|
11278
11305
|
- tracks/sml/docs/INSTALLATION.md
|
11306
|
+
- tracks/sml/docs/LEARNING.md
|
11279
11307
|
- tracks/sml/docs/RESOURCES.md
|
11308
|
+
- tracks/sml/docs/SNIPPET.txt
|
11280
11309
|
- tracks/sml/docs/TESTS.md
|
11281
11310
|
- tracks/sml/exercises/accumulate/README.md
|
11282
11311
|
- tracks/sml/exercises/accumulate/accumulate.sml
|
@@ -11293,6 +11322,16 @@ files:
|
|
11293
11322
|
- tracks/sml/exercises/binary/README.md
|
11294
11323
|
- tracks/sml/exercises/binary/example.sml
|
11295
11324
|
- tracks/sml/exercises/binary/test.sml
|
11325
|
+
- tracks/sml/exercises/bob/README.md
|
11326
|
+
- tracks/sml/exercises/bob/bob.sml
|
11327
|
+
- tracks/sml/exercises/bob/example.sml
|
11328
|
+
- tracks/sml/exercises/bob/test.sml
|
11329
|
+
- tracks/sml/exercises/bob/testlib.sml
|
11330
|
+
- tracks/sml/exercises/difference-of-squares/README.md
|
11331
|
+
- tracks/sml/exercises/difference-of-squares/difference-of-squares.sml
|
11332
|
+
- tracks/sml/exercises/difference-of-squares/example.sml
|
11333
|
+
- tracks/sml/exercises/difference-of-squares/test.sml
|
11334
|
+
- tracks/sml/exercises/difference-of-squares/testlib.sml
|
11296
11335
|
- tracks/sml/exercises/flatten-array/README.md
|
11297
11336
|
- tracks/sml/exercises/flatten-array/example.sml
|
11298
11337
|
- tracks/sml/exercises/flatten-array/flatten-array.sml
|
@@ -11301,6 +11340,11 @@ files:
|
|
11301
11340
|
- tracks/sml/exercises/hamming/example.sml
|
11302
11341
|
- tracks/sml/exercises/hamming/hamming.sml
|
11303
11342
|
- tracks/sml/exercises/hamming/test.sml
|
11343
|
+
- tracks/sml/exercises/hello-world/README.md
|
11344
|
+
- tracks/sml/exercises/hello-world/example.sml
|
11345
|
+
- tracks/sml/exercises/hello-world/hello-world.sml
|
11346
|
+
- tracks/sml/exercises/hello-world/test.sml
|
11347
|
+
- tracks/sml/exercises/hello-world/testlib.sml
|
11304
11348
|
- tracks/sml/exercises/nth-prime/README.md
|
11305
11349
|
- tracks/sml/exercises/nth-prime/example.sml
|
11306
11350
|
- tracks/sml/exercises/nth-prime/nth-prime.sml
|
@@ -11310,6 +11354,7 @@ files:
|
|
11310
11354
|
- tracks/sml/exercises/raindrops/raindrops.sml
|
11311
11355
|
- tracks/sml/exercises/raindrops/test.sml
|
11312
11356
|
- tracks/sml/img/icon.png
|
11357
|
+
- tracks/sml/lib/testlib.sml
|
11313
11358
|
- tracks/swift/.git
|
11314
11359
|
- tracks/swift/.gitignore
|
11315
11360
|
- tracks/swift/.swift-version
|
@@ -11332,6 +11377,7 @@ files:
|
|
11332
11377
|
- tracks/swift/docs/INSTALLATION.md
|
11333
11378
|
- tracks/swift/docs/LEARNING.md
|
11334
11379
|
- tracks/swift/docs/RESOURCES.md
|
11380
|
+
- tracks/swift/docs/SNIPPET.txt
|
11335
11381
|
- tracks/swift/docs/TESTS.md
|
11336
11382
|
- tracks/swift/docs/img/file-inspector.png
|
11337
11383
|
- tracks/swift/docs/img/tests-fail.png
|
@@ -11892,6 +11938,7 @@ files:
|
|
11892
11938
|
- tracks/typescript/docs/INSTALLATION.md
|
11893
11939
|
- tracks/typescript/docs/LEARNING.md
|
11894
11940
|
- tracks/typescript/docs/RESOURCES.md
|
11941
|
+
- tracks/typescript/docs/SNIPPET.txt
|
11895
11942
|
- tracks/typescript/docs/TESTS.md
|
11896
11943
|
- tracks/typescript/exercises/anagram/README.md
|
11897
11944
|
- tracks/typescript/exercises/anagram/anagram.example.ts
|