trackler 2.0.6.33 → 2.0.6.34
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/tracks/delphi/exercises/beer-song/inputdata.txt +7 -0
- data/tracks/delphi/exercises/beer-song/uBeerSongExample.pas +12 -12
- data/tracks/delphi/exercises/beer-song/uBeerSongTests.pas +74 -59
- data/tracks/elixir/exercises/grains/example.exs +3 -2
- data/tracks/elixir/exercises/grains/grains_test.exs +24 -8
- data/tracks/go/exercises/binary-search/binary_search_test.go +8 -0
- data/tracks/go/exercises/binary-search/example.go +2 -0
- data/tracks/go/exercises/binary/binary_test.go +5 -2
- data/tracks/go/exercises/variable-length-quantity/example.go +2 -0
- data/tracks/go/exercises/variable-length-quantity/variable_length_quantity_test.go +8 -0
- data/tracks/go/exercises/word-count/word_count_test.go +4 -1
- data/tracks/julia/config.json +26 -0
- data/tracks/julia/exercises/gigasecond/example.jl +1 -0
- data/tracks/julia/exercises/gigasecond/gigasecond.jl +3 -0
- data/tracks/julia/exercises/gigasecond/runtests.jl +15 -0
- data/tracks/julia/exercises/roman-numerals/example.jl +21 -0
- data/tracks/julia/exercises/roman-numerals/roman-numerals.jl +3 -0
- data/tracks/julia/exercises/roman-numerals/runtests.jl +37 -0
- data/tracks/julia/exercises/transpose/example.jl +20 -0
- data/tracks/julia/exercises/transpose/runtests.jl +212 -0
- data/tracks/julia/exercises/transpose/transpose.jl +3 -0
- data/tracks/kotlin/.travis.yml +5 -2
- data/tracks/kotlin/bin/{build.sh → unit-tests.sh} +8 -6
- data/tracks/kotlin/exercises/_template/build.gradle +6 -0
- data/tracks/kotlin/exercises/accumulate/build.gradle +6 -0
- data/tracks/kotlin/exercises/accumulate/src/test/kotlin/AccumulateTest.kt +7 -0
- data/tracks/kotlin/exercises/acronym/build.gradle +6 -0
- data/tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt +7 -0
- data/tracks/kotlin/exercises/allergies/build.gradle +6 -0
- data/tracks/kotlin/exercises/allergies/src/test/kotlin/AllergiesTest.kt +20 -0
- data/tracks/kotlin/exercises/anagram/build.gradle +6 -0
- data/tracks/kotlin/exercises/anagram/src/test/kotlin/AnagramTest.kt +11 -0
- data/tracks/kotlin/exercises/atbash-cipher/build.gradle +6 -0
- data/tracks/kotlin/exercises/atbash-cipher/src/test/kotlin/AtbashTest.kt +3 -0
- data/tracks/kotlin/exercises/beer-song/build.gradle +6 -0
- data/tracks/kotlin/exercises/beer-song/src/test/kotlin/BeerSongTest.kt +13 -0
- data/tracks/kotlin/exercises/binary-search/build.gradle +6 -0
- data/tracks/kotlin/exercises/binary-search/src/test/kotlin/BinarySearchTest.kt +9 -0
- data/tracks/kotlin/exercises/binary/build.gradle +6 -0
- data/tracks/kotlin/exercises/binary/src/test/kotlin/BinaryTest.kt +2 -0
- data/tracks/kotlin/exercises/bob/build.gradle +6 -0
- data/tracks/kotlin/exercises/bob/src/test/kotlin/BobTest.kt +19 -0
- data/tracks/kotlin/exercises/bracket-push/build.gradle +6 -0
- data/tracks/kotlin/exercises/bracket-push/src/test/kotlin/BracketPushTest.kt +2 -0
- data/tracks/kotlin/exercises/build.gradle +17 -1
- data/tracks/kotlin/exercises/change/build.gradle +6 -0
- data/tracks/kotlin/exercises/change/src/test/kotlin/ChangeTest.kt +9 -0
- data/tracks/kotlin/exercises/difference-of-squares/build.gradle +6 -0
- data/tracks/kotlin/exercises/difference-of-squares/src/test/kotlin/SquaresTest.kt +13 -1
- data/tracks/kotlin/exercises/etl/build.gradle +6 -0
- data/tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt +5 -0
- data/tracks/kotlin/exercises/flatten-array/build.gradle +6 -0
- data/tracks/kotlin/exercises/flatten-array/src/test/kotlin/FlattenerTest.kt +9 -1
- data/tracks/kotlin/exercises/gigasecond/build.gradle +6 -0
- data/tracks/kotlin/exercises/gigasecond/src/test/kotlin/GigasecondTest.kt +6 -0
- data/tracks/kotlin/exercises/grade-school/build.gradle +6 -0
- data/tracks/kotlin/exercises/grade-school/src/test/kotlin/SchoolTest.kt +8 -0
- data/tracks/kotlin/exercises/hamming/build.gradle +6 -0
- data/tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt +10 -0
- data/tracks/kotlin/exercises/hello-world/build.gradle +6 -0
- data/tracks/kotlin/exercises/hello-world/src/test/kotlin/HelloWorldTest.kt +6 -0
- data/tracks/kotlin/exercises/hexadecimal/build.gradle +6 -0
- data/tracks/kotlin/exercises/hexadecimal/src/test/kotlin/HexadecimalTest.kt +2 -0
- data/tracks/kotlin/exercises/isogram/build.gradle +6 -0
- data/tracks/kotlin/exercises/isogram/src/test/kotlin/IsogramTest.kt +2 -0
- data/tracks/kotlin/exercises/largest-series-product/build.gradle +6 -0
- data/tracks/kotlin/exercises/largest-series-product/src/test/kotlin/SeriesInvalidInputTest.kt +5 -0
- data/tracks/kotlin/exercises/largest-series-product/src/test/kotlin/SeriesValidInputTest.kt +2 -0
- data/tracks/kotlin/exercises/leap/build.gradle +6 -0
- data/tracks/kotlin/exercises/leap/src/test/kotlin/LeapTest.kt +8 -0
- data/tracks/kotlin/exercises/linked-list/build.gradle +6 -0
- data/tracks/kotlin/exercises/linked-list/src/test/kotlin/DequeTest.kt +6 -0
- data/tracks/kotlin/exercises/luhn/build.gradle +6 -0
- data/tracks/kotlin/exercises/luhn/src/test/kotlin/LuhnTest.kt +11 -0
- data/tracks/kotlin/exercises/nth-prime/build.gradle +6 -0
- data/tracks/kotlin/exercises/nth-prime/src/test/kotlin/PrimeTest.kt +6 -0
- data/tracks/kotlin/exercises/nucleotide-count/build.gradle +6 -0
- data/tracks/kotlin/exercises/nucleotide-count/src/test/kotlin/NucleotideTest.kt +12 -1
- data/tracks/kotlin/exercises/pangram/build.gradle +6 -0
- data/tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt +11 -0
- data/tracks/kotlin/exercises/pascals-triangle/build.gradle +6 -0
- data/tracks/kotlin/exercises/pascals-triangle/src/test/kotlin/PascalsTriangleTest.kt +5 -0
- data/tracks/kotlin/exercises/phone-number/build.gradle +6 -0
- data/tracks/kotlin/exercises/phone-number/src/test/kotlin/PhoneNumberTest.kt +9 -0
- data/tracks/kotlin/exercises/pig-latin/build.gradle +6 -0
- data/tracks/kotlin/exercises/pig-latin/src/test/kotlin/PigLatinTest.kt +2 -0
- data/tracks/kotlin/exercises/raindrops/build.gradle +6 -0
- data/tracks/kotlin/exercises/raindrops/src/test/kotlin/RaindropsTest.kt +2 -0
- data/tracks/kotlin/exercises/rna-transcription/build.gradle +6 -0
- data/tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt +8 -1
- data/tracks/kotlin/exercises/robot-name/build.gradle +6 -0
- data/tracks/kotlin/exercises/robot-name/src/test/kotlin/RobotTest.kt +4 -0
- data/tracks/kotlin/exercises/roman-numerals/build.gradle +6 -0
- data/tracks/kotlin/exercises/roman-numerals/src/test/kotlin/RomanNumeralTest.kt +2 -0
- data/tracks/kotlin/exercises/scrabble-score/build.gradle +6 -0
- data/tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt +2 -0
- data/tracks/kotlin/exercises/series/build.gradle +6 -0
- data/tracks/kotlin/exercises/series/src/test/kotlin/SeriesTest.kt +4 -0
- data/tracks/kotlin/exercises/sieve/build.gradle +6 -0
- data/tracks/kotlin/exercises/sieve/src/test/kotlin/SieveTest.kt +4 -0
- data/tracks/kotlin/exercises/simple-cipher/build.gradle +6 -0
- data/tracks/kotlin/exercises/simple-cipher/src/test/kotlin/IncorrectKeyCipherTest.kt +6 -0
- data/tracks/kotlin/exercises/simple-cipher/src/test/kotlin/RandomKeyCipherTest.kt +7 -0
- data/tracks/kotlin/exercises/simple-cipher/src/test/kotlin/SubstitutionCipherTest.kt +9 -0
- data/tracks/kotlin/exercises/space-age/build.gradle +6 -0
- data/tracks/kotlin/exercises/space-age/src/test/kotlin/SpaceAgeTest.kt +10 -0
- data/tracks/kotlin/exercises/strain/build.gradle +6 -0
- data/tracks/kotlin/exercises/strain/src/test/kotlin/StrainTest.kt +13 -0
- data/tracks/kotlin/exercises/word-count/build.gradle +6 -0
- data/tracks/kotlin/exercises/word-count/src/test/kotlin/WordCountTest.kt +8 -0
- data/tracks/objective-c/circle.yml +1 -1
- data/tracks/perl6/.travis.yml +2 -2
- data/tracks/perl6/config.json +5 -0
- data/tracks/perl6/docs/TESTS.md +78 -18
- data/tracks/perl6/exercises/allergies/{Example.p6 → Example.pm} +0 -0
- data/tracks/perl6/exercises/allergies/allergies.t +2 -7
- data/tracks/perl6/exercises/atbash-cipher/{Example.p6 → Example.pm} +0 -0
- data/tracks/perl6/exercises/atbash-cipher/cipher.t +2 -7
- data/tracks/perl6/exercises/linked-list/Example.pm6 +51 -0
- data/tracks/perl6/exercises/linked-list/linked-list.t +91 -0
- data/tracks/perl6/exercises/space-age/{Example.p6 → Example.pm} +0 -0
- data/tracks/perl6/exercises/space-age/space-age.t +2 -7
- data/tracks/perl6/exercises/trinary/{Example.p6 → Example.pm} +0 -0
- data/tracks/perl6/exercises/trinary/trinary.t +2 -7
- data/tracks/perl6/exercises/wordy/{Example.p6 → Example.pm} +0 -0
- data/tracks/perl6/exercises/wordy/wordy.t +2 -7
- data/tracks/pony/README.md +4 -27
- data/tracks/pony/config.json +16 -0
- data/tracks/pony/exercises/atbash-cipher/example.pony +40 -0
- data/tracks/pony/exercises/atbash-cipher/test.pony +67 -0
- data/tracks/pony/exercises/beer-song/example.pony +44 -0
- data/tracks/pony/exercises/beer-song/test.pony +27 -0
- data/tracks/pony/exercises/rna-transcription/test.pony +1 -1
- data/tracks/prolog/docs/INSTALLATION.md +1 -1
- data/tracks/prolog/docs/TESTS.md +2 -2
- metadata +24 -8
@@ -1,4 +1,5 @@
|
|
1
1
|
import org.junit.Test
|
2
|
+
import org.junit.Ignore
|
2
3
|
import org.junit.runner.RunWith
|
3
4
|
import org.junit.runners.Parameterized
|
4
5
|
import kotlin.test.assertEquals
|
@@ -27,6 +28,7 @@ class BinaryTest(val input: String, val expectedOutput: Int) {
|
|
27
28
|
)
|
28
29
|
}
|
29
30
|
|
31
|
+
|
30
32
|
@Test
|
31
33
|
fun binaryStringToInt() {
|
32
34
|
assertEquals(expectedOutput, Binary.toDecimal(input))
|
@@ -1,93 +1,112 @@
|
|
1
1
|
import org.junit.Test
|
2
|
+
import org.junit.Ignore
|
2
3
|
import kotlin.test.assertEquals
|
3
4
|
|
4
5
|
class BobTest {
|
5
6
|
|
7
|
+
|
6
8
|
@Test
|
7
9
|
fun saySomething() {
|
8
10
|
assertEquals("Whatever.", Bob.hey("Tom-ay-to, tom-aaaah-to."))
|
9
11
|
}
|
10
12
|
|
13
|
+
@Ignore
|
11
14
|
@Test
|
12
15
|
fun shouting() {
|
13
16
|
assertEquals("Whoa, chill out!", Bob.hey("WATCH OUT!"))
|
14
17
|
}
|
15
18
|
|
19
|
+
@Ignore
|
16
20
|
@Test
|
17
21
|
fun askingAQuestion() {
|
18
22
|
assertEquals("Sure.", Bob.hey("Does this cryogenic chamber make me look fat?"))
|
19
23
|
}
|
20
24
|
|
25
|
+
@Ignore
|
21
26
|
@Test
|
22
27
|
fun askingANumericQuestion() {
|
23
28
|
assertEquals("Sure.", Bob.hey("You are, what, like 15?"))
|
24
29
|
}
|
25
30
|
|
31
|
+
@Ignore
|
26
32
|
@Test
|
27
33
|
fun talkingForcefully() {
|
28
34
|
assertEquals("Whatever.", Bob.hey("Let's go make out behind the gym!"))
|
29
35
|
}
|
30
36
|
|
37
|
+
@Ignore
|
31
38
|
@Test
|
32
39
|
fun usingAcronymsInRegularSpeech() {
|
33
40
|
assertEquals("Whatever.", Bob.hey("It's OK if you don't want to go to the DMV."))
|
34
41
|
}
|
35
42
|
|
43
|
+
@Ignore
|
36
44
|
@Test
|
37
45
|
fun forcefulQuestions() {
|
38
46
|
assertEquals("Whoa, chill out!", Bob.hey("WHAT THE HELL WERE YOU THINKING?"))
|
39
47
|
}
|
40
48
|
|
49
|
+
@Ignore
|
41
50
|
@Test
|
42
51
|
fun shoutingNumbers() {
|
43
52
|
assertEquals("Whoa, chill out!", Bob.hey("1, 2, 3 GO!"))
|
44
53
|
}
|
45
54
|
|
55
|
+
@Ignore
|
46
56
|
@Test
|
47
57
|
fun onlyNumbers() {
|
48
58
|
assertEquals("Whatever.", Bob.hey("1, 2, 3"))
|
49
59
|
}
|
50
60
|
|
61
|
+
@Ignore
|
51
62
|
@Test
|
52
63
|
fun questionWithOnlyNumbers() {
|
53
64
|
assertEquals("Sure.", Bob.hey("4?"))
|
54
65
|
}
|
55
66
|
|
67
|
+
@Ignore
|
56
68
|
@Test
|
57
69
|
fun shoutingWithSpecialCharacters() {
|
58
70
|
assertEquals("Whoa, chill out!", Bob.hey("ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!"))
|
59
71
|
}
|
60
72
|
|
73
|
+
@Ignore
|
61
74
|
@Test
|
62
75
|
fun shoutingWithUmlauts() {
|
63
76
|
assertEquals("Whoa, chill out!", Bob.hey("\u00dcML\u00c4\u00dcTS!"))
|
64
77
|
}
|
65
78
|
|
79
|
+
@Ignore
|
66
80
|
@Test
|
67
81
|
fun calmlySpeakingWithUmlauts() {
|
68
82
|
assertEquals("Whatever.", Bob.hey("\u00dcML\u00e4\u00dcTS!"))
|
69
83
|
}
|
70
84
|
|
85
|
+
@Ignore
|
71
86
|
@Test
|
72
87
|
fun shoutingWithNoExclamationMark() {
|
73
88
|
assertEquals("Whoa, chill out!", Bob.hey("I HATE YOU"))
|
74
89
|
}
|
75
90
|
|
91
|
+
@Ignore
|
76
92
|
@Test
|
77
93
|
fun statementContainingQuestionMark() {
|
78
94
|
assertEquals("Whatever.", Bob.hey("Ending with ? means a question."))
|
79
95
|
}
|
80
96
|
|
97
|
+
@Ignore
|
81
98
|
@Test
|
82
99
|
fun prattlingOn() {
|
83
100
|
assertEquals("Sure.", Bob.hey("Wait! Hang on. Are you going to be OK?"))
|
84
101
|
}
|
85
102
|
|
103
|
+
@Ignore
|
86
104
|
@Test
|
87
105
|
fun silence() {
|
88
106
|
assertEquals("Fine. Be that way!", Bob.hey(""))
|
89
107
|
}
|
90
108
|
|
109
|
+
@Ignore
|
91
110
|
@Test
|
92
111
|
fun prolongedSilence() {
|
93
112
|
assertEquals("Fine. Be that way!", Bob.hey(" "))
|
@@ -1,5 +1,6 @@
|
|
1
1
|
|
2
2
|
import org.junit.Test
|
3
|
+
import org.junit.Ignore
|
3
4
|
import org.junit.runner.RunWith
|
4
5
|
import org.junit.runners.Parameterized
|
5
6
|
import kotlin.test.assertEquals
|
@@ -26,6 +27,7 @@ class BracketPushTest(val input: String, val expectedOutput: Boolean) {
|
|
26
27
|
)
|
27
28
|
}
|
28
29
|
|
30
|
+
|
29
31
|
@Test
|
30
32
|
fun test() {
|
31
33
|
assertEquals(expectedOutput, BracketPush.isValid(input))
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
subprojects {
|
3
2
|
afterEvaluate { Project project ->
|
4
3
|
sourceSets {
|
@@ -18,6 +17,23 @@ subprojects {
|
|
18
17
|
project["compileStarterSourceKotlin"].doFirst { compileTask ->
|
19
18
|
println " (source = " + compileTask.source.asPath + ")"
|
20
19
|
}
|
20
|
+
|
21
|
+
// In lieu of being able to disable @Ignore in JUnit tests, we filter
|
22
|
+
// those annotations, placing the edited tests in the path named here.
|
23
|
+
test {
|
24
|
+
kotlin.srcDirs = ["build/gen/test/kotlin"]
|
25
|
+
}
|
26
|
+
project["compileTestKotlin"].doFirst { compileTask ->
|
27
|
+
println " (test source = " + compileTask.source.asPath + ")"
|
28
|
+
}
|
21
29
|
}
|
30
|
+
|
31
|
+
task copyTestsFilteringIgnores(type: Copy) {
|
32
|
+
from "src/test/kotlin"
|
33
|
+
into "build/gen/test/kotlin"
|
34
|
+
filter { line -> line.contains("@Ignore") ? "" : line }
|
35
|
+
}
|
36
|
+
|
37
|
+
test.dependsOn(copyTestsFilteringIgnores)
|
22
38
|
}
|
23
39
|
}
|
@@ -1,44 +1,53 @@
|
|
1
1
|
|
2
2
|
import org.assertj.core.api.Assertions.assertThat
|
3
3
|
import org.junit.Test
|
4
|
+
import org.junit.Ignore
|
4
5
|
|
5
6
|
class ChangeTest {
|
6
7
|
|
8
|
+
|
7
9
|
@Test
|
8
10
|
fun singleCoinChange() {
|
9
11
|
assertThat(Change(setOf(1, 5, 10, 25, 100)).issue(25)).containsExactly(25)
|
10
12
|
}
|
11
13
|
|
14
|
+
@Ignore
|
12
15
|
@Test
|
13
16
|
fun multipleCoinChange() {
|
14
17
|
assertThat(Change(setOf(1, 5, 10, 25, 100)).issue(15)).containsExactly(5, 10)
|
15
18
|
}
|
16
19
|
|
20
|
+
@Ignore
|
17
21
|
@Test
|
18
22
|
fun changeWithLilliputianCoins() {
|
19
23
|
assertThat(Change(setOf(1, 4, 15, 20, 50)).issue(23)).containsExactly(4, 4, 15)
|
20
24
|
}
|
21
25
|
|
26
|
+
@Ignore
|
22
27
|
@Test
|
23
28
|
fun changeWithLowerElboniaCoins() {
|
24
29
|
assertThat(Change(setOf(1, 5, 10, 21, 25)).issue(63)).containsExactly(21,21,21)
|
25
30
|
}
|
26
31
|
|
32
|
+
@Ignore
|
27
33
|
@Test
|
28
34
|
fun largeTargetValues() {
|
29
35
|
assertThat(Change(setOf(1, 2, 5, 10, 20, 50, 100)).issue(999)).containsExactly(2, 2, 5, 20, 20, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100)
|
30
36
|
}
|
31
37
|
|
38
|
+
@Ignore
|
32
39
|
@Test
|
33
40
|
fun noCoinsMake0Change() {
|
34
41
|
assertThat(Change(setOf(1, 5, 10, 21, 25)).issue(0)).isEmpty()
|
35
42
|
}
|
36
43
|
|
44
|
+
@Ignore
|
37
45
|
@Test(expected = IllegalArgumentException::class)
|
38
46
|
fun errorTestingForChangeSmallerThanTheSmallestCoin() {
|
39
47
|
Change(setOf(5, 10)).issue(3)
|
40
48
|
}
|
41
49
|
|
50
|
+
@Ignore
|
42
51
|
@Test(expected = IllegalArgumentException::class)
|
43
52
|
fun cannotFindNegativeChangeValues() {
|
44
53
|
Change(setOf(1, 2, 5)).issue(-5)
|
@@ -1,61 +1,73 @@
|
|
1
1
|
import org.junit.Test
|
2
|
+
import org.junit.Ignore
|
2
3
|
import kotlin.test.assertEquals
|
3
4
|
|
4
5
|
class SquaresTest {
|
5
6
|
|
7
|
+
|
6
8
|
@Test
|
7
9
|
fun squareOfSum5() {
|
8
10
|
assertEquals(225, Squares(5).squareOfSum())
|
9
11
|
}
|
10
12
|
|
13
|
+
@Ignore
|
11
14
|
@Test
|
12
15
|
fun squareOfSum10() {
|
13
16
|
assertEquals(3025, Squares(10).squareOfSum())
|
14
17
|
}
|
15
18
|
|
19
|
+
@Ignore
|
16
20
|
@Test
|
17
21
|
fun squareOfSum100() {
|
18
22
|
assertEquals(25502500, Squares(100).squareOfSum())
|
19
23
|
}
|
20
24
|
|
25
|
+
@Ignore
|
21
26
|
@Test
|
22
27
|
fun sumOfSquares5() {
|
23
28
|
assertEquals(55, Squares(5).sumOfSquares())
|
24
29
|
}
|
25
30
|
|
31
|
+
@Ignore
|
26
32
|
@Test
|
27
33
|
fun sumOfSquares10() {
|
28
34
|
assertEquals(385, Squares(10).sumOfSquares())
|
29
35
|
}
|
30
36
|
|
37
|
+
@Ignore
|
31
38
|
@Test
|
32
39
|
fun sumOfSquares100() {
|
33
40
|
assertEquals(338350, Squares(100).sumOfSquares())
|
34
41
|
}
|
35
42
|
|
43
|
+
@Ignore
|
36
44
|
@Test
|
37
45
|
fun differenceOfSquares0() {
|
38
46
|
assertEquals(0, Squares(0).difference())
|
39
47
|
}
|
40
48
|
|
49
|
+
@Ignore
|
41
50
|
@Test
|
42
51
|
fun differenceOfSquares5() {
|
43
52
|
assertEquals(170, Squares(5).difference())
|
44
53
|
}
|
45
54
|
|
55
|
+
@Ignore
|
46
56
|
@Test
|
47
57
|
fun differenceOfSquares10() {
|
48
58
|
assertEquals(2640, Squares(10).difference())
|
49
59
|
}
|
50
60
|
|
61
|
+
@Ignore
|
51
62
|
@Test
|
52
63
|
fun differenceOfSquares100() {
|
53
64
|
assertEquals(25164150, Squares(100).difference())
|
54
65
|
}
|
55
66
|
|
67
|
+
@Ignore
|
56
68
|
@Test
|
57
69
|
fun consistentDifference() {
|
58
70
|
assertEquals(Squares(0).difference(), Squares(0).difference())
|
59
71
|
}
|
60
72
|
|
61
|
-
}
|
73
|
+
}
|
@@ -1,8 +1,10 @@
|
|
1
1
|
import org.junit.Test
|
2
|
+
import org.junit.Ignore
|
2
3
|
import kotlin.test.assertEquals
|
3
4
|
|
4
5
|
class ETLTest {
|
5
6
|
|
7
|
+
|
6
8
|
@Test
|
7
9
|
fun transformOneValue() {
|
8
10
|
val old = mapOf(1 to listOf('a'))
|
@@ -11,6 +13,7 @@ class ETLTest {
|
|
11
13
|
assertEquals(expected, ETL.transform(old))
|
12
14
|
}
|
13
15
|
|
16
|
+
@Ignore
|
14
17
|
@Test
|
15
18
|
fun transformMoreValues() {
|
16
19
|
val old = mapOf(1 to listOf('A', 'E', 'I'))
|
@@ -19,6 +22,7 @@ class ETLTest {
|
|
19
22
|
assertEquals(expected, ETL.transform(old))
|
20
23
|
}
|
21
24
|
|
25
|
+
@Ignore
|
22
26
|
@Test
|
23
27
|
fun moreKeys() {
|
24
28
|
val old = mapOf(1 to listOf('A', 'E', 'I'), 2 to listOf('D', 'G'))
|
@@ -27,6 +31,7 @@ class ETLTest {
|
|
27
31
|
assertEquals(expected, ETL.transform(old))
|
28
32
|
}
|
29
33
|
|
34
|
+
@Ignore
|
30
35
|
@Test
|
31
36
|
fun fullDataset() {
|
32
37
|
val old = mapOf(
|
@@ -1,48 +1,56 @@
|
|
1
1
|
import org.junit.Test
|
2
|
+
import org.junit.Ignore
|
2
3
|
import kotlin.test.assertEquals
|
3
4
|
|
4
5
|
class FlattenerTest {
|
5
6
|
|
7
|
+
|
6
8
|
@Test
|
7
9
|
fun flattensANestedList() {
|
8
10
|
val nestedList = listOf<Any>(emptyList<Any>())
|
9
11
|
assertEquals(emptyList<Any>(), Flattener.flatten(nestedList))
|
10
12
|
}
|
11
13
|
|
14
|
+
@Ignore
|
12
15
|
@Test
|
13
16
|
fun flattens2LevelNestedList() {
|
14
17
|
val nestedList = listOf(1, listOf(2, 3, 4), 5)
|
15
18
|
assertEquals(listOf(1, 2, 3, 4, 5), Flattener.flatten(nestedList))
|
16
19
|
}
|
17
20
|
|
21
|
+
@Ignore
|
18
22
|
@Test
|
19
23
|
fun flattens3LevelNestedList() {
|
20
24
|
val nestedList = listOf(1, listOf(2, 3, 4), 5, listOf(6, listOf(7, 8)))
|
21
25
|
assertEquals(listOf(1, 2, 3, 4, 5, 6, 7, 8), Flattener.flatten(nestedList))
|
22
26
|
}
|
23
27
|
|
28
|
+
@Ignore
|
24
29
|
@Test
|
25
30
|
fun flattens5LevelNestedList() {
|
26
31
|
val nestedList = listOf(0, 2, listOf(listOf(2, 3), 8, 100, 4, listOf(listOf(listOf(50))), -2))
|
27
32
|
assertEquals(listOf(0, 2, 2, 3, 8, 100, 4, 50, -2), Flattener.flatten(nestedList))
|
28
33
|
}
|
29
34
|
|
35
|
+
@Ignore
|
30
36
|
@Test
|
31
37
|
fun flattens6LevelNestedList() {
|
32
38
|
val nestedList = listOf(1, listOf(2, listOf(listOf(3)), listOf(4, listOf(listOf(5))), 6, 7), 8)
|
33
39
|
assertEquals(listOf(1, 2, 3, 4, 5, 6, 7, 8), Flattener.flatten(nestedList))
|
34
40
|
}
|
35
41
|
|
42
|
+
@Ignore
|
36
43
|
@Test
|
37
44
|
fun flattens6LevelNestedListWithNulls() {
|
38
45
|
val nestedList = listOf(1, listOf(2, null, listOf(listOf(3), null), listOf(4, listOf(listOf(5))), 6, 7, listOf(listOf(null))), 8, null)
|
39
46
|
assertEquals(listOf(1, 2, 3, 4, 5, 6, 7, 8), Flattener.flatten(nestedList))
|
40
47
|
}
|
41
48
|
|
49
|
+
@Ignore
|
42
50
|
@Test
|
43
51
|
fun allNullNestedListReturnsEmptyList() {
|
44
52
|
val nestedList = listOf(null, listOf(null, listOf(null), listOf(listOf(listOf(null)))), null)
|
45
53
|
assertEquals(emptyList<Any>(), Flattener.flatten(nestedList))
|
46
54
|
}
|
55
|
+
}
|
47
56
|
|
48
|
-
}
|