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,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 LuhnTest {
|
5
6
|
|
7
|
+
|
6
8
|
@Test
|
7
9
|
fun checkDigitIsRightMostDigit() {
|
8
10
|
val expectedOutput = 7
|
@@ -10,6 +12,7 @@ class LuhnTest {
|
|
10
12
|
assertEquals(expectedOutput, Luhn(34567).checkDigit)
|
11
13
|
}
|
12
14
|
|
15
|
+
@Ignore
|
13
16
|
@Test
|
14
17
|
fun addendsDoublesEveryOtherNumberFromRight() {
|
15
18
|
val expectedOutput = listOf(1, 4, 1, 4, 1)
|
@@ -17,6 +20,7 @@ class LuhnTest {
|
|
17
20
|
assertEquals(expectedOutput, Luhn(12121).addends)
|
18
21
|
}
|
19
22
|
|
23
|
+
@Ignore
|
20
24
|
@Test
|
21
25
|
fun addendsSubtracts9WhenDoubledNumberIsMoreThan9() {
|
22
26
|
val expectedOutput = listOf(7, 6, 6, 1)
|
@@ -24,6 +28,7 @@ class LuhnTest {
|
|
24
28
|
assertEquals(expectedOutput, Luhn(8631).addends)
|
25
29
|
}
|
26
30
|
|
31
|
+
@Ignore
|
27
32
|
@Test
|
28
33
|
fun checkSumAddsAddendsTogether1() {
|
29
34
|
val expectedOutput = 22
|
@@ -31,6 +36,7 @@ class LuhnTest {
|
|
31
36
|
assertEquals(expectedOutput, Luhn(4913).checksum)
|
32
37
|
}
|
33
38
|
|
39
|
+
@Ignore
|
34
40
|
@Test
|
35
41
|
fun checkSumAddsAddendsTogether2() {
|
36
42
|
val expectedOutput = 21
|
@@ -38,6 +44,7 @@ class LuhnTest {
|
|
38
44
|
assertEquals(expectedOutput, Luhn(201773).checksum)
|
39
45
|
}
|
40
46
|
|
47
|
+
@Ignore
|
41
48
|
@Test
|
42
49
|
fun numberIsValidWhenChecksumMod10IsZero1() {
|
43
50
|
val expectedOutput = false
|
@@ -45,6 +52,7 @@ class LuhnTest {
|
|
45
52
|
assertEquals(expectedOutput, Luhn(738).isValid)
|
46
53
|
}
|
47
54
|
|
55
|
+
@Ignore
|
48
56
|
@Test
|
49
57
|
fun numberIsValidWhenChecksumMod10IsZero2() {
|
50
58
|
val expectedOutput = true
|
@@ -52,6 +60,7 @@ class LuhnTest {
|
|
52
60
|
assertEquals(expectedOutput, Luhn(8739567).isValid)
|
53
61
|
}
|
54
62
|
|
63
|
+
@Ignore
|
55
64
|
@Test
|
56
65
|
fun luhnCanCreateSimpleNumbersWithValidCheckDigit() {
|
57
66
|
val expectedOutput = 1230L
|
@@ -59,6 +68,7 @@ class LuhnTest {
|
|
59
68
|
assertEquals(expectedOutput, Luhn(123).create)
|
60
69
|
}
|
61
70
|
|
71
|
+
@Ignore
|
62
72
|
@Test
|
63
73
|
fun luhnCanCreateLargeNumbersWithValidCheckDigit() {
|
64
74
|
val expectedOutput = 8739567L
|
@@ -66,6 +76,7 @@ class LuhnTest {
|
|
66
76
|
assertEquals(expectedOutput, Luhn(873956).create)
|
67
77
|
}
|
68
78
|
|
79
|
+
@Ignore
|
69
80
|
@Test
|
70
81
|
fun luhnCanCreateHugeNumbersWithValidCheckDigit() {
|
71
82
|
val expectedOutput = 8372637564L
|
@@ -1,29 +1,35 @@
|
|
1
1
|
import org.junit.Test
|
2
|
+
import org.junit.Ignore
|
2
3
|
import kotlin.test.assertEquals
|
3
4
|
import kotlin.test.fail
|
4
5
|
|
5
6
|
class PrimeTest {
|
6
7
|
|
8
|
+
|
7
9
|
@Test
|
8
10
|
fun firstPrime() {
|
9
11
|
assertEquals(2, Prime.nth(1))
|
10
12
|
}
|
11
13
|
|
14
|
+
@Ignore
|
12
15
|
@Test
|
13
16
|
fun secondPrime() {
|
14
17
|
assertEquals(3, Prime.nth(2))
|
15
18
|
}
|
16
19
|
|
20
|
+
@Ignore
|
17
21
|
@Test
|
18
22
|
fun sixthPrime() {
|
19
23
|
assertEquals(13, Prime.nth(6))
|
20
24
|
}
|
21
25
|
|
26
|
+
@Ignore
|
22
27
|
@Test
|
23
28
|
fun bigPrime() {
|
24
29
|
assertEquals(104743, Prime.nth(10001))
|
25
30
|
}
|
26
31
|
|
32
|
+
@Ignore
|
27
33
|
@Test(expected = IllegalArgumentException::class)
|
28
34
|
fun undefinedPrime() {
|
29
35
|
Prime.nth(0)
|
@@ -1,8 +1,10 @@
|
|
1
|
-
import org.junit.Test
|
1
|
+
import org.junit.Test
|
2
|
+
import org.junit.Ignore;
|
2
3
|
import kotlin.test.assertEquals
|
3
4
|
|
4
5
|
class NucleotideTest {
|
5
6
|
|
7
|
+
|
6
8
|
@Test
|
7
9
|
fun emptyDnaStringHasNoAdenosine() {
|
8
10
|
val dna = DNA("");
|
@@ -10,6 +12,7 @@ class NucleotideTest {
|
|
10
12
|
assertEquals(0, dna.count('A'))
|
11
13
|
}
|
12
14
|
|
15
|
+
@Ignore
|
13
16
|
@Test
|
14
17
|
fun emptyDnaStringHasNoNucleotides() {
|
15
18
|
val dna = DNA("");
|
@@ -18,12 +21,14 @@ class NucleotideTest {
|
|
18
21
|
assertEquals(expected, dna.nucleotideCounts)
|
19
22
|
}
|
20
23
|
|
24
|
+
@Ignore
|
21
25
|
@Test
|
22
26
|
fun repetitiveCytidineGetsCounted() {
|
23
27
|
val dna = DNA("CCCCC");
|
24
28
|
assertEquals(5, dna.count('C'))
|
25
29
|
}
|
26
30
|
|
31
|
+
@Ignore
|
27
32
|
@Test
|
28
33
|
fun repetitiveSequenceWithOnlyGuanosine() {
|
29
34
|
val dna = DNA("GGGGGGGG");
|
@@ -32,6 +37,7 @@ class NucleotideTest {
|
|
32
37
|
assertEquals(expected, dna.nucleotideCounts)
|
33
38
|
}
|
34
39
|
|
40
|
+
@Ignore
|
35
41
|
@Test
|
36
42
|
fun countsOnlyThymidine() {
|
37
43
|
val dna = DNA("GGGGGTAACCCGG");
|
@@ -39,6 +45,7 @@ class NucleotideTest {
|
|
39
45
|
assertEquals(1, dna.count('T'))
|
40
46
|
}
|
41
47
|
|
48
|
+
@Ignore
|
42
49
|
@Test
|
43
50
|
fun countsANucleotideOnlyOnce() {
|
44
51
|
val dna = DNA("CGATTGGG");
|
@@ -47,6 +54,7 @@ class NucleotideTest {
|
|
47
54
|
assertEquals(2, dna.count('T'))
|
48
55
|
}
|
49
56
|
|
57
|
+
@Ignore
|
50
58
|
@Test
|
51
59
|
fun dnaCountsDoNotChangeAfterCountingAdenosine() {
|
52
60
|
val dna = DNA("GATTACA");
|
@@ -56,16 +64,19 @@ class NucleotideTest {
|
|
56
64
|
assertEquals(expected, dna.nucleotideCounts)
|
57
65
|
}
|
58
66
|
|
67
|
+
@Ignore
|
59
68
|
@Test(expected = IllegalArgumentException::class)
|
60
69
|
fun validatesNucleotides() {
|
61
70
|
DNA("GX")
|
62
71
|
}
|
63
72
|
|
73
|
+
@Ignore
|
64
74
|
@Test(expected = IllegalArgumentException::class)
|
65
75
|
fun validatesNucleotidesCountInput() {
|
66
76
|
DNA("GACT").count('X');
|
67
77
|
}
|
68
78
|
|
79
|
+
@Ignore
|
69
80
|
@Test
|
70
81
|
fun countsAllNucleotides() {
|
71
82
|
val dna = DNA("AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC")
|
@@ -1,54 +1,65 @@
|
|
1
1
|
import org.junit.Test
|
2
|
+
import org.junit.Ignore
|
2
3
|
import kotlin.test.assertFalse
|
3
4
|
import kotlin.test.assertTrue
|
4
5
|
|
5
6
|
class PangramTest {
|
6
7
|
|
8
|
+
|
7
9
|
@Test
|
8
10
|
fun emptySentence() {
|
9
11
|
assertFalse(Pangrams.isPangram(""))
|
10
12
|
}
|
11
13
|
|
14
|
+
@Ignore
|
12
15
|
@Test
|
13
16
|
fun lowercasePangram() {
|
14
17
|
assertTrue(Pangrams.isPangram("the quick brown fox jumps over the lazy dog"))
|
15
18
|
}
|
16
19
|
|
20
|
+
@Ignore
|
17
21
|
@Test
|
18
22
|
fun missingCharacterX() {
|
19
23
|
assertFalse(Pangrams.isPangram("a quick movement of the enemy will jeopardize five gunboats"))
|
20
24
|
}
|
21
25
|
|
26
|
+
@Ignore
|
22
27
|
@Test
|
23
28
|
fun anotherMissingCharacterX() {
|
24
29
|
assertFalse(Pangrams.isPangram("the quick brown fish jumps over the lazy dog"))
|
25
30
|
}
|
26
31
|
|
32
|
+
@Ignore
|
27
33
|
@Test
|
28
34
|
fun withUnderscores() {
|
29
35
|
assertTrue(Pangrams.isPangram("the_quick_brown_fox_jumps_over_the_lazy_dog"))
|
30
36
|
}
|
31
37
|
|
38
|
+
@Ignore
|
32
39
|
@Test
|
33
40
|
fun withNumbers() {
|
34
41
|
assertTrue(Pangrams.isPangram("the 1 quick brown fox jumps over the 2 lazy dogs"))
|
35
42
|
}
|
36
43
|
|
44
|
+
@Ignore
|
37
45
|
@Test
|
38
46
|
fun missingLettersReplacedByNumbers() {
|
39
47
|
assertFalse(Pangrams.isPangram("7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog"))
|
40
48
|
}
|
41
49
|
|
50
|
+
@Ignore
|
42
51
|
@Test
|
43
52
|
fun mixedCaseAndPunctuation() {
|
44
53
|
assertTrue(Pangrams.isPangram("\"Five quacking Zephyrs jolt my wax bed.\""))
|
45
54
|
}
|
46
55
|
|
56
|
+
@Ignore
|
47
57
|
@Test
|
48
58
|
fun mixedCaseDuplicatedCharacters() {
|
49
59
|
assertFalse(Pangrams.isPangram("the quick brown fox jumps over the lazy FOX"))
|
50
60
|
}
|
51
61
|
|
62
|
+
@Ignore
|
52
63
|
@Test
|
53
64
|
fun nonAsciiCharacters() {
|
54
65
|
assertTrue(Pangrams.isPangram("Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich."))
|
@@ -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 PascalsTriangleTest {
|
5
6
|
|
7
|
+
|
6
8
|
@Test
|
7
9
|
fun triangleWithFourRows() {
|
8
10
|
val expectedOutput = listOf(
|
@@ -15,6 +17,7 @@ class PascalsTriangleTest {
|
|
15
17
|
assertEquals(expectedOutput, PascalsTriangle.computeTriangle(4))
|
16
18
|
}
|
17
19
|
|
20
|
+
@Ignore
|
18
21
|
@Test
|
19
22
|
fun triangleWithSixRows() {
|
20
23
|
val expectedOutput = listOf(
|
@@ -29,6 +32,7 @@ class PascalsTriangleTest {
|
|
29
32
|
assertEquals(expectedOutput, PascalsTriangle.computeTriangle(6))
|
30
33
|
}
|
31
34
|
|
35
|
+
@Ignore
|
32
36
|
@Test
|
33
37
|
fun expectEmptyTriangle() {
|
34
38
|
val expectedOutput = emptyList<List<Int>>()
|
@@ -36,6 +40,7 @@ class PascalsTriangleTest {
|
|
36
40
|
assertEquals(expectedOutput, PascalsTriangle.computeTriangle(0))
|
37
41
|
}
|
38
42
|
|
43
|
+
@Ignore
|
39
44
|
@Test(expected = IllegalArgumentException::class)
|
40
45
|
fun validatesNotNegativeRows() {
|
41
46
|
PascalsTriangle.computeTriangle(-1)
|
@@ -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 PhoneNumberTest {
|
5
6
|
|
7
|
+
|
6
8
|
@Test
|
7
9
|
fun cleansNumber() {
|
8
10
|
val expectedNumber = "1234567890"
|
@@ -11,6 +13,7 @@ class PhoneNumberTest {
|
|
11
13
|
assertEquals(expectedNumber, actualNumber)
|
12
14
|
}
|
13
15
|
|
16
|
+
@Ignore
|
14
17
|
@Test
|
15
18
|
fun cleansNumberWithDots() {
|
16
19
|
val expectedNumber = "1234567890"
|
@@ -19,6 +22,7 @@ class PhoneNumberTest {
|
|
19
22
|
assertEquals(expectedNumber, actualNumber)
|
20
23
|
}
|
21
24
|
|
25
|
+
@Ignore
|
22
26
|
@Test
|
23
27
|
fun validWhen11DigitsAndFirstIs1() {
|
24
28
|
val expectedNumber = "1234567890"
|
@@ -27,6 +31,7 @@ class PhoneNumberTest {
|
|
27
31
|
assertEquals(expectedNumber, actualNumber)
|
28
32
|
}
|
29
33
|
|
34
|
+
@Ignore
|
30
35
|
@Test
|
31
36
|
fun invalidWhenOnly11Digits() {
|
32
37
|
val expectedNumber = "0000000000"
|
@@ -35,6 +40,7 @@ class PhoneNumberTest {
|
|
35
40
|
assertEquals(expectedNumber, actualNumber)
|
36
41
|
}
|
37
42
|
|
43
|
+
@Ignore
|
38
44
|
@Test
|
39
45
|
fun invalidWhen9Digits() {
|
40
46
|
val expectedNumber = "0000000000"
|
@@ -43,6 +49,7 @@ class PhoneNumberTest {
|
|
43
49
|
assertEquals(expectedNumber, actualNumber)
|
44
50
|
}
|
45
51
|
|
52
|
+
@Ignore
|
46
53
|
@Test
|
47
54
|
fun areaCode() {
|
48
55
|
val expectedAreaCode = "123"
|
@@ -51,6 +58,7 @@ class PhoneNumberTest {
|
|
51
58
|
assertEquals(expectedAreaCode, actualAreaCode)
|
52
59
|
}
|
53
60
|
|
61
|
+
@Ignore
|
54
62
|
@Test
|
55
63
|
fun toStringPrint() {
|
56
64
|
val expectedtoStringNumber = "(123) 456-7890"
|
@@ -59,6 +67,7 @@ class PhoneNumberTest {
|
|
59
67
|
assertEquals(expectedtoStringNumber, actualtoStringNumber)
|
60
68
|
}
|
61
69
|
|
70
|
+
@Ignore
|
62
71
|
@Test
|
63
72
|
fun toStringPrintWithFullUSPhoneNumber() {
|
64
73
|
val expectedtoStringNumber = "(123) 456-7890"
|
@@ -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
|
@@ -52,6 +53,7 @@ class PigLatinTest(val input: String, val expectedOutput: String) {
|
|
52
53
|
)
|
53
54
|
}
|
54
55
|
|
56
|
+
|
55
57
|
@Test
|
56
58
|
fun test() {
|
57
59
|
assertEquals(expectedOutput, PigLatin.translate(input))
|