trackler 2.0.8.28 → 2.0.8.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/common/CONTRIBUTING.md +4 -1
- data/common/README.md +52 -0
- data/lib/trackler/version.rb +1 -1
- data/tracks/ecmascript/config.json +7 -0
- data/tracks/ecmascript/exercises/perfect-numbers/example.js +68 -0
- data/tracks/ecmascript/exercises/perfect-numbers/gulpfile.js +89 -0
- data/tracks/ecmascript/exercises/perfect-numbers/package.json +28 -0
- data/tracks/ecmascript/exercises/perfect-numbers/perfect-numbers.spec.js +75 -0
- data/tracks/erlang/exercises/accumulate/src/accumulate.app.src +1 -1
- data/tracks/erlang/exercises/all-your-base/src/all_your_base.app.src +1 -1
- data/tracks/erlang/exercises/allergies/src/allergies.app.src +1 -1
- data/tracks/erlang/exercises/anagram/src/anagram.app.src +1 -1
- data/tracks/erlang/exercises/atbash-cipher/src/atbash_cipher.app.src +1 -1
- data/tracks/erlang/exercises/bank-account/src/bank_account.app.src +1 -1
- data/tracks/erlang/exercises/beer-song/src/beer_song.app.src +1 -1
- data/tracks/erlang/exercises/bob/src/bob.app.src +1 -1
- data/tracks/erlang/exercises/circular-buffer/src/circular_buffer.app.src +1 -1
- data/tracks/erlang/exercises/clock/src/clock.app.src +1 -1
- data/tracks/erlang/exercises/difference-of-squares/src/difference_of_squares.app.src +1 -1
- data/tracks/erlang/exercises/etl/src/etl.app.src +1 -1
- data/tracks/erlang/exercises/gigasecond/src/gigasecond.app.src +1 -1
- data/tracks/erlang/exercises/grade-school/src/grade_school.app.src +1 -1
- data/tracks/erlang/exercises/grains/src/grains.app.src +1 -1
- data/tracks/erlang/exercises/hamming/src/hamming.app.src +1 -1
- data/tracks/erlang/exercises/hello-world/src/hello_world.app.src +1 -1
- data/tracks/erlang/exercises/largest-series-product/src/largest_series_product.app.src +1 -1
- data/tracks/erlang/exercises/leap/src/leap.app.src +1 -1
- data/tracks/erlang/exercises/luhn/src/luhn.app.src +1 -1
- data/tracks/erlang/exercises/meetup/src/meetup.app.src +1 -1
- data/tracks/erlang/exercises/nucleotide-count/src/nucleotide_count.app.src +1 -1
- data/tracks/erlang/exercises/parallel-letter-frequency/src/parallel_letter_frequency.app.src +1 -1
- data/tracks/erlang/exercises/phone-number/src/phone_number.app.src +1 -1
- data/tracks/erlang/exercises/rna-transcription/src/rna_transcription.app.src +1 -1
- data/tracks/erlang/exercises/robot-simulator/src/robot_simulator.app.src +1 -1
- data/tracks/erlang/exercises/roman-numerals/src/roman_numerals.app.src +1 -1
- data/tracks/erlang/exercises/rotational-cipher/src/rotational_cipher.app.src +1 -1
- data/tracks/erlang/exercises/scrabble-score/src/scrabble_score.app.src +1 -1
- data/tracks/erlang/exercises/series/src/series.app.src +1 -1
- data/tracks/erlang/exercises/space-age/src/space_age.app.src +1 -1
- data/tracks/erlang/exercises/strain/src/strain.app.src +1 -1
- data/tracks/erlang/exercises/sum-of-multiples/src/sum_of_multiples.app.src +1 -1
- data/tracks/erlang/exercises/triangle/src/triangle.app.src +1 -1
- data/tracks/erlang/exercises/word-count/src/word_count.app.src +1 -1
- data/tracks/erlang/exercises/zipper/src/zipper.app.src +1 -1
- data/tracks/go/exercises/hello-world/hello_world.go +10 -1
- data/tracks/haskell/exercises/simple-linked-list/examples/success-standard/package.yaml +1 -0
- data/tracks/haskell/exercises/simple-linked-list/examples/success-standard/src/LinkedList.hs +1 -0
- data/tracks/haskell/exercises/simple-linked-list/package.yaml +1 -0
- data/tracks/haskell/exercises/simple-linked-list/src/LinkedList.hs +1 -1
- data/tracks/haskell/exercises/simple-linked-list/test/Tests.hs +37 -1
- data/tracks/java/exercises/diamond/src/test/java/DiamondPrinterTest.java +13 -6
- data/tracks/java/exercises/secret-handshake/src/test/java/HandshakeCalculatorTest.java +21 -13
- data/tracks/objective-c/exercises/atbash-cipher/AtbashCipherExample.m +1 -1
- data/tracks/objective-c/exercises/beer-song/BeerSongExample.m +1 -1
- data/tracks/objective-c/exercises/beer-song/BeerSongTest.m +4 -4
- data/tracks/objective-c/exercises/binary-search/BinarySearchExample.m +1 -1
- data/tracks/objective-c/exercises/flatten-array/FlattenArrayExample.h +2 -1
- data/tracks/objective-c/exercises/flatten-array/FlattenArrayExample.m +12 -25
- data/tracks/objective-c/exercises/flatten-array/FlattenArrayTest.m +32 -80
- data/tracks/objective-c/exercises/sublist/SublistTest.m +47 -70
- data/tracks/perl6/exercises/allergies/Allergies.pm6 +1 -0
- data/tracks/perl6/exercises/allergies/Example.pm +3 -1
- data/tracks/perl6/exercises/allergies/allergies.t +187 -137
- data/tracks/perl6/exercises/anagram/Anagram.pm6 +1 -0
- data/tracks/perl6/exercises/anagram/Example.pm +15 -15
- data/tracks/perl6/exercises/anagram/anagram.t +164 -15
- data/tracks/perl6/exercises/atbash-cipher/AtbashCipher.pm6 +1 -0
- data/tracks/perl6/exercises/atbash-cipher/Example.pm +2 -0
- data/tracks/perl6/exercises/atbash-cipher/atbash-cipher.t +109 -86
- data/tracks/perl6/exercises/grains/Example.pm +10 -9
- data/tracks/perl6/exercises/grains/Grains.pm6 +1 -0
- data/tracks/perl6/exercises/grains/grains.t +126 -18
- data/tracks/perl6/exercises/leap/Example.pm +9 -9
- data/tracks/perl6/exercises/leap/Leap.pm6 +4 -0
- data/tracks/perl6/exercises/leap/leap.t +61 -17
- data/tracks/perl6/exercises/phone-number/Example.pm +4 -28
- data/tracks/perl6/exercises/phone-number/PhoneNumber.pm6 +4 -0
- data/tracks/perl6/exercises/phone-number/phone-number.t +102 -65
- data/tracks/perl6/exercises/raindrops/Example.pm +10 -8
- data/tracks/perl6/exercises/raindrops/Raindrops.pm6 +4 -0
- data/tracks/perl6/exercises/raindrops/raindrops.t +153 -20
- data/tracks/perl6/exercises/rna-transcription/Example.pm +5 -7
- data/tracks/perl6/exercises/rna-transcription/RNA.pm6 +4 -0
- data/tracks/perl6/exercises/rna-transcription/rna-transcription.t +107 -11
- data/tracks/perl6/exercises/scrabble-score/Example.pm +14 -19
- data/tracks/perl6/exercises/scrabble-score/Scrabble.pm6 +4 -0
- data/tracks/perl6/exercises/scrabble-score/scrabble-score.t +106 -15
- data/tracks/perl6/exercises/space-age/Example.pm +29 -13
- data/tracks/perl6/exercises/space-age/SpaceAge.pm6 +22 -0
- data/tracks/perl6/exercises/space-age/space-age.t +90 -52
- data/tracks/perl6/exercises/word-count/Example.pm +4 -8
- data/tracks/perl6/exercises/word-count/WordCount.pm6 +4 -0
- data/tracks/perl6/exercises/word-count/word-count.t +149 -16
- data/tracks/perl6/exercises/wordy/Example.pm +13 -13
- data/tracks/perl6/exercises/wordy/Wordy.pm6 +4 -0
- data/tracks/perl6/exercises/wordy/wordy.t +140 -97
- data/tracks/purescript/config.json +7 -0
- data/tracks/purescript/exercises/atbash-cipher/bower.json +18 -0
- data/tracks/purescript/exercises/atbash-cipher/examples/src/AtbashCipher.purs +41 -0
- data/tracks/purescript/exercises/atbash-cipher/src/AtbashCipher.purs +4 -0
- data/tracks/purescript/exercises/atbash-cipher/test/Main.purs +64 -0
- data/tracks/python/exercises/run-length-encoding/run_length_encoding_test.py +2 -0
- data/tracks/swift/exercises/grade-school/Tests/GradeSchoolTests/GradeSchoolTests.swift +1 -1
- metadata +22 -2
@@ -1,9 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
%word_counts{$_.lc}++;
|
6
|
-
}
|
7
|
-
%word_counts;
|
8
|
-
}
|
1
|
+
unit module WordCount:ver<1>;
|
2
|
+
|
3
|
+
sub count-words (Str:D $str --> Hash:D) is export {
|
4
|
+
$str.lc.comb(/ <alnum>+ (\'<alnum>+)? /).Bag.hash
|
9
5
|
}
|
@@ -1,24 +1,157 @@
|
|
1
1
|
#!/usr/bin/env perl6
|
2
2
|
use v6;
|
3
3
|
use Test;
|
4
|
-
use lib
|
4
|
+
use lib my $dir = $?FILE.IO.dirname;
|
5
|
+
use JSON::Tiny;
|
5
6
|
|
6
|
-
|
7
|
-
my $
|
8
|
-
|
9
|
-
|
7
|
+
my $exercise = 'WordCount';
|
8
|
+
my $version = v1;
|
9
|
+
my $module = %*ENV<EXERCISM> ?? 'Example' !! $exercise;
|
10
|
+
plan 13;
|
10
11
|
|
11
|
-
ok
|
12
|
+
use-ok $module or bail-out;
|
13
|
+
require ::($module);
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
-
is
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
{car => 1, carpet => 1, as => 1, java => 1, javascript => 1},
|
20
|
-
'ignore punctuation';
|
21
|
-
is-deeply Word_Counter.count_words('testing, 1, 2 testing'), {testing => 2, 1 => 1, 2 => 1}, 'include numbers';
|
22
|
-
is-deeply Word_Counter.count_words('go Go GO'), {go => 3}, 'normalize case';
|
15
|
+
if ::($exercise).^ver !~~ $version {
|
16
|
+
warn "\nExercise version mismatch. Further tests may fail!"
|
17
|
+
~ "\n$exercise is $(::($exercise).^ver.gist). "
|
18
|
+
~ "Test is $($version.gist).\n";
|
19
|
+
bail-out 'Example version must match test version.' if %*ENV<EXERCISM>;
|
20
|
+
}
|
23
21
|
|
22
|
+
my @subs;
|
23
|
+
BEGIN { @subs = <&count-words> };
|
24
|
+
subtest 'Subroutine(s)', {
|
25
|
+
plan 1;
|
26
|
+
eval-lives-ok "use $module; ::('$_').defined or die '$_ is not defined.'", $_ for @subs;
|
27
|
+
} or bail-out 'All subroutines must be defined and exported.';
|
28
|
+
require ::($module) @subs.eager;
|
24
29
|
|
30
|
+
is-deeply (% = .<input>.&count-words), |.<expected description> for @(my $c-data.<cases>);
|
31
|
+
|
32
|
+
if %*ENV<EXERCISM> && (my $c-data-file = "$dir/../../x-common/exercises/{$dir.IO.basename}/canonical-data.json".IO.resolve) ~~ :f {
|
33
|
+
is-deeply $c-data, from-json($c-data-file.slurp), 'canonical-data'
|
34
|
+
} else { skip }
|
35
|
+
|
36
|
+
done-testing;
|
37
|
+
|
38
|
+
INIT {
|
39
|
+
$c-data := from-json 「
|
40
|
+
{
|
41
|
+
"exercise": "word-count",
|
42
|
+
"version": "1.0.0",
|
43
|
+
"comments": [
|
44
|
+
"For each word in the input, count the number of times it appears in the",
|
45
|
+
"entire sentence."
|
46
|
+
],
|
47
|
+
"cases": [
|
48
|
+
{
|
49
|
+
"description": "count one word",
|
50
|
+
"property": "countwords",
|
51
|
+
"input": "word",
|
52
|
+
"expected": {
|
53
|
+
"word": 1
|
54
|
+
}
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"description": "count one of each word",
|
58
|
+
"property": "countwords",
|
59
|
+
"input": "one of each",
|
60
|
+
"expected": {
|
61
|
+
"one": 1,
|
62
|
+
"of": 1,
|
63
|
+
"each": 1
|
64
|
+
}
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"description": "multiple occurrences of a word",
|
68
|
+
"property": "countwords",
|
69
|
+
"input": "one fish two fish red fish blue fish",
|
70
|
+
"expected": {
|
71
|
+
"one": 1,
|
72
|
+
"fish": 4,
|
73
|
+
"two": 1,
|
74
|
+
"red": 1,
|
75
|
+
"blue": 1
|
76
|
+
}
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"description": "handles cramped lists",
|
80
|
+
"property": "countwords",
|
81
|
+
"input": "one,two,three",
|
82
|
+
"expected": {
|
83
|
+
"one": 1,
|
84
|
+
"two": 1,
|
85
|
+
"three": 1
|
86
|
+
}
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"description": "handles expanded lists",
|
90
|
+
"property": "countwords",
|
91
|
+
"input": "one,\ntwo,\nthree",
|
92
|
+
"expected": {
|
93
|
+
"one": 1,
|
94
|
+
"two": 1,
|
95
|
+
"three": 1
|
96
|
+
}
|
97
|
+
},
|
98
|
+
{
|
99
|
+
"description": "ignore punctuation",
|
100
|
+
"property": "countwords",
|
101
|
+
"input": "car: carpet as java: javascript!!&@$%^&",
|
102
|
+
"expected": {
|
103
|
+
"car": 1,
|
104
|
+
"carpet": 1,
|
105
|
+
"as": 1,
|
106
|
+
"java": 1,
|
107
|
+
"javascript": 1
|
108
|
+
}
|
109
|
+
},
|
110
|
+
{
|
111
|
+
"description": "include numbers",
|
112
|
+
"property": "countwords",
|
113
|
+
"input": "testing, 1, 2 testing",
|
114
|
+
"expected": {
|
115
|
+
"testing": 2,
|
116
|
+
"1": 1,
|
117
|
+
"2": 1
|
118
|
+
}
|
119
|
+
},
|
120
|
+
{
|
121
|
+
"description": "normalize case",
|
122
|
+
"property": "countwords",
|
123
|
+
"input": "go Go GO Stop stop",
|
124
|
+
"expected": {
|
125
|
+
"go": 3,
|
126
|
+
"stop": 2
|
127
|
+
}
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"description": "with apostrophes",
|
131
|
+
"property": "countwords",
|
132
|
+
"input": "First: don't laugh. Then: don't cry.",
|
133
|
+
"expected": {
|
134
|
+
"first": 1,
|
135
|
+
"don't": 2,
|
136
|
+
"laugh": 1,
|
137
|
+
"then": 1,
|
138
|
+
"cry": 1
|
139
|
+
}
|
140
|
+
},
|
141
|
+
{
|
142
|
+
"description": "with quotations",
|
143
|
+
"property": "countwords",
|
144
|
+
"input": "Joe can't tell between 'large' and large.",
|
145
|
+
"expected": {
|
146
|
+
"joe": 1,
|
147
|
+
"can't": 1,
|
148
|
+
"tell": 1,
|
149
|
+
"between": 1,
|
150
|
+
"large": 2,
|
151
|
+
"and": 1
|
152
|
+
}
|
153
|
+
}
|
154
|
+
]
|
155
|
+
}
|
156
|
+
」
|
157
|
+
}
|
@@ -1,16 +1,16 @@
|
|
1
|
-
|
1
|
+
unit module Wordy:ver<1>;
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
3
|
+
sub answer ($q is copy) is export {
|
4
|
+
given $q {
|
5
|
+
s:s:g/^What is|\?$//;
|
6
|
+
s:g/plus/+/;
|
7
|
+
s:g/minus/−/;
|
8
|
+
loop {
|
9
|
+
last unless
|
10
|
+
s:s/(.*) multiplied by/($0)×/
|
11
|
+
or s:s/(.*) divided by/($0)÷/;
|
12
12
|
}
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
}
|
14
|
+
use MONKEY-SEE-NO-EVAL;
|
15
|
+
EVAL $q or fail;
|
16
16
|
}
|
@@ -1,111 +1,154 @@
|
|
1
1
|
#!/usr/bin/env perl6
|
2
|
-
|
2
|
+
use v6;
|
3
3
|
use Test;
|
4
|
+
use lib my $dir = $?FILE.IO.dirname;
|
4
5
|
use JSON::Tiny;
|
5
6
|
|
6
|
-
|
7
|
+
my $exercise = 'Wordy';
|
8
|
+
my $version = v1;
|
9
|
+
my $module = %*ENV<EXERCISM> ?? 'Example' !! $exercise;
|
10
|
+
plan 19;
|
7
11
|
|
8
|
-
|
9
|
-
require ::($module)
|
12
|
+
use-ok $module or bail-out;
|
13
|
+
require ::($module);
|
10
14
|
|
11
|
-
|
15
|
+
if ::($exercise).^ver !~~ $version {
|
16
|
+
warn "\nExercise version mismatch. Further tests may fail!"
|
17
|
+
~ "\n$exercise is $(::($exercise).^ver.gist). "
|
18
|
+
~ "Test is $($version.gist).\n";
|
19
|
+
bail-out 'Example version must match test version.' if %*ENV<EXERCISM>;
|
20
|
+
}
|
12
21
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
+
my @subs;
|
23
|
+
BEGIN { @subs = <&answer> };
|
24
|
+
subtest 'Subroutine(s)', {
|
25
|
+
plan 1;
|
26
|
+
eval-lives-ok "use $module; ::('$_').defined or die '$_ is not defined.'", $_ for @subs;
|
27
|
+
} or bail-out 'All subroutines must be defined and exported.';
|
28
|
+
require ::($module) @subs.eager;
|
29
|
+
|
30
|
+
for @(my $c-data.<cases>) {
|
31
|
+
if .<expected> === False {
|
32
|
+
throws-like {.<input>.&answer}, Exception, .<description>;
|
33
|
+
} else {
|
34
|
+
is .<input>.&answer, |.<expected description>;
|
35
|
+
}
|
22
36
|
}
|
23
37
|
|
38
|
+
if %*ENV<EXERCISM> && (my $c-data-file = "$dir/../../x-common/exercises/{$dir.IO.basename}/canonical-data.json".IO.resolve) ~~ :f {
|
39
|
+
is-deeply $c-data, from-json($c-data-file.slurp), 'canonical-data'
|
40
|
+
} else { skip }
|
41
|
+
|
24
42
|
done-testing;
|
25
43
|
|
26
44
|
INIT {
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
"
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
45
|
+
$c-data := from-json 「
|
46
|
+
{
|
47
|
+
"exercise": "wordy",
|
48
|
+
"version": "1.0.0",
|
49
|
+
"comments": [
|
50
|
+
"The tests that expect 'false' should be implemented to raise",
|
51
|
+
"an error, or indicate a failure. Implement this in a way that",
|
52
|
+
"makes sense for your language."
|
53
|
+
],
|
54
|
+
"cases": [
|
55
|
+
{
|
56
|
+
"description": "addition",
|
57
|
+
"property": "answer",
|
58
|
+
"input": "What is 1 plus 1?",
|
59
|
+
"expected": 2
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"description": "more addition",
|
63
|
+
"property": "answer",
|
64
|
+
"input": "What is 53 plus 2?",
|
65
|
+
"expected": 55
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"description": "addition with negative numbers",
|
69
|
+
"property": "answer",
|
70
|
+
"input": "What is -1 plus -10?",
|
71
|
+
"expected": -11
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"description": "large addition",
|
75
|
+
"property": "answer",
|
76
|
+
"input": "What is 123 plus 45678?",
|
77
|
+
"expected": 45801
|
78
|
+
},
|
79
|
+
{
|
80
|
+
"description": "subtraction",
|
81
|
+
"property": "answer",
|
82
|
+
"input": "What is 4 minus -12?",
|
83
|
+
"expected": 16
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"description": "multiplication",
|
87
|
+
"property": "answer",
|
88
|
+
"input": "What is -3 multiplied by 25?",
|
89
|
+
"expected": -75
|
90
|
+
},
|
91
|
+
{
|
92
|
+
"description": "division",
|
93
|
+
"property": "answer",
|
94
|
+
"input": "What is 33 divided by -3?",
|
95
|
+
"expected": -11
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"description": "multiple additions",
|
99
|
+
"property": "answer",
|
100
|
+
"input": "What is 1 plus 1 plus 1?",
|
101
|
+
"expected": 3
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"description": "addition and subtraction",
|
105
|
+
"property": "answer",
|
106
|
+
"input": "What is 1 plus 5 minus -2?",
|
107
|
+
"expected": 8
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"description": "multiple subtraction",
|
111
|
+
"property": "answer",
|
112
|
+
"input": "What is 20 minus 4 minus 13?",
|
113
|
+
"expected": 3
|
114
|
+
},
|
115
|
+
{
|
116
|
+
"description": "subtraction then addition",
|
117
|
+
"property": "answer",
|
118
|
+
"input": "What is 17 minus 6 plus 3?",
|
119
|
+
"expected": 14
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"description": "multiple multiplication",
|
123
|
+
"property": "answer",
|
124
|
+
"input": "What is 2 multiplied by -2 multiplied by 3?",
|
125
|
+
"expected": -12
|
126
|
+
},
|
127
|
+
{
|
128
|
+
"description": "addition and multiplication",
|
129
|
+
"property": "answer",
|
130
|
+
"input": "What is -3 plus 7 multiplied by -2?",
|
131
|
+
"expected": -8
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"description": "multiple division",
|
135
|
+
"property": "answer",
|
136
|
+
"input": "What is -12 divided by 2 divided by -3?",
|
137
|
+
"expected": 2
|
138
|
+
},
|
139
|
+
{
|
140
|
+
"description": "unknown operation",
|
141
|
+
"property": "answer",
|
142
|
+
"input": "What is 52 cubed?",
|
143
|
+
"expected": false
|
144
|
+
},
|
145
|
+
{
|
146
|
+
"description": "Non math question",
|
147
|
+
"property": "answer",
|
148
|
+
"input": "Who is the President of the United States?",
|
149
|
+
"expected": false
|
150
|
+
}
|
151
|
+
]
|
152
|
+
}
|
110
153
|
」
|
111
154
|
}
|