trackler 2.0.6.40 → 2.0.6.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/common/exercises/book-store/canonical-data.json +7 -1
- data/common/exercises/rotational-cipher/{cannonical-data.json → canonical-data.json} +0 -0
- data/lib/trackler/version.rb +1 -1
- data/tracks/c/config.json +9 -0
- data/tracks/c/exercises/triangle/makefile +16 -0
- data/tracks/c/exercises/triangle/src/example.c +33 -0
- data/tracks/c/exercises/triangle/src/example.h +15 -0
- data/tracks/c/exercises/triangle/src/triangle.h +10 -0
- data/tracks/c/exercises/triangle/test/test_triangle.c +121 -0
- data/tracks/c/exercises/triangle/test/vendor/unity.c +1300 -0
- data/tracks/c/exercises/triangle/test/vendor/unity.h +274 -0
- data/tracks/c/exercises/triangle/test/vendor/unity_internals.h +701 -0
- data/tracks/clojure/.gitignore +1 -0
- data/tracks/clojure/_src/clock_generator.clj +5 -0
- data/tracks/clojure/_src/generator.clj +72 -0
- data/tracks/clojure/config.json +6 -0
- data/tracks/clojure/exercises/clock/clock.mustache +34 -0
- data/tracks/clojure/exercises/clock/project.clj +4 -0
- data/tracks/clojure/exercises/clock/src/example.clj +19 -0
- data/tracks/clojure/exercises/clock/test/clock_test.clj +177 -0
- data/tracks/clojure/project.clj +4 -1
- data/tracks/csharp/exercises/poker/Example.cs +1 -1
- data/tracks/csharp/exercises/poker/PokerTest.cs +10 -0
- data/tracks/erlang/docs/INSTALLATION.md +14 -3
- data/tracks/erlang/docs/LEARNING.md +1 -0
- data/tracks/go/exercises/gigasecond/gigasecond_test.go +5 -2
- data/tracks/go/exercises/grade-school/example.go +2 -0
- data/tracks/go/exercises/grade-school/grade_school_test.go +8 -0
- data/tracks/go/exercises/hamming/hamming_test.go +1 -1
- data/tracks/go/exercises/hello-world/hello_test.go +6 -4
- data/tracks/haskell/exercises/accumulate/src/Accumulate.hs +1 -1
- data/tracks/haskell/exercises/anagram/src/Anagram.hs +1 -1
- data/tracks/java/bin/journey-test.sh +21 -4
- data/tracks/java/exercises/allergies/src/example/java/Allergen.java +20 -0
- data/tracks/java/exercises/hamming/src/test/java/HammingTest.java +10 -3
- data/tracks/java/exercises/luhn/src/example/java/LuhnValidator.java +19 -11
- data/tracks/java/exercises/luhn/src/test/java/LuhnValidatorTest.java +43 -1
- data/tracks/java/exercises/meetup/src/example/java/MeetupSchedule.java +8 -0
- data/tracks/java/exercises/meetup/src/test/java/MeetupTest.java +91 -91
- data/tracks/java/exercises/perfect-numbers/src/example/java/Classification.java +5 -0
- data/tracks/java/exercises/robot-simulator/src/example/java/GridPosition.java +29 -0
- data/tracks/java/exercises/robot-simulator/src/example/java/Orientation.java +5 -0
- data/tracks/java/exercises/secret-handshake/src/example/java/Signal.java +5 -0
- data/tracks/java/exercises/sublist/src/example/java/Relationship.java +5 -0
- data/tracks/java/exercises/triangle/src/example/java/TriangleException.java +5 -0
- data/tracks/java/exercises/triangle/src/example/java/TriangleKind.java +5 -0
- data/tracks/julia/config.json +10 -1
- data/tracks/julia/exercises/atbash-cipher/runtests.jl +36 -36
- data/tracks/julia/exercises/pangram/example.jl +2 -0
- data/tracks/julia/exercises/pangram/pangram.jl +4 -0
- data/tracks/julia/exercises/pangram/runtests.jl +40 -0
- data/tracks/perl5/exercises/bob/Example.pm +1 -1
- data/tracks/perl5/exercises/bob/bob.t +27 -31
- data/tracks/php/exercises/accumulate/accumulate_test.php +1 -1
- data/tracks/php/exercises/acronym/acronym_test.php +1 -1
- data/tracks/php/exercises/allergies/allergies_test.php +1 -1
- data/tracks/php/exercises/anagram/anagram_test.php +1 -1
- data/tracks/php/exercises/atbash-cipher/atbash-cipher_test.php +1 -1
- data/tracks/php/exercises/beer-song/beer-song_test.php +1 -1
- data/tracks/php/exercises/binary/binary_test.php +2 -2
- data/tracks/php/exercises/bob/bob_test.php +1 -1
- data/tracks/php/exercises/book-store/book-store_test.php +1 -1
- data/tracks/php/exercises/bowling/bowling_test.php +1 -1
- data/tracks/php/exercises/bracket-push/bracket-push_test.php +1 -1
- data/tracks/php/exercises/change/change_test.php +3 -3
- data/tracks/php/exercises/clock/clock_test.php +1 -1
- data/tracks/php/exercises/connect/connect_test.php +1 -1
- data/tracks/php/exercises/difference-of-squares/difference-of-squares_test.php +1 -1
- data/tracks/php/exercises/etl/etl_test.php +1 -1
- data/tracks/php/exercises/gigasecond/gigasecond_test.php +1 -1
- data/tracks/php/exercises/grains/grains_test.php +1 -1
- data/tracks/php/exercises/hamming/hamming_test.php +2 -2
- data/tracks/php/exercises/hello-world/hello-world_test.php +1 -1
- data/tracks/php/exercises/isogram/isogram_test.php +1 -1
- data/tracks/php/exercises/largest-series-product/largest-series-product_test.php +1 -1
- data/tracks/php/exercises/leap/leap_test.php +1 -1
- data/tracks/php/exercises/markdown/markdown_test.php +1 -1
- data/tracks/php/exercises/minesweeper/minesweeper_test.php +7 -7
- data/tracks/php/exercises/nucleotide-count/nucleotide-count_test.php +1 -1
- data/tracks/php/exercises/ocr-numbers/ocr-numbers_test.php +1 -1
- data/tracks/php/exercises/pangram/pangram_test.php +1 -1
- data/tracks/php/exercises/phone-number/phone-number_test.php +1 -1
- data/tracks/php/exercises/pig-latin/pig-latin_test.php +1 -1
- data/tracks/php/exercises/raindrops/raindrops_test.php +1 -1
- data/tracks/php/exercises/rna-transcription/rna-transcription_test.php +1 -1
- data/tracks/php/exercises/robot-name/robot-name_test.php +1 -1
- data/tracks/php/exercises/robot-simulator/robot-simulator_test.php +1 -1
- data/tracks/php/exercises/roman-numerals/roman-numerals_test.php +1 -1
- data/tracks/php/exercises/sieve/sieve_test.php +1 -1
- data/tracks/php/exercises/space-age/space-age_test.php +1 -1
- data/tracks/php/exercises/triangle/triangle_test.php +1 -1
- data/tracks/php/exercises/trinary/trinary_test.php +1 -1
- data/tracks/php/exercises/variable-length-quantity/variable-length-quantity_test.php +3 -3
- data/tracks/php/exercises/word-count/word-count_test.php +1 -1
- data/tracks/php/exercises/wordy/wordy_test.php +3 -3
- data/tracks/python/config.json +3 -13
- data/tracks/python/exercises/rectangles/rectangles_count_test.py +15 -22
- data/tracks/scala/config.json +684 -665
- data/tracks/scala/exercises/binary-search/build.sbt +3 -0
- data/tracks/scala/exercises/binary-search/example.scala +23 -0
- data/tracks/scala/exercises/binary-search/src/main/scala/BinarySearch.scala +0 -0
- data/tracks/scala/exercises/binary-search/src/test/scala/BinarySearchTest.scala +63 -0
- data/tracks/scala/exercises/strain/build.sbt +3 -0
- data/tracks/scala/exercises/strain/example.scala +22 -0
- data/tracks/scala/exercises/strain/src/main/scala/Strain.scala +0 -0
- data/tracks/scala/exercises/strain/src/test/scala/StrainTest.scala +78 -0
- data/tracks/scala/testgen/src/main/scala/AllYourBaseTestGenerator.scala +13 -20
- data/tracks/scala/testgen/src/main/scala/BinarySearchTestGenerator.scala +48 -0
- data/tracks/scala/testgen/src/main/scala/BowlingTestGenerator.scala +24 -32
- data/tracks/scala/testgen/src/main/scala/CustomSetTestGenerator.scala +148 -112
- data/tracks/scala/testgen/src/main/scala/TestBuilder.scala +86 -0
- metadata +30 -3
- data/tracks/java/exercises/allergies/src/example/java/Allergen.java +0 -1
- data/tracks/java/exercises/meetup/src/example/java/MeetupSchedule.java +0 -1
- data/tracks/java/exercises/perfect-numbers/src/example/java/Classification.java +0 -1
- data/tracks/java/exercises/robot-simulator/src/example/java/GridPosition.java +0 -1
- data/tracks/java/exercises/robot-simulator/src/example/java/Orientation.java +0 -1
- data/tracks/java/exercises/secret-handshake/src/example/java/Signal.java +0 -1
- data/tracks/java/exercises/sublist/src/example/java/Relationship.java +0 -1
- data/tracks/java/exercises/triangle/src/example/java/TriangleException.java +0 -1
- data/tracks/java/exercises/triangle/src/example/java/TriangleKind.java +0 -1
@@ -0,0 +1,29 @@
|
|
1
|
+
final class GridPosition {
|
2
|
+
|
3
|
+
final int x;
|
4
|
+
|
5
|
+
final int y;
|
6
|
+
|
7
|
+
GridPosition(final int x, final int y) {
|
8
|
+
this.x = x;
|
9
|
+
this.y = y;
|
10
|
+
}
|
11
|
+
|
12
|
+
/*
|
13
|
+
* This equals method is of deliberately narrow scope (only allows comparison with another GridPosition) to increase
|
14
|
+
* readability. In general, one should provide a full implementation of Object.equals(Object obj) and a
|
15
|
+
* corresponding implementation of Object.hashCode(). See
|
16
|
+
*
|
17
|
+
* https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#equals(java.lang.Object)
|
18
|
+
*
|
19
|
+
* and
|
20
|
+
*
|
21
|
+
* https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#hashCode()
|
22
|
+
*
|
23
|
+
* for more information.
|
24
|
+
*/
|
25
|
+
boolean equals(final GridPosition gridPosition) {
|
26
|
+
return this.x == gridPosition.x && this.y == gridPosition.y;
|
27
|
+
}
|
28
|
+
|
29
|
+
}
|
data/tracks/julia/config.json
CHANGED
@@ -69,7 +69,7 @@
|
|
69
69
|
"topics": [
|
70
70
|
"control-flow (conditionals)",
|
71
71
|
"integers",
|
72
|
-
|
72
|
+
"mathematics"
|
73
73
|
]
|
74
74
|
},
|
75
75
|
{
|
@@ -139,6 +139,15 @@
|
|
139
139
|
"filtering"
|
140
140
|
]
|
141
141
|
},
|
142
|
+
{
|
143
|
+
"slug": "pangram",
|
144
|
+
"difficulty": 1,
|
145
|
+
"topics": [
|
146
|
+
"arrays",
|
147
|
+
"strings",
|
148
|
+
"filtering"
|
149
|
+
]
|
150
|
+
},
|
142
151
|
{
|
143
152
|
"slug": "bob",
|
144
153
|
"difficulty": 2,
|
@@ -3,54 +3,54 @@ using Base.Test
|
|
3
3
|
include("atbash-cipher.jl")
|
4
4
|
|
5
5
|
@testset "encoding from English to atbash" begin
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
@testset "encode yes" begin
|
7
|
+
@test encode("yes") == "bvh"
|
8
|
+
end
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
@testset "encode no" begin
|
11
|
+
@test encode("no") == "ml"
|
12
|
+
end
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
@testset "encode OMG" begin
|
15
|
+
@test encode("OMG") == "lnt"
|
16
|
+
end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
@testset "encode spaces" begin
|
19
|
+
@test encode("O M G") == "lnt"
|
20
|
+
end
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
@testset "encode mindblowingly" begin
|
23
|
+
@test encode("mindblowingly") == "nrmwy oldrm tob"
|
24
|
+
end
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
@testset "encode numbers" begin
|
27
|
+
@test encode("Testing,1 2 3, testing.") == "gvhgr mt123 gvhgr mt"
|
28
|
+
end
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
@testset "encode deep thought" begin
|
31
|
+
@test encode("Truth is fiction.") == "gifgs rhurx grlm"
|
32
|
+
end
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
@testset "encode all the letters" begin
|
35
|
+
@test encode("The quick brown fox jumps over the lazy dog.") == "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt"
|
36
|
+
end
|
37
37
|
end
|
38
38
|
|
39
39
|
@testset "decoding from atbash to English" begin
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
@testset "decode exercism" begin
|
41
|
+
@test decode("vcvix rhn") == "exercism"
|
42
|
+
end
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
@testset "decode a sentence" begin
|
45
|
+
@test decode("zmlyh gzxov rhlug vmzhg vkkrm thglm v") == "anobstacleisoftenasteppingstone"
|
46
|
+
end
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
@testset "decode numbers" begin
|
49
|
+
@test decode("gvhgr mt123 gvhgr mt") == "testing123testing"
|
50
|
+
end
|
51
51
|
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
@testset "decode all the letters" begin
|
53
|
+
@test decode("gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt") == "thequickbrownfoxjumpsoverthelazydog"
|
54
|
+
end
|
55
55
|
end
|
56
56
|
|
@@ -0,0 +1,40 @@
|
|
1
|
+
using Base.Test
|
2
|
+
|
3
|
+
include("pangram.jl")
|
4
|
+
|
5
|
+
@testset "empty sentence" begin
|
6
|
+
@test !ispangram("")
|
7
|
+
end
|
8
|
+
|
9
|
+
@testset "pangram with only lower case" begin
|
10
|
+
@test ispangram("the quick brown fox jumps over the lazy dog")
|
11
|
+
end
|
12
|
+
|
13
|
+
@testset "missing character 'x'" begin
|
14
|
+
@test !ispangram("a quick movement of the enemy will jeopardize five gunboats")
|
15
|
+
end
|
16
|
+
|
17
|
+
@testset "another missing character 'x'" begin
|
18
|
+
@test !ispangram("the quick brown fish jumps over the lazy dog")
|
19
|
+
end
|
20
|
+
|
21
|
+
@testset "pangram with underscores" begin
|
22
|
+
@test ispangram("the_quick_brown_fox_jumps_over_the_lazy_dog")
|
23
|
+
end
|
24
|
+
|
25
|
+
@testset "pangram with numbers" begin
|
26
|
+
@test ispangram("the 1 quick brown fox jumps over the 2 lazy dogs")
|
27
|
+
end
|
28
|
+
|
29
|
+
@testset "missing letters replaced by numbers" begin
|
30
|
+
@test !ispangram("7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog")
|
31
|
+
end
|
32
|
+
|
33
|
+
@testset "pangram with mixed case and punctuation" begin
|
34
|
+
@test ispangram("\"Five quacking Zephyrs jolt my wax bed.\"")
|
35
|
+
end
|
36
|
+
|
37
|
+
@testset "upper and lower case versions of the same character should not be counted separately" begin
|
38
|
+
@test !ispangram("the quick brown fox jumped over the lazy FOX")
|
39
|
+
end
|
40
|
+
|
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env perl
|
2
2
|
use strict;
|
3
3
|
use warnings;
|
4
|
-
use open ':std', ':encoding(utf8)';
|
5
|
-
use utf8;
|
6
4
|
use FindBin;
|
7
5
|
my $dir;
|
8
6
|
BEGIN { $dir = $FindBin::Bin . '/' };
|
@@ -10,7 +8,7 @@ use lib $dir;
|
|
10
8
|
|
11
9
|
my $module = $ENV{EXERCISM} ? 'Example' : 'Bob';
|
12
10
|
|
13
|
-
use Test::More;
|
11
|
+
use Test::More tests => 28;
|
14
12
|
|
15
13
|
my @cases = map {
|
16
14
|
{
|
@@ -19,31 +17,32 @@ my @cases = map {
|
|
19
17
|
desc => $_->[2],
|
20
18
|
}
|
21
19
|
} (
|
22
|
-
# input
|
23
|
-
['Tom-ay-to, tom-aaaah-to.',
|
24
|
-
['WATCH OUT!',
|
25
|
-
['
|
26
|
-
['
|
27
|
-
[
|
28
|
-
[
|
29
|
-
['
|
30
|
-
['
|
31
|
-
['
|
32
|
-
['
|
33
|
-
['
|
34
|
-
[
|
35
|
-
[
|
36
|
-
['
|
37
|
-
['
|
38
|
-
['
|
39
|
-
[
|
40
|
-
[
|
41
|
-
['
|
42
|
-
['
|
43
|
-
["
|
44
|
-
['',
|
45
|
-
['
|
46
|
-
["
|
20
|
+
# input expected output title
|
21
|
+
['Tom-ay-to, tom-aaaah-to.', 'Whatever.', 'stating something'],
|
22
|
+
['WATCH OUT!', 'Whoa, chill out!', 'shouting'],
|
23
|
+
['FCECDFCAAB', 'Whoa, chill out!', 'shouting gibberish'],
|
24
|
+
['Does this cryogenic chamber make me look fat?', 'Sure.', 'asking a question'],
|
25
|
+
['You are, what, like 15?', 'Sure.', 'asking a numeric question'],
|
26
|
+
['fffbbcbeab?', 'Sure.', 'asking gibberish'],
|
27
|
+
["Let's go make out behind the gym!", 'Whatever.', 'talking forcefully'],
|
28
|
+
["It's OK if you don't want to go to the DMV.", 'Whatever.', 'using acronyms in regular speech'],
|
29
|
+
['WHAT THE HELL WERE YOU THINKING?', 'Whoa, chill out!', 'forceful question'],
|
30
|
+
['1, 2, 3 GO!', 'Whoa, chill out!', 'shouting numbers'],
|
31
|
+
['1, 2, 3', 'Whatever.', 'only numbers'],
|
32
|
+
['4?', 'Sure.', 'question with only numbers'],
|
33
|
+
['ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!', 'Whoa, chill out!', 'shouting with special characters'],
|
34
|
+
['I HATE YOU', 'Whoa, chill out!', 'shouting with no exclamation mark'],
|
35
|
+
['Ending with ? means a question.', 'Whatever.', 'statement containing question mark'],
|
36
|
+
[':) ?', 'Sure.', 'non-letters with question'],
|
37
|
+
["Wait! Hang on. Are you going to be OK?", 'Sure.', 'prattling on'],
|
38
|
+
['', 'Fine. Be that way!', 'silence'],
|
39
|
+
[' ', 'Fine. Be that way!', 'prolonged silence'],
|
40
|
+
["\t\t\t\t\t\t\t\t\t\t", 'Fine. Be that way!', 'alternate silence'],
|
41
|
+
["\nDoes this cryogenic chamber make me look fat?\nno", 'Whatever.', 'multiple line question'],
|
42
|
+
[' hmmmmmmm...', 'Whatever.', 'starting with whitespace'],
|
43
|
+
['Okay if like my spacebar quite a bit? ', 'Sure.', 'ending with whitespace'],
|
44
|
+
["\n\r \t", 'Fine. Be that way!', 'other whitespace'],
|
45
|
+
['This is a statement ending with whitespace ', 'Whatever.', 'non-question ending with whitespace'],
|
47
46
|
);
|
48
47
|
|
49
48
|
ok -e "${dir}${module}.pm", "missing $module.pm"
|
@@ -58,9 +57,6 @@ can_ok($module, 'hey')
|
|
58
57
|
my $sub = $module->can('hey');
|
59
58
|
|
60
59
|
foreach my $c (@cases) {
|
61
|
-
#diag uc $c->{input};
|
62
60
|
my $title = $c->{desc} ? "$c->{desc}: $c->{input}" : $c->{input};
|
63
61
|
is $sub->( $c->{input} ), $c->{expect}, $title;
|
64
62
|
}
|
65
|
-
|
66
|
-
done_testing();
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require_once 'binary.php';
|
4
4
|
|
5
|
-
class BinaryTest extends \
|
5
|
+
class BinaryTest extends PHPUnit\Framework\TestCase
|
6
6
|
{
|
7
7
|
public function testItParsesBinary0ToDecimal0()
|
8
8
|
{
|
@@ -60,7 +60,7 @@ class BinaryTest extends \PHPUnit_Framework_TestCase
|
|
60
60
|
{
|
61
61
|
$this->markTestSkipped();
|
62
62
|
|
63
|
-
$this->
|
63
|
+
$this->expectException(InvalidArgumentException::class);
|
64
64
|
|
65
65
|
parse_binary($value);
|
66
66
|
}
|
@@ -6,7 +6,7 @@ require "bowling.php";
|
|
6
6
|
* Translated from original source:
|
7
7
|
* http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata
|
8
8
|
*/
|
9
|
-
class GameTest extends \
|
9
|
+
class GameTest extends PHPUnit\Framework\TestCase
|
10
10
|
{
|
11
11
|
/** @var Game */
|
12
12
|
private $game;
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require "change.php";
|
4
4
|
|
5
|
-
class ChangeTest extends
|
5
|
+
class ChangeTest extends PHPUnit\Framework\TestCase
|
6
6
|
{
|
7
7
|
public function testSingleCoinChange()
|
8
8
|
{
|
@@ -39,7 +39,7 @@ class ChangeTest extends PHPUnit_Framework_TestCase
|
|
39
39
|
public function testForChangeSmallerThanAvailableCoins()
|
40
40
|
{
|
41
41
|
$this->markTestSkipped();
|
42
|
-
$this->
|
42
|
+
$this->expectException('InvalidArgumentException', 'No coins small enough to make change');
|
43
43
|
findFewestCoins(array(5, 10), 3);
|
44
44
|
}
|
45
45
|
|
@@ -52,7 +52,7 @@ class ChangeTest extends PHPUnit_Framework_TestCase
|
|
52
52
|
public function testChangeValueLessThanZero()
|
53
53
|
{
|
54
54
|
$this->markTestSkipped();
|
55
|
-
$this->
|
55
|
+
$this->expectException('InvalidArgumentException', 'Cannot make change for negative value');
|
56
56
|
findFewestCoins(array(1, 2, 5), -5);
|
57
57
|
}
|
58
58
|
}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require "hamming.php";
|
4
4
|
|
5
|
-
class HammingComparatorTest extends
|
5
|
+
class HammingComparatorTest extends PHPUnit\Framework\TestCase
|
6
6
|
{
|
7
7
|
|
8
8
|
public function testNoDifferenceBetweenIdenticalStrands()
|
@@ -49,7 +49,7 @@ class HammingComparatorTest extends PHPUnit_Framework_TestCase
|
|
49
49
|
public function testExceptionThrownWhenStrandsAreDifferentLength()
|
50
50
|
{
|
51
51
|
$this->markTestSkipped();
|
52
|
-
$this->
|
52
|
+
$this->expectException('InvalidArgumentException', 'DNA strands must be of equal length.');
|
53
53
|
distance('GGACG', 'AGGACGTGG');
|
54
54
|
}
|
55
55
|
}
|