trackler 2.2.1.30 → 2.2.1.31
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/exercises/word-search/canonical-data.json +278 -4
- data/tracks/c/exercises/raindrops/test/test_raindrops.c +0 -16
- data/tracks/ceylon/README.md +1 -1
- data/tracks/ceylon/config.json +12 -0
- data/tracks/ceylon/docs/RESOURCES.md +1 -1
- data/tracks/ceylon/exercises/anagram/source/anagram/AnagramTest.ceylon +1 -1
- data/tracks/ceylon/exercises/anagram/source/anagram/module.ceylon +1 -1
- data/tracks/ceylon/exercises/bracket-push/example/module.ceylon +2 -2
- data/tracks/ceylon/exercises/bracket-push/source/bracketpush/BracketsTest.ceylon +1 -1
- data/tracks/ceylon/exercises/bracket-push/source/bracketpush/module.ceylon +1 -1
- data/tracks/ceylon/exercises/hamming/source/hamming/HammingTest.ceylon +1 -1
- data/tracks/ceylon/exercises/hamming/source/hamming/module.ceylon +1 -1
- data/tracks/ceylon/exercises/largest-series-product/source/largestseriesproduct/SeriesTest.ceylon +1 -1
- data/tracks/ceylon/exercises/largest-series-product/source/largestseriesproduct/module.ceylon +1 -1
- data/tracks/ceylon/exercises/leap/source/leap/LeapTest.ceylon +1 -1
- data/tracks/ceylon/exercises/leap/source/leap/module.ceylon +1 -1
- data/tracks/ceylon/exercises/react/example/module.ceylon +2 -2
- data/tracks/ceylon/exercises/react/source/react/ReactorTest.ceylon +1 -1
- data/tracks/ceylon/exercises/react/source/react/module.ceylon +1 -1
- data/tracks/ceylon/exercises/rna-transcription/README.md +41 -0
- data/tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon +13 -0
- data/tracks/ceylon/exercises/rna-transcription/source/rnatranscription/RNA.ceylon +5 -0
- data/tracks/ceylon/exercises/rna-transcription/source/rnatranscription/RNAtest.ceylon +33 -0
- data/tracks/ceylon/exercises/rna-transcription/source/rnatranscription/module.ceylon +3 -0
- data/tracks/ceylon/exercises/sieve/example/module.ceylon +2 -2
- data/tracks/ceylon/exercises/sieve/source/sieve/SieveTest.ceylon +1 -1
- data/tracks/ceylon/exercises/sieve/source/sieve/module.ceylon +1 -1
- data/tracks/clojure/.travis.yml +1 -1
- data/tracks/clojure/_src/generator.clj +1 -1
- data/tracks/clojure/exercises/clock/{clock.mustache → .meta/clock.mustache} +0 -0
- data/tracks/clojure/exercises/luhn/{luhn.mustache → .meta/luhn.mustache} +0 -0
- data/tracks/clojure/exercises/sublist/{sublist.mustache → .meta/sublist.mustache} +0 -0
- data/tracks/go/exercises/robot-name/.meta/hints.md +13 -0
- data/tracks/go/exercises/robot-name/bonus_example.go +2 -0
- data/tracks/java/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/tracks/java/gradle/wrapper/gradle-wrapper.properties +2 -2
- data/tracks/java/gradlew +3 -3
- data/tracks/java/gradlew.bat +0 -0
- data/tracks/php/config.json +8 -0
- data/tracks/php/exercises/flatten-array/example.php +10 -0
- data/tracks/php/exercises/flatten-array/flatten-array_test.php +51 -0
- data/tracks/ruby/exercises/hello-world/GETTING_STARTED.md +2 -2
- data/tracks/scala/exercises/accumulate/src/test/scala/AccumulateTest.scala +1 -0
- data/tracks/scala/exercises/allergies/example.scala +3 -3
- data/tracks/scala/exercises/allergies/src/test/scala/AllergiesTest.scala +68 -33
- data/tracks/scala/exercises/bank-account/src/test/scala/BankAccountTest.scala +1 -0
- data/tracks/scala/exercises/binary-search-tree/src/test/scala/BstTest.scala +1 -0
- data/tracks/scala/exercises/connect/example.scala +1 -1
- data/tracks/scala/exercises/connect/src/test/scala/ConnectTest.scala +72 -56
- data/tracks/scala/exercises/dominoes/src/main/scala/.keep +0 -0
- data/tracks/scala/exercises/dominoes/src/test/scala/DominoesTest.scala +32 -31
- data/tracks/scala/exercises/grade-school/src/test/scala/GradeSchoolTest.scala +1 -0
- data/tracks/scala/exercises/lens-person/src/test/scala/LensPersonTest.scala +1 -0
- data/tracks/scala/exercises/linked-list/src/test/scala/DequeTest.scala +1 -0
- data/tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala +1 -0
- data/tracks/scala/exercises/parallel-letter-frequency/src/test/scala/FrequencyTest.scala +1 -0
- data/tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala +2 -1
- data/tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala +1 -0
- data/tracks/scala/exercises/robot-name/src/test/scala/RobotNameTest.scala +1 -0
- data/tracks/scala/exercises/series/src/test/scala/SeriesTest.scala +1 -0
- data/tracks/scala/exercises/sgf-parsing/src/test/scala/SgfTest.scala +1 -0
- data/tracks/scala/exercises/simple-cipher/src/test/scala/CipherTest.scala +1 -0
- data/tracks/scala/exercises/simple-linked-list/src/test/scala/SimpleLinkedListTest.scala +1 -1
- data/tracks/scala/exercises/strain/src/test/scala/StrainTest.scala +2 -1
- data/tracks/scala/exercises/wordy/example.scala +3 -3
- data/tracks/scala/exercises/wordy/src/test/scala/WordyTest.scala +84 -0
- data/tracks/scala/exercises/zebra-puzzle/src/test/scala/ZebraPuzzleTest.scala +1 -0
- data/tracks/scala/exercises/zipper/src/test/scala/ZipperTest.scala +1 -0
- data/tracks/scala/testgen/src/main/scala/AllergiesTestGenerator.scala +60 -0
- data/tracks/scala/testgen/src/main/scala/ConnectTestGenerator.scala +52 -0
- data/tracks/scala/testgen/src/main/scala/DominoesTestGenerator.scala +71 -0
- data/tracks/scala/testgen/src/main/scala/WordyTestGenerator.scala +35 -0
- data/tracks/scala/testgen/src/main/scala/testgen/TestSuiteBuilder.scala +20 -0
- data/tracks/scala/testgen/src/main/twirl/funSuiteTemplateIgnoreExpected.scala.txt +16 -0
- metadata +20 -8
- data/tracks/scala/exercises/allergies/src/main/scala/Allergies.scala +0 -11
- data/tracks/scala/exercises/dominoes/src/main/scala/Dominoes.scala +0 -4
- data/tracks/scala/exercises/wordy/src/test/scala/WordProblemTest.scala +0 -81
@@ -1,81 +0,0 @@
|
|
1
|
-
import org.scalatest.{Matchers, FlatSpec}
|
2
|
-
|
3
|
-
class WordProblemTest extends FlatSpec with Matchers {
|
4
|
-
|
5
|
-
it should "handle simple addition" in {
|
6
|
-
WordProblem("What is 1 plus 1?") should equal(Some(2))
|
7
|
-
}
|
8
|
-
|
9
|
-
it should "handle addition with negative numbers" in {
|
10
|
-
pending
|
11
|
-
WordProblem("What is -1 plus -10?") should equal(Some(-11))
|
12
|
-
}
|
13
|
-
|
14
|
-
it should "handle repeated addition" in {
|
15
|
-
pending
|
16
|
-
WordProblem("What is 1 plus 1 plus 1?") should equal(Some(3))
|
17
|
-
}
|
18
|
-
|
19
|
-
it should "handle simple subtraction" in {
|
20
|
-
pending
|
21
|
-
WordProblem("What is 1 minus 1?") should equal(Some(0))
|
22
|
-
}
|
23
|
-
|
24
|
-
it should "handle subtraction with negative numbers" in {
|
25
|
-
pending
|
26
|
-
WordProblem("What is 4 minus -12?") should equal(Some(16))
|
27
|
-
}
|
28
|
-
|
29
|
-
it should "handle repeated subtraction" in {
|
30
|
-
pending
|
31
|
-
WordProblem("What is 20 minus 4 minus 13?") should equal(Some(3))
|
32
|
-
}
|
33
|
-
|
34
|
-
it should "handle simple multiplication" in {
|
35
|
-
pending
|
36
|
-
WordProblem("What is 10 multiplied by 10?") should equal(Some(100))
|
37
|
-
}
|
38
|
-
|
39
|
-
it should "handle multiplication with negative numbers" in {
|
40
|
-
pending
|
41
|
-
WordProblem("What is -10 multiplied by -10?") should equal(Some(100))
|
42
|
-
}
|
43
|
-
|
44
|
-
it should "handle repeated multiplication" in {
|
45
|
-
pending
|
46
|
-
WordProblem("What is 2 multiplied by -2 multiplied by 3?") should equal(Some(-12))
|
47
|
-
}
|
48
|
-
|
49
|
-
it should "handle simple division" in {
|
50
|
-
pending
|
51
|
-
WordProblem("What is 10 divided by 10?") should equal(Some(1))
|
52
|
-
}
|
53
|
-
|
54
|
-
it should "handle division with negative numbers" in {
|
55
|
-
pending
|
56
|
-
WordProblem("What is 33 divided by -3?") should equal(Some(-11))
|
57
|
-
}
|
58
|
-
|
59
|
-
it should "handle repeated division" in {
|
60
|
-
pending
|
61
|
-
WordProblem("What is -12 divided by 2 divided by -3?") should equal(Some(2))
|
62
|
-
}
|
63
|
-
|
64
|
-
it should "handle mixed operations" in {
|
65
|
-
pending
|
66
|
-
WordProblem("What is 1 plus 5 minus -2?") should equal(Some(8))
|
67
|
-
WordProblem("What is 17 minus 6 plus 3?") should equal(Some(14))
|
68
|
-
WordProblem("What is -3 plus 7 multiplied by -2?") should equal(Some(-8))
|
69
|
-
}
|
70
|
-
|
71
|
-
it should "handle invalid word problem" in {
|
72
|
-
pending
|
73
|
-
WordProblem("What is 1 plus 5 minus -2?") should equal(Some(8))
|
74
|
-
}
|
75
|
-
|
76
|
-
// Test for "Extension"
|
77
|
-
ignore should "handle powers" in {
|
78
|
-
pending
|
79
|
-
WordProblem("What is 2 raised to the 5?") should equal(Some(32))
|
80
|
-
}
|
81
|
-
}
|