trackler 2.2.1.9 → 2.2.1.10
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/CONTRIBUTING.md +1 -1
- data/problem-specifications/TOPICS.txt +1 -0
- data/tracks/coffeescript/config/maintainers.json +15 -0
- data/tracks/coldfusion/config/maintainers.json +6 -0
- data/tracks/coq/config/maintainers.json +15 -0
- data/tracks/cpp/config/maintainers.json +25 -0
- data/tracks/delphi/config.json +1 -0
- data/tracks/delphi/config/maintainers.json +1 -1
- data/tracks/delphi/docs/SNIPPET.txt +14 -0
- data/tracks/ecmascript/config.json +711 -300
- data/tracks/elisp/config/maintainers.json +15 -0
- data/tracks/elm/config/maintainers.json +25 -0
- data/tracks/erlang/exercises/triangle/test/triangle_tests.erl +3 -3
- data/tracks/fortran/config/maintainers.json +15 -0
- data/tracks/go/config.json +3 -1
- data/tracks/go/config/maintainers.json +3 -1
- data/tracks/go/docs/ABOUT.md +3 -3
- data/tracks/groovy/config.json +1 -3
- data/tracks/groovy/config/maintainers.json +15 -0
- data/tracks/groovy/exercises/grains/Grains.groovy +9 -0
- data/tracks/groovy/exercises/grains/GrainsSpec.groovy +43 -0
- data/tracks/groovy/exercises/grains/README.md +1 -1
- data/tracks/groovy/exercises/word-count/Phrase.groovy +10 -0
- data/tracks/groovy/exercises/word-count/PhraseSpec.groovy +47 -0
- data/tracks/groovy/exercises/word-count/README.md +1 -1
- data/tracks/haxe/config/maintainers.json +6 -0
- data/tracks/idris/config/maintainers.json +15 -0
- data/tracks/java/CONTRIBUTING.md +1 -1
- data/tracks/java/exercises/series/src/example/java/Series.java +7 -9
- data/tracks/julia/config.json +12 -0
- data/tracks/julia/config/exercise_readme.go.tmpl +2 -0
- data/tracks/julia/exercises/anagram/README.md +1 -0
- data/tracks/julia/exercises/atbash-cipher/README.md +1 -0
- data/tracks/julia/exercises/bob/README.md +1 -0
- data/tracks/julia/exercises/collatz-conjecture/README.md +34 -0
- data/tracks/julia/exercises/collatz-conjecture/collatz-conjecture.jl +0 -0
- data/tracks/julia/exercises/collatz-conjecture/example.jl +14 -0
- data/tracks/julia/exercises/collatz-conjecture/runtests.jl +11 -0
- data/tracks/julia/exercises/complex-numbers/README.md +1 -0
- data/tracks/julia/exercises/custom-set/README.md +1 -0
- data/tracks/julia/exercises/difference-of-squares/README.md +1 -0
- data/tracks/julia/exercises/etl/README.md +1 -0
- data/tracks/julia/exercises/gigasecond/README.md +1 -0
- data/tracks/julia/exercises/hamming/README.md +1 -0
- data/tracks/julia/exercises/hello-world/README.md +1 -0
- data/tracks/julia/exercises/isogram/README.md +1 -0
- data/tracks/julia/exercises/leap/README.md +1 -0
- data/tracks/julia/exercises/luhn/README.md +1 -0
- data/tracks/julia/exercises/nucleotide-count/README.md +1 -0
- data/tracks/julia/exercises/pangram/README.md +1 -0
- data/tracks/julia/exercises/pascals-triangle/README.md +1 -0
- data/tracks/julia/exercises/raindrops/README.md +1 -0
- data/tracks/julia/exercises/rna-transcription/README.md +1 -0
- data/tracks/julia/exercises/robot-name/README.md +1 -0
- data/tracks/julia/exercises/roman-numerals/README.md +1 -0
- data/tracks/julia/exercises/rotational-cipher/README.md +1 -0
- data/tracks/julia/exercises/scrabble-score/README.md +1 -0
- data/tracks/julia/exercises/secret-handshake/README.md +1 -0
- data/tracks/julia/exercises/sieve/README.md +1 -0
- data/tracks/julia/exercises/transpose/README.md +1 -0
- data/tracks/julia/exercises/trinary/README.md +1 -0
- data/tracks/julia/exercises/word-count/README.md +1 -0
- data/tracks/lisp/.travis.yml +1 -1
- data/tracks/lisp/config/maintainers.json +5 -5
- data/tracks/mips/config.json +22 -22
- data/tracks/mips/config/maintainers.json +15 -0
- data/tracks/nim/config/maintainers.json +15 -0
- data/tracks/php/config/maintainers.json +35 -0
- data/tracks/plsql/config/maintainers.json +15 -0
- data/tracks/powershell/config/maintainers.json +25 -0
- data/tracks/prolog/config/maintainers.json +15 -0
- data/tracks/python/config/maintainers.json +25 -0
- data/tracks/racket/config/maintainers.json +35 -0
- data/tracks/scheme/config/maintainers.json +25 -0
- data/tracks/sml/config.json +1 -1
- data/tracks/sml/exercises/accumulate/{test_accumulate.sml → test.sml} +0 -0
- data/tracks/sml/exercises/allergies/{test_allergies.sml → test.sml} +0 -0
- data/tracks/sml/exercises/anagram/{test_anagram.sml → test.sml} +0 -0
- data/tracks/sml/exercises/binary/{test_binary.sml → test.sml} +0 -0
- data/tracks/sml/exercises/flatten-array/{test_flatten_array.sml → test.sml} +0 -0
- data/tracks/sml/exercises/hamming/{test_hamming.sml → test.sml} +0 -0
- data/tracks/sml/exercises/nth-prime/{test_nth_prime.sml → test.sml} +0 -0
- data/tracks/sml/exercises/raindrops/{test_raindrops.sml → test.sml} +0 -0
- data/tracks/vbnet/config/maintainers.json +15 -0
- metadata +39 -12
- data/tracks/groovy/exercises/grains/GrainsTest.groovy +0 -45
- data/tracks/groovy/exercises/word-count/PhraseTest.groovy +0 -69
@@ -1,69 +0,0 @@
|
|
1
|
-
import org.junit.Test
|
2
|
-
import static org.junit.Assert.assertEquals
|
3
|
-
|
4
|
-
class PhraseTest {
|
5
|
-
@Test
|
6
|
-
void countOneWord() {
|
7
|
-
def phrase = new Phrase("word")
|
8
|
-
def counts = ["word":1]
|
9
|
-
assertEquals counts, phrase.wordCount()
|
10
|
-
}
|
11
|
-
|
12
|
-
@Test
|
13
|
-
void countOneOfEach() {
|
14
|
-
def phrase = new Phrase("one of each")
|
15
|
-
def counts = ["one":1,"of":1,"each":1]
|
16
|
-
assertEquals counts, phrase.wordCount()
|
17
|
-
}
|
18
|
-
|
19
|
-
@Test
|
20
|
-
void countMultipleOccurrences() {
|
21
|
-
def phrase = new Phrase("one fish two fish red fish blue fish")
|
22
|
-
def counts = ["one":1,"fish":4,"two":1,"red":1,"blue":1]
|
23
|
-
assertEquals counts, phrase.wordCount()
|
24
|
-
}
|
25
|
-
|
26
|
-
@Test
|
27
|
-
void countEverythingOnlyOnce() {
|
28
|
-
def phrase = new Phrase("all the kings horses and all the kings men")
|
29
|
-
def counts = ["all":2,"the":2,"kings":2,"horses":1,"and":1,"men":1]
|
30
|
-
// call wordCount 2x to verify
|
31
|
-
phrase.wordCount()
|
32
|
-
assertEquals counts, phrase.wordCount()
|
33
|
-
}
|
34
|
-
|
35
|
-
@Test
|
36
|
-
void ignorePunctuation() {
|
37
|
-
def phrase = new Phrase('car : carpet as java : javascript!!&@$%^&')
|
38
|
-
def counts = ["car":1,"carpet":1,"as":1,"java":1,"javascript":1]
|
39
|
-
assertEquals counts, phrase.wordCount()
|
40
|
-
}
|
41
|
-
|
42
|
-
@Test
|
43
|
-
void handleNoSpaces() {
|
44
|
-
def phrase = new Phrase("one,two,three")
|
45
|
-
def counts = ["one":1,"two":1,"three":1]
|
46
|
-
assertEquals counts, phrase.wordCount()
|
47
|
-
}
|
48
|
-
|
49
|
-
@Test
|
50
|
-
void includeNumbers() {
|
51
|
-
def phrase = new Phrase("testing, 1, 2 testing")
|
52
|
-
def counts = ["testing":2,"1":1,"2":1]
|
53
|
-
assertEquals counts, phrase.wordCount()
|
54
|
-
}
|
55
|
-
|
56
|
-
@Test
|
57
|
-
void normalizeCase() {
|
58
|
-
def phrase = new Phrase("go Go GO")
|
59
|
-
def counts = ["go":3]
|
60
|
-
assertEquals counts, phrase.wordCount()
|
61
|
-
}
|
62
|
-
|
63
|
-
@Test
|
64
|
-
void handleApostrophes() {
|
65
|
-
def phrase = new Phrase("First: don't laugh. Then: don't cry.")
|
66
|
-
def counts = ["first":1,"don't":2,"laugh":1,"then":1,"cry":1]
|
67
|
-
assertEquals counts, phrase.wordCount()
|
68
|
-
}
|
69
|
-
}
|