trackler 2.2.1.24 → 2.2.1.25
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 +73 -73
- data/tracks/bash/config.json +82 -73
- data/tracks/bash/config/maintainers.json +9 -9
- data/tracks/bash/exercises/nucleotide-count/README.md +38 -0
- data/tracks/bash/exercises/nucleotide-count/example.sh +38 -0
- data/tracks/bash/exercises/nucleotide-count/nucleotide_count_test.sh +29 -0
- data/tracks/csharp/.travis.yml +9 -2
- data/tracks/csharp/build.cake +7 -34
- data/tracks/csharp/build.ps1 +2 -2
- data/tracks/csharp/build.sh +2 -2
- data/tracks/csharp/docs/GENERATORS.md +102 -0
- data/tracks/csharp/exercises/Exercises.sln +669 -0
- data/tracks/csharp/exercises/queen-attack/Example.cs +14 -1
- data/tracks/csharp/exercises/queen-attack/QueenAttack.cs +6 -1
- data/tracks/csharp/exercises/queen-attack/QueenAttackTest.cs +57 -19
- data/tracks/csharp/generators/Exercises/QueenAttack.cs +85 -0
- data/tracks/d/README.md +3 -2
- data/tracks/d/docs/SNIPPET.txt +7 -0
- data/tracks/d/exercises/crypto-square/.dub/dub.json +6 -0
- data/tracks/d/exercises/crypto-square/example/crypto_square.d +4 -2
- data/tracks/dart/exercises/bob/pubspec.lock +28 -16
- data/tracks/dart/exercises/bob/pubspec.yaml +1 -1
- data/tracks/dart/exercises/bob/test/bob_test.dart +2 -0
- data/tracks/dart/exercises/difference-of-squares/pubspec.lock +28 -16
- data/tracks/dart/exercises/difference-of-squares/pubspec.yaml +1 -1
- data/tracks/dart/exercises/gigasecond/pubspec.lock +28 -16
- data/tracks/dart/exercises/gigasecond/pubspec.yaml +1 -1
- data/tracks/dart/exercises/hamming/pubspec.lock +28 -16
- data/tracks/dart/exercises/hamming/pubspec.yaml +1 -1
- data/tracks/dart/exercises/hello-world/pubspec.lock +28 -16
- data/tracks/dart/exercises/hello-world/pubspec.yaml +1 -1
- data/tracks/dart/exercises/hello-world/test/hello_world_test.dart +13 -15
- data/tracks/dart/exercises/leap/pubspec.lock +28 -16
- data/tracks/dart/exercises/leap/pubspec.yaml +1 -1
- data/tracks/dart/exercises/rna-transcription/pubspec.lock +28 -16
- data/tracks/dart/exercises/rna-transcription/pubspec.yaml +1 -1
- data/tracks/elixir/exercises/pig-latin/example.exs +17 -18
- data/tracks/elixir/exercises/pig-latin/pig_latin_test.exs +16 -1
- data/tracks/fsharp/build.cake +0 -2
- data/tracks/go/exercises/error-handling/.meta/description.md +39 -0
- data/tracks/go/exercises/error-handling/.meta/hints.md +5 -0
- data/tracks/go/exercises/error-handling/.meta/metadata.yml +2 -0
- data/tracks/go/exercises/error-handling/README.md +43 -5
- data/tracks/go/exercises/error-handling/common.go +4 -3
- data/tracks/go/exercises/error-handling/error_handling_test.go +1 -38
- data/tracks/go/exercises/secret-handshake/secret_handshake_test.go +3 -1
- data/tracks/haxe/docs/LEARNING.md +8 -0
- data/tracks/java/.gitignore +2 -1
- data/tracks/java/config.json +337 -491
- data/tracks/java/config/maintainers.json +26 -26
- data/tracks/java/exercises/bob/src/test/java/BobTest.java +7 -1
- data/tracks/java/exercises/rna-transcription/src/example/java/RnaTranscription.java +4 -2
- data/tracks/java/exercises/rna-transcription/src/main/java/RnaTranscription.java +5 -3
- data/tracks/java/exercises/rna-transcription/src/test/java/RnaTranscriptionTest.java +21 -26
- data/tracks/javascript/config.json +662 -664
- data/tracks/javascript/config/maintainers.json +35 -35
- data/tracks/javascript/exercises/simple-cipher/simple-cipher.spec.js +7 -3
- data/tracks/plsql/config.json +52 -66
- data/tracks/plsql/docs/SNIPPET.txt +6 -0
- data/tracks/plsql/exercises/hello-world/example.plsql +20 -0
- data/tracks/plsql/exercises/hello-world/hello_world#.plsql +20 -0
- data/tracks/plsql/exercises/hello-world/ut_hello_world#.plsql +60 -0
- data/tracks/sml/Makefile +5 -0
- data/tracks/sml/bin/generate +3 -4
- data/tracks/sml/config.json +55 -5
- data/tracks/sml/exercises/collatz-conjecture/README.md +63 -0
- data/tracks/sml/exercises/collatz-conjecture/collatz-conjecture.sml +4 -0
- data/tracks/sml/exercises/collatz-conjecture/example.sml +17 -0
- data/tracks/sml/exercises/collatz-conjecture/test.sml +30 -0
- data/tracks/sml/exercises/collatz-conjecture/testlib.sml +159 -0
- data/tracks/sml/exercises/leap/README.md +63 -0
- data/tracks/sml/exercises/leap/example.sml +2 -0
- data/tracks/sml/exercises/leap/leap.sml +2 -0
- data/tracks/sml/exercises/leap/test.sml +24 -0
- data/tracks/sml/exercises/leap/testlib.sml +159 -0
- data/tracks/sml/exercises/rna-transcription/README.md +55 -0
- data/tracks/sml/exercises/rna-transcription/example.sml +20 -0
- data/tracks/sml/exercises/rna-transcription/rna-transcription.sml +2 -0
- data/tracks/sml/exercises/rna-transcription/test.sml +36 -0
- data/tracks/sml/exercises/rna-transcription/testlib.sml +159 -0
- data/tracks/sml/exercises/sum-of-multiples/README.md +48 -0
- data/tracks/sml/exercises/sum-of-multiples/example.sml +8 -0
- data/tracks/sml/exercises/sum-of-multiples/sum-of-multiples.sml +2 -0
- data/tracks/sml/exercises/sum-of-multiples/test.sml +48 -0
- data/tracks/sml/exercises/sum-of-multiples/testlib.sml +159 -0
- data/tracks/sml/exercises/two-fer/README.md +78 -0
- data/tracks/sml/exercises/two-fer/example.sml +1 -0
- data/tracks/sml/exercises/two-fer/test.sml +21 -0
- data/tracks/sml/exercises/two-fer/testlib.sml +159 -0
- data/tracks/sml/exercises/two-fer/two-fer.sml +2 -0
- metadata +43 -5
- data/tracks/csharp/exercises/Exercises.All.sln +0 -1545
- data/tracks/csharp/exercises/Exercises.Default.sln +0 -1503
- data/tracks/csharp/exercises/Exercises.Refactoring.sln +0 -61
@@ -1,85 +1,85 @@
|
|
1
1
|
{
|
2
|
+
"docs_url": "https://github.com/exercism/docs/blob/master/maintaining-a-track/maintainer-configuration.md",
|
2
3
|
"maintainers": [
|
3
4
|
{
|
4
|
-
"github_username": "ireddick",
|
5
|
-
"show_on_website": false,
|
6
5
|
"alumnus": false,
|
7
|
-
"
|
6
|
+
"avatar_url": null,
|
8
7
|
"bio": null,
|
8
|
+
"github_username": "ireddick",
|
9
9
|
"link_text": null,
|
10
10
|
"link_url": null,
|
11
|
-
"
|
11
|
+
"name": null,
|
12
|
+
"show_on_website": false
|
12
13
|
},
|
13
14
|
{
|
14
|
-
"github_username": "rchavarria",
|
15
|
-
"show_on_website": false,
|
16
15
|
"alumnus": false,
|
17
|
-
"
|
16
|
+
"avatar_url": null,
|
18
17
|
"bio": null,
|
18
|
+
"github_username": "rchavarria",
|
19
19
|
"link_text": null,
|
20
20
|
"link_url": null,
|
21
|
-
"
|
21
|
+
"name": null,
|
22
|
+
"show_on_website": false
|
22
23
|
},
|
23
24
|
{
|
24
|
-
"github_username": "joelwallis",
|
25
|
-
"show_on_website": false,
|
26
25
|
"alumnus": false,
|
27
|
-
"
|
26
|
+
"avatar_url": null,
|
28
27
|
"bio": null,
|
28
|
+
"github_username": "joelwallis",
|
29
29
|
"link_text": null,
|
30
30
|
"link_url": null,
|
31
|
-
"
|
31
|
+
"name": null,
|
32
|
+
"show_on_website": false
|
32
33
|
},
|
33
34
|
{
|
34
|
-
"github_username": "drueck",
|
35
|
-
"show_on_website": false,
|
36
35
|
"alumnus": false,
|
37
|
-
"
|
36
|
+
"avatar_url": null,
|
38
37
|
"bio": null,
|
38
|
+
"github_username": "drueck",
|
39
39
|
"link_text": null,
|
40
40
|
"link_url": null,
|
41
|
-
"
|
41
|
+
"name": null,
|
42
|
+
"show_on_website": false
|
42
43
|
},
|
43
44
|
{
|
44
|
-
"github_username": "tejasbubane",
|
45
|
-
"show_on_website": false,
|
46
45
|
"alumnus": false,
|
47
|
-
"
|
46
|
+
"avatar_url": null,
|
48
47
|
"bio": null,
|
48
|
+
"github_username": "tejasbubane",
|
49
49
|
"link_text": null,
|
50
50
|
"link_url": null,
|
51
|
-
"
|
51
|
+
"name": null,
|
52
|
+
"show_on_website": false
|
52
53
|
},
|
53
54
|
{
|
54
|
-
"github_username": "matthewmorgan",
|
55
|
-
"show_on_website": false,
|
56
55
|
"alumnus": false,
|
57
|
-
"
|
56
|
+
"avatar_url": null,
|
58
57
|
"bio": null,
|
58
|
+
"github_username": "matthewmorgan",
|
59
59
|
"link_text": null,
|
60
60
|
"link_url": null,
|
61
|
-
"
|
61
|
+
"name": null,
|
62
|
+
"show_on_website": false
|
62
63
|
},
|
63
64
|
{
|
64
|
-
"github_username": "mixolidia",
|
65
|
-
"show_on_website": false,
|
66
65
|
"alumnus": false,
|
67
|
-
"
|
66
|
+
"avatar_url": null,
|
68
67
|
"bio": null,
|
68
|
+
"github_username": "mixolidia",
|
69
69
|
"link_text": null,
|
70
70
|
"link_url": null,
|
71
|
-
"
|
71
|
+
"name": null,
|
72
|
+
"show_on_website": false
|
72
73
|
},
|
73
74
|
{
|
74
|
-
"github_username": "ZacharyRSmith",
|
75
|
-
"show_on_website": false,
|
76
75
|
"alumnus": false,
|
77
|
-
"
|
76
|
+
"avatar_url": null,
|
78
77
|
"bio": null,
|
78
|
+
"github_username": "ZacharyRSmith",
|
79
79
|
"link_text": null,
|
80
80
|
"link_url": null,
|
81
|
-
"
|
81
|
+
"name": null,
|
82
|
+
"show_on_website": false
|
82
83
|
}
|
83
|
-
]
|
84
|
-
|
85
|
-
}
|
84
|
+
]
|
85
|
+
}
|
@@ -4,7 +4,7 @@ describe('Random key cipher', function () {
|
|
4
4
|
var cipher = new Cipher();
|
5
5
|
|
6
6
|
it('has a key made of letters', function () {
|
7
|
-
expect(cipher.key).toMatch(
|
7
|
+
expect(cipher.key).toMatch(/^[a-z]+$/);
|
8
8
|
});
|
9
9
|
|
10
10
|
// Here we take advantage of the fact that plaintext of "aaa..."
|
@@ -69,10 +69,14 @@ describe('Substitution cipher', function () {
|
|
69
69
|
.toEqual('qayaeaagaciai');
|
70
70
|
});
|
71
71
|
|
72
|
-
xit('can wrap', function () {
|
72
|
+
xit('can wrap on encode', function () {
|
73
73
|
expect(cipher.encode('zzzzzzzzzz')).toEqual('zabcdefghi');
|
74
74
|
});
|
75
|
-
|
75
|
+
|
76
|
+
xit('can wrap on decode', () => {
|
77
|
+
expect(cipher.decode('zabcdefghi')).toEqual('zzzzzzzzzz');
|
78
|
+
});
|
79
|
+
|
76
80
|
xit('can handle messages longer than the key', function() {
|
77
81
|
expect(new Cipher('abc').encode('iamapandabear'))
|
78
82
|
.toEqual('iboaqcnecbfcr');
|
data/tracks/plsql/config.json
CHANGED
@@ -1,110 +1,96 @@
|
|
1
1
|
{
|
2
|
-
"language": "PL/SQL",
|
3
2
|
"active": true,
|
4
|
-
"test_pattern": "ut.*plsql",
|
5
|
-
"foregone": [
|
6
|
-
|
7
|
-
],
|
8
3
|
"exercises": [
|
9
4
|
{
|
10
|
-
"uuid": "b779f211-ecec-45cc-8641-e7cf87ff66ce",
|
11
|
-
"slug": "hamming",
|
12
5
|
"core": false,
|
13
|
-
"unlocked_by": null,
|
14
6
|
"difficulty": 1,
|
15
|
-
"
|
16
|
-
|
17
|
-
|
7
|
+
"slug": "hello-world",
|
8
|
+
"topics": null,
|
9
|
+
"unlocked_by": null,
|
10
|
+
"uuid": "53156fc9-0945-f080-08a9-ce269bfc9121a5d2c5c"
|
18
11
|
},
|
19
12
|
{
|
20
|
-
"uuid": "6722fe30-30d2-4e99-87de-03b1a6eee0d6",
|
21
|
-
"slug": "gigasecond",
|
22
13
|
"core": false,
|
23
|
-
"unlocked_by": null,
|
24
14
|
"difficulty": 1,
|
25
|
-
"
|
26
|
-
|
27
|
-
|
15
|
+
"slug": "hamming",
|
16
|
+
"topics": null,
|
17
|
+
"unlocked_by": null,
|
18
|
+
"uuid": "b779f211-ecec-45cc-8641-e7cf87ff66ce"
|
28
19
|
},
|
29
20
|
{
|
30
|
-
"uuid": "eec6c29b-fbbb-48d5-a0e9-4c902281390e",
|
31
|
-
"slug": "rna-transcription",
|
32
21
|
"core": false,
|
33
|
-
"unlocked_by": null,
|
34
22
|
"difficulty": 1,
|
35
|
-
"
|
36
|
-
|
37
|
-
|
23
|
+
"slug": "gigasecond",
|
24
|
+
"topics": null,
|
25
|
+
"unlocked_by": null,
|
26
|
+
"uuid": "6722fe30-30d2-4e99-87de-03b1a6eee0d6"
|
38
27
|
},
|
39
28
|
{
|
40
|
-
"uuid": "2eaf11fe-e56e-4512-b8af-8fb637582a5e",
|
41
|
-
"slug": "raindrops",
|
42
29
|
"core": false,
|
43
|
-
"unlocked_by": null,
|
44
30
|
"difficulty": 1,
|
45
|
-
"
|
46
|
-
|
47
|
-
|
31
|
+
"slug": "rna-transcription",
|
32
|
+
"topics": null,
|
33
|
+
"unlocked_by": null,
|
34
|
+
"uuid": "eec6c29b-fbbb-48d5-a0e9-4c902281390e"
|
48
35
|
},
|
49
36
|
{
|
50
|
-
"uuid": "f630b17b-59c1-448b-8880-85bb0c72ba5a",
|
51
|
-
"slug": "difference-of-squares",
|
52
37
|
"core": false,
|
53
|
-
"unlocked_by": null,
|
54
38
|
"difficulty": 1,
|
55
|
-
"
|
56
|
-
|
57
|
-
|
39
|
+
"slug": "raindrops",
|
40
|
+
"topics": null,
|
41
|
+
"unlocked_by": null,
|
42
|
+
"uuid": "2eaf11fe-e56e-4512-b8af-8fb637582a5e"
|
58
43
|
},
|
59
44
|
{
|
60
|
-
"uuid": "fc75b71e-e3e6-43b2-940b-65c06a6f9bc5",
|
61
|
-
"slug": "roman-numerals",
|
62
45
|
"core": false,
|
63
|
-
"unlocked_by": null,
|
64
46
|
"difficulty": 1,
|
65
|
-
"
|
66
|
-
|
67
|
-
|
47
|
+
"slug": "difference-of-squares",
|
48
|
+
"topics": null,
|
49
|
+
"unlocked_by": null,
|
50
|
+
"uuid": "f630b17b-59c1-448b-8880-85bb0c72ba5a"
|
68
51
|
},
|
69
52
|
{
|
70
|
-
"uuid": "bede5fe0-43bf-4483-9fc3-7030df042515",
|
71
|
-
"slug": "nth-prime",
|
72
53
|
"core": false,
|
73
|
-
"unlocked_by": null,
|
74
54
|
"difficulty": 1,
|
75
|
-
"
|
76
|
-
|
77
|
-
|
55
|
+
"slug": "roman-numerals",
|
56
|
+
"topics": null,
|
57
|
+
"unlocked_by": null,
|
58
|
+
"uuid": "fc75b71e-e3e6-43b2-940b-65c06a6f9bc5"
|
78
59
|
},
|
79
60
|
{
|
80
|
-
"uuid": "50e2a7c5-3f71-448d-b203-65b7c0e3d6d5",
|
81
|
-
"slug": "leap",
|
82
61
|
"core": false,
|
83
|
-
"unlocked_by": null,
|
84
62
|
"difficulty": 1,
|
85
|
-
"
|
86
|
-
|
87
|
-
|
63
|
+
"slug": "nth-prime",
|
64
|
+
"topics": null,
|
65
|
+
"unlocked_by": null,
|
66
|
+
"uuid": "bede5fe0-43bf-4483-9fc3-7030df042515"
|
88
67
|
},
|
89
68
|
{
|
90
|
-
"uuid": "1d661c32-c75d-4c0b-bf88-ed0112bb1ab2",
|
91
|
-
"slug": "grains",
|
92
69
|
"core": false,
|
93
|
-
"unlocked_by": null,
|
94
70
|
"difficulty": 1,
|
95
|
-
"
|
96
|
-
|
97
|
-
|
71
|
+
"slug": "leap",
|
72
|
+
"topics": null,
|
73
|
+
"unlocked_by": null,
|
74
|
+
"uuid": "50e2a7c5-3f71-448d-b203-65b7c0e3d6d5"
|
98
75
|
},
|
99
76
|
{
|
100
|
-
"uuid": "6277f225-5d28-45f1-b020-9b821150ecfe",
|
101
|
-
"slug": "binary",
|
102
77
|
"core": false,
|
78
|
+
"difficulty": 1,
|
79
|
+
"slug": "grains",
|
80
|
+
"topics": null,
|
103
81
|
"unlocked_by": null,
|
82
|
+
"uuid": "1d661c32-c75d-4c0b-bf88-ed0112bb1ab2"
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"core": false,
|
104
86
|
"difficulty": 1,
|
105
|
-
"
|
106
|
-
|
107
|
-
|
87
|
+
"slug": "binary",
|
88
|
+
"topics": null,
|
89
|
+
"unlocked_by": null,
|
90
|
+
"uuid": "6277f225-5d28-45f1-b020-9b821150ecfe"
|
108
91
|
}
|
109
|
-
]
|
110
|
-
|
92
|
+
],
|
93
|
+
"foregone": [],
|
94
|
+
"language": "PL/SQL",
|
95
|
+
"test_pattern": "ut.*plsql"
|
96
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
CREATE OR REPLACE PACKAGE hello_world# IS
|
2
|
+
FUNCTION hello(
|
3
|
+
i_name varchar2 := 'World'
|
4
|
+
)
|
5
|
+
RETURN varchar2;
|
6
|
+
|
7
|
+
END hello_world#;
|
8
|
+
/
|
9
|
+
|
10
|
+
CREATE OR REPLACE PACKAGE BODY hello_world# IS
|
11
|
+
FUNCTION hello(
|
12
|
+
i_name varchar2 := 'World'
|
13
|
+
)
|
14
|
+
RETURN varchar2
|
15
|
+
AS
|
16
|
+
BEGIN
|
17
|
+
RETURN 'Hello, ' || i_name || '!';
|
18
|
+
END hello;
|
19
|
+
END hello_world#;
|
20
|
+
/
|
@@ -0,0 +1,20 @@
|
|
1
|
+
CREATE OR REPLACE PACKAGE hello_world# IS
|
2
|
+
FUNCTION hello(
|
3
|
+
i_name varchar2 := ''
|
4
|
+
)
|
5
|
+
RETURN varchar2;
|
6
|
+
|
7
|
+
END hello_world#;
|
8
|
+
/
|
9
|
+
|
10
|
+
CREATE OR REPLACE PACKAGE BODY hello_world# IS
|
11
|
+
FUNCTION hello(
|
12
|
+
i_name varchar2 := ''
|
13
|
+
)
|
14
|
+
RETURN varchar2
|
15
|
+
AS
|
16
|
+
BEGIN
|
17
|
+
RETURN NULL;
|
18
|
+
END hello;
|
19
|
+
END hello_world#;
|
20
|
+
/
|
@@ -0,0 +1,60 @@
|
|
1
|
+
CREATE OR REPLACE PACKAGE ut_hello_world#
|
2
|
+
IS
|
3
|
+
PROCEDURE run;
|
4
|
+
END ut_hello_world#;
|
5
|
+
/
|
6
|
+
|
7
|
+
CREATE OR REPLACE PACKAGE BODY ut_hello_world#
|
8
|
+
IS
|
9
|
+
|
10
|
+
PROCEDURE TEST (
|
11
|
+
i_descn varchar2,
|
12
|
+
i_exp varchar2,
|
13
|
+
i_act varchar2
|
14
|
+
)
|
15
|
+
IS
|
16
|
+
BEGIN
|
17
|
+
IF i_exp = i_act THEN
|
18
|
+
dbms_output.put_line('SUCCESS: ' || i_descn);
|
19
|
+
ELSE
|
20
|
+
dbms_output.put_line(
|
21
|
+
'FAILURE: ' || i_descn ||
|
22
|
+
': expected ''' || NVL('' || i_exp, 'NULL') ||
|
23
|
+
''', but got ''' || NVL('' || i_act, 'null') || '''!'
|
24
|
+
);
|
25
|
+
END IF;
|
26
|
+
END TEST;
|
27
|
+
|
28
|
+
PROCEDURE run
|
29
|
+
IS
|
30
|
+
BEGIN
|
31
|
+
TEST(
|
32
|
+
i_descn => 'no name',
|
33
|
+
i_exp => 'Hello, World!',
|
34
|
+
i_act => hello_world#.hello()
|
35
|
+
);
|
36
|
+
|
37
|
+
TEST(
|
38
|
+
i_descn => 'sample name',
|
39
|
+
i_exp => 'Hello, Alice!',
|
40
|
+
i_act => hello_world#.hello('Alice')
|
41
|
+
);
|
42
|
+
|
43
|
+
TEST(
|
44
|
+
i_descn => 'other sample name',
|
45
|
+
i_exp => 'Hello, Bob!',
|
46
|
+
i_act => hello_world#.hello('Bob')
|
47
|
+
);
|
48
|
+
EXCEPTION
|
49
|
+
WHEN others THEN
|
50
|
+
dbms_output.put_line('Test execution failed.');
|
51
|
+
dbms_output.put_line(sqlerrm);
|
52
|
+
END run;
|
53
|
+
|
54
|
+
END ut_hello_world#;
|
55
|
+
/
|
56
|
+
|
57
|
+
BEGIN
|
58
|
+
ut_hello_world#.run;
|
59
|
+
END;
|
60
|
+
/
|
data/tracks/sml/Makefile
CHANGED
@@ -36,6 +36,11 @@ test-%:
|
|
36
36
|
$(eval exercise := $(patsubst test-%, %, $@))
|
37
37
|
@echo
|
38
38
|
@ls ./exercises/$(exercise)/README.md > /dev/null
|
39
|
+
@# check stub type
|
40
|
+
@cd ./exercises/$(exercise) && \
|
41
|
+
poly -q --use test | grep 'error: Type error' | \
|
42
|
+
wc -l | xargs -I @ expr @ = 0 > /dev/null || \
|
43
|
+
{ echo '$(exercise).sml is faulty'; exit 1; }
|
39
44
|
@cd ./exercises/$(exercise) && cat test.sml | sed 's/$(exercise).sml/example.sml/' | poly -q
|
40
45
|
@echo
|
41
46
|
|
data/tracks/sml/bin/generate
CHANGED
@@ -21,7 +21,7 @@ def fetch(exercise):
|
|
21
21
|
return json.loads(response.read().decode('utf8'))
|
22
22
|
except HTTPError as e:
|
23
23
|
if e.status == HTTPStatus.NOT_FOUND.value:
|
24
|
-
msg = "
|
24
|
+
msg = "canonical-data.json was not found."
|
25
25
|
else:
|
26
26
|
msg = 'Unexpected error, please try again later.'
|
27
27
|
raise Exception(msg)
|
@@ -96,18 +96,17 @@ def sml_value(value, smltype=''):
|
|
96
96
|
|
97
97
|
|
98
98
|
def get_fn_args(case):
|
99
|
-
|
99
|
+
reserved_keys = {'property', 'expected', 'description', 'comments'}
|
100
100
|
return OrderedDict(
|
101
101
|
(k, case[k])
|
102
102
|
for k in sorted(case.keys())
|
103
|
-
if k not in
|
103
|
+
if k not in reserved_keys
|
104
104
|
)
|
105
105
|
|
106
106
|
|
107
107
|
def extract_signatures(data):
|
108
108
|
funcs = OrderedDict()
|
109
109
|
exercise = data['exercise']
|
110
|
-
ignored_keys = {'property', 'expected', 'description', 'comments'}
|
111
110
|
|
112
111
|
def type_aux(values):
|
113
112
|
s = {sml_type(val) for val in values}
|