trackler 2.1.0.2 → 2.1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/common/exercises/phone-number/canonical-data.json +28 -10
- data/common/exercises/phone-number/description.md +19 -13
- data/lib/trackler/version.rb +1 -1
- data/tracks/go/exercises/bob/.meta/gen.go +1 -3
- data/tracks/go/exercises/bob/bob.go +1 -1
- data/tracks/go/exercises/bob/bob_test.go +1 -1
- data/tracks/go/exercises/bob/cases_test.go +8 -12
- data/tracks/go/exercises/bob/example.go +1 -1
- data/tracks/go/exercises/largest-series-product/.meta/gen.go +1 -3
- data/tracks/go/exercises/largest-series-product/cases_test.go +3 -4
- data/tracks/go/exercises/largest-series-product/example.go +1 -1
- data/tracks/go/exercises/largest-series-product/largest_series_product_test.go +1 -1
- data/tracks/java/exercises/accumulate/src/test/java/AccumulateTest.java +4 -4
- data/tracks/java/exercises/acronym/src/test/java/AcronymTest.java +7 -7
- data/tracks/java/exercises/all-your-base/src/test/java/BaseConverterTest.java +19 -19
- data/tracks/java/exercises/allergies/src/test/java/AllergiesTest.java +18 -18
- data/tracks/java/exercises/anagram/src/test/java/AnagramTest.java +15 -15
- data/tracks/lisp/docs/INSTALLATION.md +7 -13
- data/tracks/python/exercises/bracket-push/bracket_push_test.py +4 -1
- data/tracks/python/exercises/isogram/isogram_test.py +5 -1
- data/tracks/ruby/README.md +14 -40
- data/tracks/ruby/exercises/binary/binary_test.rb +0 -1
- data/tracks/ruby/exercises/bracket-push/bracket_push_test.rb +1 -1
- data/tracks/ruby/exercises/grains/grains_test.rb +2 -0
- data/tracks/ruby/exercises/isogram/isogram_test.rb +0 -1
- data/tracks/ruby/exercises/largest-series-product/largest_series_product_test.rb +2 -1
- data/tracks/ruby/exercises/luhn/luhn_test.rb +2 -0
- data/tracks/ruby/exercises/pangram/pangram_test.rb +0 -1
- data/tracks/ruby/exercises/queen-attack/queen_attack_test.rb +1 -1
- data/tracks/ruby/exercises/rna-transcription/rna_transcription_test.rb +1 -1
- data/tracks/ruby/exercises/run-length-encoding/run_length_encoding_test.rb +0 -1
- data/tracks/ruby/exercises/say/say_test.rb +2 -0
- data/tracks/ruby/exercises/word-count/word_count_test.rb +1 -1
- data/tracks/ruby/exercises/wordy/wordy_test.rb +2 -0
- data/tracks/ruby/lib/acronym_cases.rb +1 -1
- data/tracks/ruby/lib/all_your_base_cases.rb +1 -1
- data/tracks/ruby/lib/alphametics_cases.rb +1 -1
- data/tracks/ruby/lib/anagram_cases.rb +1 -1
- data/tracks/ruby/lib/beer_song_cases.rb +1 -1
- data/tracks/ruby/lib/binary_cases.rb +1 -1
- data/tracks/ruby/lib/bowling_cases.rb +1 -1
- data/tracks/ruby/lib/bracket_push_cases.rb +1 -1
- data/tracks/ruby/lib/clock_cases.rb +1 -1
- data/tracks/ruby/lib/connect_cases.rb +1 -1
- data/tracks/ruby/lib/custom_set_cases.rb +1 -1
- data/tracks/ruby/lib/difference_of_squares_cases.rb +1 -1
- data/tracks/ruby/lib/dominoes_cases.rb +1 -1
- data/tracks/ruby/lib/generator/files/generator_cases.rb +29 -0
- data/tracks/ruby/lib/generator/files/track_files.rb +11 -27
- data/tracks/ruby/lib/generator/template_values.rb +8 -2
- data/tracks/ruby/{exercises/anagram/example.tt → lib/generator/test_template.erb} +2 -2
- data/tracks/ruby/lib/gigasecond_cases.rb +1 -0
- data/tracks/ruby/lib/grains_cases.rb +1 -1
- data/tracks/ruby/lib/hamming_cases.rb +2 -0
- data/tracks/ruby/lib/hello_world_cases.rb +1 -1
- data/tracks/ruby/lib/isogram_cases.rb +1 -1
- data/tracks/ruby/lib/largest_series_product_cases.rb +1 -1
- data/tracks/ruby/lib/leap_cases.rb +1 -1
- data/tracks/ruby/lib/luhn_cases.rb +2 -0
- data/tracks/ruby/lib/nth_prime_cases.rb +1 -1
- data/tracks/ruby/lib/ocr_numbers_cases.rb +2 -0
- data/tracks/ruby/lib/pangram_cases.rb +1 -1
- data/tracks/ruby/lib/pig_latin_cases.rb +2 -0
- data/tracks/ruby/lib/queen_attack_cases.rb +1 -1
- data/tracks/ruby/lib/raindrops_cases.rb +1 -1
- data/tracks/ruby/lib/rna_transcription_cases.rb +1 -1
- data/tracks/ruby/lib/roman_numerals_cases.rb +1 -1
- data/tracks/ruby/lib/run_length_encoding_cases.rb +8 -6
- data/tracks/ruby/lib/say_cases.rb +1 -1
- data/tracks/ruby/lib/sieve_cases.rb +10 -3
- data/tracks/ruby/lib/tournament_cases.rb +1 -1
- data/tracks/ruby/lib/transpose_cases.rb +1 -1
- data/tracks/ruby/lib/triangle_cases.rb +1 -1
- data/tracks/ruby/lib/two_bucket_cases.rb +1 -1
- data/tracks/ruby/lib/word_count_cases.rb +12 -1
- data/tracks/ruby/lib/wordy_cases.rb +1 -1
- data/tracks/ruby/test/fixtures/xruby/lib/beta_cases.rb +1 -1
- data/tracks/ruby/{exercises/acronym/example.tt → test/fixtures/xruby/lib/generator/test_template.erb} +0 -0
- data/tracks/ruby/test/generator/files/generate_cases_test.rb +33 -0
- data/tracks/ruby/test/generator/files/track_files_test.rb +14 -28
- data/tracks/ruby/test/generator/template_values_test.rb +22 -4
- data/tracks/rust/config.json +10 -0
- data/tracks/rust/exercises/run-length-encoding/Cargo.lock +4 -0
- data/tracks/rust/exercises/run-length-encoding/Cargo.toml +6 -0
- data/tracks/rust/exercises/run-length-encoding/example.rs +45 -0
- data/tracks/rust/exercises/run-length-encoding/tests/run-length-encoding.rs +86 -0
- metadata +11 -29
- data/tracks/ruby/exercises/binary/example.tt +0 -22
- data/tracks/ruby/exercises/bracket-push/example.tt +0 -21
- data/tracks/ruby/exercises/clock/example.tt +0 -21
- data/tracks/ruby/exercises/custom-set/example.tt +0 -21
- data/tracks/ruby/exercises/grains/example.tt +0 -19
- data/tracks/ruby/exercises/hamming/example.tt +0 -21
- data/tracks/ruby/exercises/isogram/example.tt +0 -22
- data/tracks/ruby/exercises/largest-series-product/example.tt +0 -20
- data/tracks/ruby/exercises/luhn/example.tt +0 -18
- data/tracks/ruby/exercises/nth-prime/example.tt +0 -21
- data/tracks/ruby/exercises/ocr-numbers/example.tt +0 -21
- data/tracks/ruby/exercises/pangram/example.tt +0 -22
- data/tracks/ruby/exercises/pig-latin/example.tt +0 -21
- data/tracks/ruby/exercises/queen-attack/example.tt +0 -21
- data/tracks/ruby/exercises/raindrops/example.tt +0 -21
- data/tracks/ruby/exercises/rna-transcription/example.tt +0 -21
- data/tracks/ruby/exercises/roman-numerals/example.tt +0 -21
- data/tracks/ruby/exercises/run-length-encoding/example.tt +0 -24
- data/tracks/ruby/exercises/say/example.tt +0 -19
- data/tracks/ruby/exercises/sieve/example.tt +0 -22
- data/tracks/ruby/exercises/triangle/example.tt +0 -21
- data/tracks/ruby/exercises/two-bucket/example.tt +0 -21
- data/tracks/ruby/exercises/word-count/example.tt +0 -23
- data/tracks/ruby/exercises/wordy/example.tt +0 -19
- data/tracks/ruby/lib/exercise_cases.rb +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fb16c70320bfab64f3c4ce4ebbbb49672f9d74e
|
4
|
+
data.tar.gz: 71e5765ed2b9ef40d7ca43c24237aad49d0b0680
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14f69d678943dcb0f9ee681022f033a4c2d2d1b24bb6030e9fed9cca560eaf380d82d0c4d21b11aa2273b46d51d3ca3becb3be616cc87c4a2e641733042c616b
|
7
|
+
data.tar.gz: 635b4af5725bbef3017df9d3b75c24f6cd2e397e686e6bedd6c08e422bf5f7bd6892d0a1ff899288ba6cec9e93f23d0557a8d1cf334922ac608d77f49812e521
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"exercise": "phone-number",
|
3
|
-
"version": "1.0
|
3
|
+
"version": "1.1.0",
|
4
4
|
"cases": [
|
5
5
|
{
|
6
6
|
"description": "Cleanup user-entered phone numbers",
|
@@ -13,20 +13,20 @@
|
|
13
13
|
{
|
14
14
|
"description": "cleans the number",
|
15
15
|
"property": "clean",
|
16
|
-
"phrase": "(
|
17
|
-
"expected": "
|
16
|
+
"phrase": "(223) 456-7890",
|
17
|
+
"expected": "2234567890"
|
18
18
|
},
|
19
19
|
{
|
20
20
|
"description": "cleans numbers with dots",
|
21
21
|
"property": "clean",
|
22
|
-
"phrase": "
|
23
|
-
"expected": "
|
22
|
+
"phrase": "223.456.7890",
|
23
|
+
"expected": "2234567890"
|
24
24
|
},
|
25
25
|
{
|
26
26
|
"description": "cleans numbers with multiple spaces",
|
27
27
|
"property": "clean",
|
28
|
-
"phrase": "
|
29
|
-
"expected": "
|
28
|
+
"phrase": "223 456 7890 ",
|
29
|
+
"expected": "2234567890"
|
30
30
|
},
|
31
31
|
{
|
32
32
|
"description": "invalid when 9 digits",
|
@@ -37,14 +37,20 @@
|
|
37
37
|
{
|
38
38
|
"description": "invalid when 11 digits does not start with a 1",
|
39
39
|
"property": "clean",
|
40
|
-
"phrase": "
|
40
|
+
"phrase": "22234567890",
|
41
41
|
"expected": null
|
42
42
|
},
|
43
43
|
{
|
44
44
|
"description": "valid when 11 digits and starting with 1",
|
45
45
|
"property": "clean",
|
46
|
-
"phrase": "
|
47
|
-
"expected": "
|
46
|
+
"phrase": "12234567890",
|
47
|
+
"expected": "2234567890"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"description": "valid when 11 digits and starting with 1 even with punctuation",
|
51
|
+
"property": "clean",
|
52
|
+
"phrase": "+1 (223) 456-7890",
|
53
|
+
"expected": "2234567890"
|
48
54
|
},
|
49
55
|
{
|
50
56
|
"description": "invalid when more than 11 digits",
|
@@ -69,6 +75,18 @@
|
|
69
75
|
"property": "clean",
|
70
76
|
"phrase": "1a2b3c4d5e6f7g8h9i0j",
|
71
77
|
"expected": null
|
78
|
+
},
|
79
|
+
{
|
80
|
+
"description": "invalid if area code does not start with 2-9",
|
81
|
+
"property": "clean",
|
82
|
+
"phrase": "(123) 456-7890",
|
83
|
+
"expected": null
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"description": "invalid if exchange code does not start with 2-9",
|
87
|
+
"property": "clean",
|
88
|
+
"phrase": "(223) 056-7890",
|
89
|
+
"expected": null
|
72
90
|
}
|
73
91
|
]
|
74
92
|
}
|
@@ -1,16 +1,22 @@
|
|
1
|
-
The
|
1
|
+
The **North American Numbering Plan (NANP)** is a telephone numbering system used by many countries in North America like the United States, Canada or Bermuda. All NANP-countries share the same international country code `1`.
|
2
2
|
|
3
|
-
-
|
4
|
-
number
|
5
|
-
- If the phone number is 10 digits assume that it is good
|
6
|
-
- If the phone number is 11 digits and the first number is 1, trim the 1
|
7
|
-
and use the last 10 digits
|
8
|
-
- If the phone number is 11 digits and the first number is not 1, then
|
9
|
-
it is a bad number
|
10
|
-
- If the phone number is more than 11 digits assume that it is a bad
|
11
|
-
number
|
3
|
+
NANP numbers are ten-digit numbers consisting of a three-digit Numbering Plan Area code, commonly known as *area code*, followed by a seven-digit local number. The first three digits of the local number represent the *exchange code*, followed by the unique four-digit number which is the *subscriber number*.
|
12
4
|
|
13
|
-
We've provided tests, now make them pass.
|
14
5
|
|
15
|
-
|
16
|
-
|
6
|
+
The format is usually represented as
|
7
|
+
```
|
8
|
+
(NXX)-NXX-XXXX
|
9
|
+
```
|
10
|
+
where N is any digit from 2 through 9 and X is any digit from 0 through 9.
|
11
|
+
|
12
|
+
Your task is to clean up differently formated telephone numbers by removing punctuation and the country code (1) if present.
|
13
|
+
|
14
|
+
**Example:**
|
15
|
+
+1 (613)-995-0253
|
16
|
+
613-995-0253
|
17
|
+
1 613 995 0253
|
18
|
+
613.995.0253
|
19
|
+
- - - - - - - - - - - - -
|
20
|
+
6139950253
|
21
|
+
|
22
|
+
**Note:** As this exercise only deals with telephone numbers used in NANP-countries only 1 is considered a valid country code.
|
data/lib/trackler/version.rb
CHANGED
@@ -32,9 +32,7 @@ type js struct {
|
|
32
32
|
// template applied to above data structure generates the Go test cases
|
33
33
|
var tmpl = `package bob
|
34
34
|
|
35
|
-
|
36
|
-
{{if .Commit}}// Commit: {{.Commit}}
|
37
|
-
{{end}}
|
35
|
+
{{.Header}}
|
38
36
|
|
39
37
|
var testCases = []struct {
|
40
38
|
description string
|
@@ -1,7 +1,8 @@
|
|
1
1
|
package bob
|
2
2
|
|
3
3
|
// Source: exercism/x-common
|
4
|
-
// Commit:
|
4
|
+
// Commit: 65756b1 bob: Fix canonical-data.json formatting
|
5
|
+
// x-common version: 1.0.0
|
5
6
|
|
6
7
|
var testCases = []struct {
|
7
8
|
description string
|
@@ -73,16 +74,6 @@ var testCases = []struct {
|
|
73
74
|
"ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!",
|
74
75
|
"Whoa, chill out!",
|
75
76
|
},
|
76
|
-
{
|
77
|
-
"shouting with umlauts",
|
78
|
-
"ÜMLÄÜTS!",
|
79
|
-
"Whoa, chill out!",
|
80
|
-
},
|
81
|
-
{
|
82
|
-
"calmly speaking with umlauts",
|
83
|
-
"ÜMLäÜTS!",
|
84
|
-
"Whatever.",
|
85
|
-
},
|
86
77
|
{
|
87
78
|
"shouting with no exclamation mark",
|
88
79
|
"I HATE YOU",
|
@@ -135,7 +126,12 @@ var testCases = []struct {
|
|
135
126
|
},
|
136
127
|
{
|
137
128
|
"other whitespace",
|
138
|
-
"\n\r \t
|
129
|
+
"\n\r \t",
|
139
130
|
"Fine. Be that way!",
|
140
131
|
},
|
132
|
+
{
|
133
|
+
"non-question ending with whitespace",
|
134
|
+
"This is a statement ending with whitespace ",
|
135
|
+
"Whatever.",
|
136
|
+
},
|
141
137
|
}
|
@@ -33,9 +33,7 @@ type js struct {
|
|
33
33
|
// template applied to above data structure generates the Go test cases
|
34
34
|
var tmpl = `package lsproduct
|
35
35
|
|
36
|
-
|
37
|
-
{{if .Commit}}// Commit: {{.Commit}}
|
38
|
-
{{end}}
|
36
|
+
{{.Header}}
|
39
37
|
|
40
38
|
var tests = []struct {
|
41
39
|
digits string
|
@@ -1,7 +1,8 @@
|
|
1
1
|
package lsproduct
|
2
2
|
|
3
3
|
// Source: exercism/x-common
|
4
|
-
// Commit:
|
4
|
+
// Commit: e79b832 largest-series-product: Fix canonical-data.json formatting
|
5
|
+
// x-common version: 1.0.0
|
5
6
|
|
6
7
|
var tests = []struct {
|
7
8
|
digits string
|
@@ -9,15 +10,13 @@ var tests = []struct {
|
|
9
10
|
product int64
|
10
11
|
ok bool
|
11
12
|
}{
|
13
|
+
{"29", 2, 18, true},
|
12
14
|
{"0123456789", 2, 72, true},
|
13
15
|
{"576802143", 2, 48, true},
|
14
|
-
{"29", 2, 18, true},
|
15
16
|
{"0123456789", 3, 504, true},
|
16
17
|
{"1027839564", 3, 270, true},
|
17
18
|
{"0123456789", 5, 15120, true},
|
18
19
|
{"73167176531330624919225119674426574742355349194934", 6, 23520, true},
|
19
|
-
{"52677741234314237566414902593461595376319419139427", 6, 28350, true},
|
20
|
-
{"7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450", 13, 23514624000, true},
|
21
20
|
{"0000", 2, 0, true},
|
22
21
|
{"99099", 3, 0, true},
|
23
22
|
{"123", 4, -1, false},
|
@@ -17,7 +17,7 @@ public class AccumulateTest {
|
|
17
17
|
assertEquals(expectedOutput, Accumulate.accumulate(input, x -> x * x));
|
18
18
|
}
|
19
19
|
|
20
|
-
@Ignore
|
20
|
+
@Ignore("Remove to run test")
|
21
21
|
@Test
|
22
22
|
public void accumulateSquares() {
|
23
23
|
List<Integer> input = Arrays.asList(1, 2, 3);
|
@@ -25,7 +25,7 @@ public class AccumulateTest {
|
|
25
25
|
assertEquals(expectedOutput, Accumulate.accumulate(input, x -> x * x));
|
26
26
|
}
|
27
27
|
|
28
|
-
@Ignore
|
28
|
+
@Ignore("Remove to run test")
|
29
29
|
@Test
|
30
30
|
public void accumulateUpperCases() {
|
31
31
|
List<String> input = Arrays.asList("hello", "world");
|
@@ -33,7 +33,7 @@ public class AccumulateTest {
|
|
33
33
|
assertEquals(expectedOutput, Accumulate.accumulate(input, x -> x.toUpperCase()));
|
34
34
|
}
|
35
35
|
|
36
|
-
@Ignore
|
36
|
+
@Ignore("Remove to run test")
|
37
37
|
@Test
|
38
38
|
public void accumulateReversedStrings() {
|
39
39
|
List<String> input = Arrays.asList("the quick brown fox etc".split(" "));
|
@@ -45,7 +45,7 @@ public class AccumulateTest {
|
|
45
45
|
return new StringBuilder(input).reverse().toString();
|
46
46
|
}
|
47
47
|
|
48
|
-
@Ignore
|
48
|
+
@Ignore("Remove to run test")
|
49
49
|
@Test
|
50
50
|
public void accumulateWithinAccumulate() {
|
51
51
|
List<String> input1 = Arrays.asList("a", "b", "c");
|
@@ -12,7 +12,7 @@ public class AcronymTest {
|
|
12
12
|
assertEquals(expected, new Acronym(phrase).get());
|
13
13
|
}
|
14
14
|
|
15
|
-
@Ignore
|
15
|
+
@Ignore("Remove to run test")
|
16
16
|
@Test
|
17
17
|
public void fromOtherTitleCasedPhrases() {
|
18
18
|
final String phrase = "Ruby on Rails";
|
@@ -20,7 +20,7 @@ public class AcronymTest {
|
|
20
20
|
assertEquals(expected, new Acronym(phrase).get());
|
21
21
|
}
|
22
22
|
|
23
|
-
@Ignore
|
23
|
+
@Ignore("Remove to run test")
|
24
24
|
@Test
|
25
25
|
public void fromInconsistentlyCasedPhrases() {
|
26
26
|
final String phrase = "HyperText Markup Language";
|
@@ -28,7 +28,7 @@ public class AcronymTest {
|
|
28
28
|
assertEquals(expected, new Acronym(phrase).get());
|
29
29
|
}
|
30
30
|
|
31
|
-
@Ignore
|
31
|
+
@Ignore("Remove to run test")
|
32
32
|
@Test
|
33
33
|
public void fromPhrasesWithPunctuation() {
|
34
34
|
final String phrase = "First In, First Out";
|
@@ -36,7 +36,7 @@ public class AcronymTest {
|
|
36
36
|
assertEquals(expected, new Acronym(phrase).get());
|
37
37
|
}
|
38
38
|
|
39
|
-
@Ignore
|
39
|
+
@Ignore("Remove to run test")
|
40
40
|
@Test
|
41
41
|
public void fromOtherPhrasesWithPunctuation() {
|
42
42
|
final String phrase = "PHP: Hypertext Preprocessor";
|
@@ -44,7 +44,7 @@ public class AcronymTest {
|
|
44
44
|
assertEquals(expected, new Acronym(phrase).get());
|
45
45
|
}
|
46
46
|
|
47
|
-
@Ignore
|
47
|
+
@Ignore("Remove to run test")
|
48
48
|
@Test
|
49
49
|
public void fromPhrasesWithNonAcronymAllCapsWord() {
|
50
50
|
final String phrase = "GNU Image Manipulation Program";
|
@@ -52,7 +52,7 @@ public class AcronymTest {
|
|
52
52
|
assertEquals(expected, new Acronym(phrase).get());
|
53
53
|
}
|
54
54
|
|
55
|
-
@Ignore
|
55
|
+
@Ignore("Remove to run test")
|
56
56
|
@Test
|
57
57
|
public void fromPhrasesWithPunctuationAndSentenceCasing() {
|
58
58
|
final String phrase = "Complementary metal-oxide semiconductor";
|
@@ -60,7 +60,7 @@ public class AcronymTest {
|
|
60
60
|
assertEquals(expected, new Acronym(phrase).get());
|
61
61
|
}
|
62
62
|
|
63
|
-
@Ignore
|
63
|
+
@Ignore("Remove to run test")
|
64
64
|
@Test
|
65
65
|
public void fromPhraseWithSingleLetterWord() {
|
66
66
|
final String phrase = "Cat in a Hat";
|
@@ -32,7 +32,7 @@ public final class BaseConverterTest {
|
|
32
32
|
actualDigits);
|
33
33
|
}
|
34
34
|
|
35
|
-
@Ignore
|
35
|
+
@Ignore("Remove to run test")
|
36
36
|
@Test
|
37
37
|
public void testBinaryToSingleDecimal() {
|
38
38
|
final BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1});
|
@@ -49,7 +49,7 @@ public final class BaseConverterTest {
|
|
49
49
|
actualDigits);
|
50
50
|
}
|
51
51
|
|
52
|
-
@Ignore
|
52
|
+
@Ignore("Remove to run test")
|
53
53
|
@Test
|
54
54
|
public void testSingleDecimalToBinary() {
|
55
55
|
final BaseConverter baseConverter = new BaseConverter(10, new int[]{5});
|
@@ -66,7 +66,7 @@ public final class BaseConverterTest {
|
|
66
66
|
actualDigits);
|
67
67
|
}
|
68
68
|
|
69
|
-
@Ignore
|
69
|
+
@Ignore("Remove to run test")
|
70
70
|
@Test
|
71
71
|
public void testBinaryToMultipleDecimal() {
|
72
72
|
final BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1, 0, 1, 0});
|
@@ -83,7 +83,7 @@ public final class BaseConverterTest {
|
|
83
83
|
actualDigits);
|
84
84
|
}
|
85
85
|
|
86
|
-
@Ignore
|
86
|
+
@Ignore("Remove to run test")
|
87
87
|
@Test
|
88
88
|
public void testDecimalToBinary() {
|
89
89
|
final BaseConverter baseConverter = new BaseConverter(10, new int[]{4, 2});
|
@@ -100,7 +100,7 @@ public final class BaseConverterTest {
|
|
100
100
|
actualDigits);
|
101
101
|
}
|
102
102
|
|
103
|
-
@Ignore
|
103
|
+
@Ignore("Remove to run test")
|
104
104
|
@Test
|
105
105
|
public void testTrinaryToHexadecimal() {
|
106
106
|
final BaseConverter baseConverter = new BaseConverter(3, new int[]{1, 1, 2, 0});
|
@@ -117,7 +117,7 @@ public final class BaseConverterTest {
|
|
117
117
|
actualDigits);
|
118
118
|
}
|
119
119
|
|
120
|
-
@Ignore
|
120
|
+
@Ignore("Remove to run test")
|
121
121
|
@Test
|
122
122
|
public void testHexadecimalToTrinary() {
|
123
123
|
final BaseConverter baseConverter = new BaseConverter(16, new int[]{2, 10});
|
@@ -134,7 +134,7 @@ public final class BaseConverterTest {
|
|
134
134
|
actualDigits);
|
135
135
|
}
|
136
136
|
|
137
|
-
@Ignore
|
137
|
+
@Ignore("Remove to run test")
|
138
138
|
@Test
|
139
139
|
public void test15BitInteger() {
|
140
140
|
final BaseConverter baseConverter = new BaseConverter(97, new int[]{3, 46, 60});
|
@@ -151,7 +151,7 @@ public final class BaseConverterTest {
|
|
151
151
|
actualDigits);
|
152
152
|
}
|
153
153
|
|
154
|
-
@Ignore
|
154
|
+
@Ignore("Remove to run test")
|
155
155
|
@Test
|
156
156
|
public void testEmptyDigits() {
|
157
157
|
expectedException.expect(IllegalArgumentException.class);
|
@@ -160,7 +160,7 @@ public final class BaseConverterTest {
|
|
160
160
|
new BaseConverter(2, new int[]{});
|
161
161
|
}
|
162
162
|
|
163
|
-
@Ignore
|
163
|
+
@Ignore("Remove to run test")
|
164
164
|
@Test
|
165
165
|
public void testSingleZero() {
|
166
166
|
final BaseConverter baseConverter = new BaseConverter(10, new int[]{0});
|
@@ -177,7 +177,7 @@ public final class BaseConverterTest {
|
|
177
177
|
actualDigits);
|
178
178
|
}
|
179
179
|
|
180
|
-
@Ignore
|
180
|
+
@Ignore("Remove to run test")
|
181
181
|
@Test
|
182
182
|
public void testMultipleZeros() {
|
183
183
|
expectedException.expect(IllegalArgumentException.class);
|
@@ -186,7 +186,7 @@ public final class BaseConverterTest {
|
|
186
186
|
new BaseConverter(10, new int[]{0, 0, 0});
|
187
187
|
}
|
188
188
|
|
189
|
-
@Ignore
|
189
|
+
@Ignore("Remove to run test")
|
190
190
|
@Test
|
191
191
|
public void testLeadingZeros() {
|
192
192
|
expectedException.expect(IllegalArgumentException.class);
|
@@ -195,7 +195,7 @@ public final class BaseConverterTest {
|
|
195
195
|
new BaseConverter(7, new int[]{0, 6, 0});
|
196
196
|
}
|
197
197
|
|
198
|
-
@Ignore
|
198
|
+
@Ignore("Remove to run test")
|
199
199
|
@Test
|
200
200
|
public void testNegativeDigit() {
|
201
201
|
expectedException.expect(IllegalArgumentException.class);
|
@@ -204,7 +204,7 @@ public final class BaseConverterTest {
|
|
204
204
|
new BaseConverter(2, new int[]{1, -1, 1, 0, 1, 0});
|
205
205
|
}
|
206
206
|
|
207
|
-
@Ignore
|
207
|
+
@Ignore("Remove to run test")
|
208
208
|
@Test
|
209
209
|
public void testInvalidPositiveDigit() {
|
210
210
|
expectedException.expect(IllegalArgumentException.class);
|
@@ -213,7 +213,7 @@ public final class BaseConverterTest {
|
|
213
213
|
new BaseConverter(2, new int[]{1, 2, 1, 0, 1, 0});
|
214
214
|
}
|
215
215
|
|
216
|
-
@Ignore
|
216
|
+
@Ignore("Remove to run test")
|
217
217
|
@Test
|
218
218
|
public void testFirstBaseIsOne() {
|
219
219
|
expectedException.expect(IllegalArgumentException.class);
|
@@ -222,7 +222,7 @@ public final class BaseConverterTest {
|
|
222
222
|
new BaseConverter(1, new int[]{});
|
223
223
|
}
|
224
224
|
|
225
|
-
@Ignore
|
225
|
+
@Ignore("Remove to run test")
|
226
226
|
@Test
|
227
227
|
public void testSecondBaseIsOne() {
|
228
228
|
final BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1, 0, 1, 0});
|
@@ -233,7 +233,7 @@ public final class BaseConverterTest {
|
|
233
233
|
baseConverter.convertToBase(1);
|
234
234
|
}
|
235
235
|
|
236
|
-
@Ignore
|
236
|
+
@Ignore("Remove to run test")
|
237
237
|
@Test
|
238
238
|
public void testFirstBaseIsZero() {
|
239
239
|
expectedException.expect(IllegalArgumentException.class);
|
@@ -242,7 +242,7 @@ public final class BaseConverterTest {
|
|
242
242
|
new BaseConverter(0, new int[]{});
|
243
243
|
}
|
244
244
|
|
245
|
-
@Ignore
|
245
|
+
@Ignore("Remove to run test")
|
246
246
|
@Test
|
247
247
|
public void testSecondBaseIsZero() {
|
248
248
|
final BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1, 0, 1, 0});
|
@@ -253,7 +253,7 @@ public final class BaseConverterTest {
|
|
253
253
|
baseConverter.convertToBase(0);
|
254
254
|
}
|
255
255
|
|
256
|
-
@Ignore
|
256
|
+
@Ignore("Remove to run test")
|
257
257
|
@Test
|
258
258
|
public void testFirstBaseIsNegative() {
|
259
259
|
expectedException.expect(IllegalArgumentException.class);
|
@@ -262,7 +262,7 @@ public final class BaseConverterTest {
|
|
262
262
|
new BaseConverter(-2, new int[]{});
|
263
263
|
}
|
264
264
|
|
265
|
-
@Ignore
|
265
|
+
@Ignore("Remove to run test")
|
266
266
|
@Test
|
267
267
|
public void testSecondBaseIsNegative() {
|
268
268
|
final BaseConverter baseConverter = new BaseConverter(2, new int[]{1});
|