trackler 2.2.1.42 → 2.2.1.43
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/exercises/change/metadata.yml +2 -0
- data/problem-specifications/exercises/crypto-square/canonical-data.json +10 -65
- data/tracks/c/bin/run-tests +3 -0
- data/tracks/c/exercises/acronym/test/test_acronym.c +8 -0
- data/tracks/c/exercises/all-your-base/test/test_all_your_base.c +19 -0
- data/tracks/c/exercises/allergies/test/test_allergies.c +13 -0
- data/tracks/c/exercises/anagram/src/anagram.h +2 -2
- data/tracks/c/exercises/anagram/src/example.c +5 -5
- data/tracks/c/exercises/anagram/test/test_anagram.c +39 -29
- data/tracks/c/exercises/atbash-cipher/test/test_atbash_cipher.c +12 -0
- data/tracks/c/exercises/beer-song/test/test_beer_song.c +5 -0
- data/tracks/c/exercises/binary-search/test/test_binary_search.c +10 -0
- data/tracks/c/exercises/binary/test/test_binary.c +14 -0
- data/tracks/c/exercises/bob/test/test_bob.c +16 -0
- data/tracks/c/exercises/clock/test/test_clock.c +34 -0
- data/tracks/c/exercises/difference-of-squares/test/test_difference_of_squares.c +9 -0
- data/tracks/c/exercises/gigasecond/test/test_gigasecond.c +4 -0
- data/tracks/c/exercises/grains/test/test_grains.c +9 -0
- data/tracks/c/exercises/hamming/test/test_hamming.c +12 -0
- data/tracks/c/exercises/isogram/src/example.c +6 -6
- data/tracks/c/exercises/isogram/src/example.h +1 -1
- data/tracks/c/exercises/isogram/test/test_isogram.c +17 -9
- data/tracks/c/exercises/largest-series-product/test/test_largest_series_product.c +15 -0
- data/tracks/c/exercises/leap/test/test_leap.c +4 -0
- data/tracks/c/exercises/nth-prime/test/test_nth_prime.c +4 -0
- data/tracks/c/exercises/nucleotide-count/test/test_nucleotide_count.c +4 -0
- data/tracks/c/exercises/palindrome-products/test/test_palindrome_products.c +1 -0
- data/tracks/c/exercises/pangram/test/test_pangram.c +11 -0
- data/tracks/c/exercises/pascals-triangle/test/test_pascals_triangle.c +5 -0
- data/tracks/c/exercises/perfect-numbers/test/test_perfect_numbers.c +12 -0
- data/tracks/c/exercises/phone-number/test/test_phone_number.c +13 -0
- data/tracks/c/exercises/raindrops/test/test_raindrops.c +17 -0
- data/tracks/c/exercises/react/test/test_react.c +14 -0
- data/tracks/c/exercises/rna-transcription/test/test_rna_transcription.c +7 -0
- data/tracks/c/exercises/robot-simulator/test/test_robot_simulator.c +11 -0
- data/tracks/c/exercises/roman-numerals/test/test_roman_numerals.c +17 -0
- data/tracks/c/exercises/scrabble-score/test/test_scrabble_score.c +10 -0
- data/tracks/c/exercises/sieve/test/test_sieve.c +4 -0
- data/tracks/c/exercises/space-age/test/test_space_age.c +7 -0
- data/tracks/c/exercises/sum-of-multiples/test/test_sum_of_multiples.c +11 -0
- data/tracks/c/exercises/triangle/test/test_triangle.c +15 -0
- data/tracks/c/exercises/word-count/test/test_word_count.c +10 -0
- data/tracks/dart/.travis.yml +2 -7
- data/tracks/dart/bin/check_formatting +9 -0
- data/tracks/dart/exercises/bob/pubspec.lock +26 -26
- data/tracks/dart/exercises/difference-of-squares/pubspec.lock +26 -26
- data/tracks/dart/exercises/gigasecond/pubspec.lock +26 -26
- data/tracks/dart/exercises/hamming/pubspec.lock +26 -26
- data/tracks/dart/exercises/hello-world/pubspec.lock +26 -26
- data/tracks/dart/exercises/leap/pubspec.lock +26 -26
- data/tracks/dart/exercises/rna-transcription/pubspec.lock +26 -26
- data/tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart +1 -1
- data/tracks/dart/pubspec.lock +42 -30
- data/tracks/dart/pubspec.yaml +3 -3
- data/tracks/dart/test/exercises_test.dart +52 -14
- data/tracks/dart/tool/create-exercise +1 -1
- data/tracks/erlang/.travis.yml +2 -2
- data/tracks/erlang/config.json +10 -0
- data/tracks/erlang/exercises/bank-account/src/example.erl +67 -41
- data/tracks/erlang/exercises/bank-account/test/bank_account_tests.erl +0 -6
- data/tracks/erlang/exercises/luhn/src/example.erl +32 -14
- data/tracks/erlang/exercises/luhn/test/luhn_tests.erl +36 -10
- data/tracks/erlang/exercises/two-fer/README.md +19 -0
- data/tracks/erlang/exercises/two-fer/include/exercism.hrl +11 -0
- data/tracks/erlang/exercises/two-fer/rebar.config +30 -0
- data/tracks/erlang/exercises/two-fer/src/example.erl +11 -0
- data/tracks/erlang/exercises/two-fer/src/two_fer.app.src +9 -0
- data/tracks/erlang/exercises/two-fer/src/two_fer.erl +11 -0
- data/tracks/erlang/exercises/two-fer/test/two_fer_tests.erl +15 -0
- data/tracks/java/config.json +26 -3
- data/tracks/java/exercises/list-ops/.meta/hints.md +4 -0
- data/tracks/javascript/config.json +14 -0
- data/tracks/javascript/docs/ABOUT.md +16 -9
- data/tracks/javascript/exercises/diffie-hellman/README.md +73 -0
- data/tracks/javascript/exercises/diffie-hellman/diffie-hellman.spec.js +73 -0
- data/tracks/javascript/exercises/diffie-hellman/example.js +48 -0
- data/tracks/julia/config.json +1 -1
- data/tracks/python/exercises/accumulate/accumulate.py +1 -1
- data/tracks/python/exercises/allergies/allergies.py +2 -2
- data/tracks/python/exercises/alphametics/alphametics.py +1 -1
- data/tracks/python/exercises/anagram/anagram.py +1 -1
- data/tracks/python/exercises/binary-search/binary_search.py +1 -1
- data/tracks/python/exercises/binary/binary.py +1 -1
- data/tracks/python/exercises/collatz-conjecture/collatz_conjecture.py +1 -1
- data/tracks/python/exercises/crypto-square/crypto_square.py +1 -1
- data/tracks/python/exercises/diamond/diamond.py +1 -1
- data/tracks/python/exercises/grep/grep.py +2 -0
- data/tracks/python/exercises/hello-world/hello_world.py +1 -1
- data/tracks/python/exercises/largest-series-product/largest_series_product.py +1 -1
- data/tracks/python/exercises/minesweeper/minesweeper.py +2 -1
- data/tracks/python/exercises/nucleotide-count/nucleotide_count.py +2 -2
- data/tracks/python/exercises/ocr-numbers/ocr_numbers.py +2 -2
- data/tracks/python/exercises/octal/octal.py +1 -1
- data/tracks/python/exercises/pangram/pangram.py +1 -1
- data/tracks/python/exercises/pascals-triangle/pascals_triangle.py +3 -3
- data/tracks/python/exercises/poker/poker.py +1 -1
- data/tracks/python/exercises/prime-factors/prime_factors.py +1 -1
- data/tracks/python/exercises/protein-translation/protein_translation.py +2 -2
- data/tracks/python/exercises/proverb/proverb.py +1 -1
- data/tracks/python/exercises/queen-attack/queen_attack.py +2 -2
- data/tracks/python/exercises/rail-fence-cipher/rail_fence_cipher.py +3 -3
- data/tracks/python/exercises/roman-numerals/roman_numerals.py +1 -1
- data/tracks/python/exercises/rotational-cipher/rotational_cipher.py +1 -1
- data/tracks/python/exercises/say/say.py +1 -1
- data/tracks/python/exercises/secret-handshake/secret_handshake.py +2 -2
- data/tracks/python/exercises/space-age/space_age.py +1 -1
- data/tracks/python/exercises/tournament/tournament.py +1 -1
- data/tracks/python/exercises/trinary/trinary.py +1 -1
- data/tracks/python/exercises/two-fer/two_fer.py +1 -1
- data/tracks/python/exercises/word-count/word_count.py +1 -1
- data/tracks/ruby/lib/generator/exercise_case.rb +1 -1
- data/tracks/ruby/test/generator/exercise_case_test.rb +10 -0
- data/tracks/scala/testgen/src/main/resources/version-check-ignore.txt +1 -2
- data/tracks/sml/exercises/accumulate/README.md +19 -14
- data/tracks/sml/exercises/accumulate/accumulate.sml +1 -1
- data/tracks/sml/exercises/accumulate/example.sml +2 -2
- data/tracks/sml/exercises/accumulate/test.sml +26 -56
- data/tracks/sml/exercises/accumulate/testlib.sml +159 -0
- metadata +15 -2
@@ -13,6 +13,7 @@ void test_strand_count(const char *dna_strand, const char *expected)
|
|
13
13
|
|
14
14
|
void test_empty_strand(void)
|
15
15
|
{
|
16
|
+
TEST_IGNORE(); // delete this line to run test
|
16
17
|
const char *dna_strand = "";
|
17
18
|
const char *expected = "A:0 C:0 G:0 T:0";
|
18
19
|
|
@@ -21,6 +22,7 @@ void test_empty_strand(void)
|
|
21
22
|
|
22
23
|
void test_repeated_nucleotide(void)
|
23
24
|
{
|
25
|
+
TEST_IGNORE();
|
24
26
|
const char *dna_strand = "GGGGGGG";
|
25
27
|
const char *expected = "A:0 C:0 G:7 T:0";
|
26
28
|
|
@@ -29,6 +31,7 @@ void test_repeated_nucleotide(void)
|
|
29
31
|
|
30
32
|
void test_multiple_nucleotides(void)
|
31
33
|
{
|
34
|
+
TEST_IGNORE();
|
32
35
|
const char *dna_strand =
|
33
36
|
"AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC";
|
34
37
|
const char *expected = "A:20 C:12 G:17 T:21";
|
@@ -38,6 +41,7 @@ void test_multiple_nucleotides(void)
|
|
38
41
|
|
39
42
|
void test_invalid_nucleotide(void)
|
40
43
|
{
|
44
|
+
TEST_IGNORE();
|
41
45
|
const char *dna_strand = "AGXXACT";
|
42
46
|
const char *expected = "";
|
43
47
|
|
@@ -10,6 +10,7 @@ void test_palindromes_list(void)
|
|
10
10
|
|
11
11
|
void test_palindromes_list2(void)
|
12
12
|
{
|
13
|
+
TEST_IGNORE(); // delete this line to run test
|
13
14
|
Pair palind = getPalindromeProduct(10, 99);
|
14
15
|
TEST_ASSERT_EQUAL_INT(121, palind.small_palind);
|
15
16
|
TEST_ASSERT_EQUAL_INT(9009, palind.larg_palind);
|
@@ -8,6 +8,7 @@ void test_null(void)
|
|
8
8
|
|
9
9
|
void test_empty_sentence(void)
|
10
10
|
{
|
11
|
+
TEST_IGNORE(); // delete this line to run test
|
11
12
|
const char sentence[] = "";
|
12
13
|
|
13
14
|
TEST_ASSERT_FALSE(is_pangram(sentence));
|
@@ -15,6 +16,7 @@ void test_empty_sentence(void)
|
|
15
16
|
|
16
17
|
void test_lowercase_pangram(void)
|
17
18
|
{
|
19
|
+
TEST_IGNORE();
|
18
20
|
const char sentence[] = "the quick brown fox jumps over the lazy dog";
|
19
21
|
|
20
22
|
TEST_ASSERT_TRUE(is_pangram(sentence));
|
@@ -22,6 +24,7 @@ void test_lowercase_pangram(void)
|
|
22
24
|
|
23
25
|
void test_uppercase_pangram(void)
|
24
26
|
{
|
27
|
+
TEST_IGNORE();
|
25
28
|
const char sentence[] = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG";
|
26
29
|
|
27
30
|
TEST_ASSERT_TRUE(is_pangram(sentence));
|
@@ -29,6 +32,7 @@ void test_uppercase_pangram(void)
|
|
29
32
|
|
30
33
|
void test_missing_character_x(void)
|
31
34
|
{
|
35
|
+
TEST_IGNORE();
|
32
36
|
const char sentence[] =
|
33
37
|
"a quick movement of the enemy will jeopardize five gunboats";
|
34
38
|
|
@@ -37,6 +41,7 @@ void test_missing_character_x(void)
|
|
37
41
|
|
38
42
|
void test_another_missing_x(void)
|
39
43
|
{
|
44
|
+
TEST_IGNORE();
|
40
45
|
const char sentence[] = "the quick brown fish jumps over the lazy dog";
|
41
46
|
|
42
47
|
TEST_ASSERT_FALSE(is_pangram(sentence));
|
@@ -44,6 +49,7 @@ void test_another_missing_x(void)
|
|
44
49
|
|
45
50
|
void test_pangram_with_underscores(void)
|
46
51
|
{
|
52
|
+
TEST_IGNORE();
|
47
53
|
const char sentence[] = "the_quick_brown_fox_jumps_over_the_lazy_dog";
|
48
54
|
|
49
55
|
TEST_ASSERT_TRUE(is_pangram(sentence));
|
@@ -51,6 +57,7 @@ void test_pangram_with_underscores(void)
|
|
51
57
|
|
52
58
|
void test_pangram_with_numbers(void)
|
53
59
|
{
|
60
|
+
TEST_IGNORE();
|
54
61
|
const char sentence[] = "the 1 quick brown fox jumps over the 2 lazy dogs";
|
55
62
|
|
56
63
|
TEST_ASSERT_TRUE(is_pangram(sentence));
|
@@ -58,6 +65,7 @@ void test_pangram_with_numbers(void)
|
|
58
65
|
|
59
66
|
void test_missing_letters_replaced_by_numbers(void)
|
60
67
|
{
|
68
|
+
TEST_IGNORE();
|
61
69
|
const char sentence[] = "7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog";
|
62
70
|
|
63
71
|
TEST_ASSERT_FALSE(is_pangram(sentence));
|
@@ -65,6 +73,7 @@ void test_missing_letters_replaced_by_numbers(void)
|
|
65
73
|
|
66
74
|
void test_mixed_case_and_punctuation(void)
|
67
75
|
{
|
76
|
+
TEST_IGNORE();
|
68
77
|
const char sentence[] = "\"Five quacking Zephyrs jolt my wax bed.\"";
|
69
78
|
|
70
79
|
TEST_ASSERT_TRUE(is_pangram(sentence));
|
@@ -72,6 +81,7 @@ void test_mixed_case_and_punctuation(void)
|
|
72
81
|
|
73
82
|
void test_non_ascii_characters(void)
|
74
83
|
{
|
84
|
+
TEST_IGNORE();
|
75
85
|
const char sentence[] =
|
76
86
|
"Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich.";
|
77
87
|
|
@@ -80,6 +90,7 @@ void test_non_ascii_characters(void)
|
|
80
90
|
|
81
91
|
void test_pangram_in_alphabet_other_than_ascii(void)
|
82
92
|
{
|
93
|
+
TEST_IGNORE();
|
83
94
|
const char sentence[] =
|
84
95
|
"Широкая электрификация южных губерний даст мощный толчок подъёму сельского хозяйства.";
|
85
96
|
|
@@ -25,6 +25,7 @@ void test_no_rows(void)
|
|
25
25
|
|
26
26
|
void test_single_row(void)
|
27
27
|
{
|
28
|
+
TEST_IGNORE(); // delete this line to run test
|
28
29
|
size_t expected[1][1] = {
|
29
30
|
{1}
|
30
31
|
};
|
@@ -35,6 +36,7 @@ void test_single_row(void)
|
|
35
36
|
|
36
37
|
void test_two_rows(void)
|
37
38
|
{
|
39
|
+
TEST_IGNORE();
|
38
40
|
size_t expected[2][2] = {
|
39
41
|
{1, 0},
|
40
42
|
{1, 1}
|
@@ -46,6 +48,7 @@ void test_two_rows(void)
|
|
46
48
|
|
47
49
|
void test_three_rows(void)
|
48
50
|
{
|
51
|
+
TEST_IGNORE();
|
49
52
|
size_t expected[3][3] = {
|
50
53
|
{1, 0, 0},
|
51
54
|
{1, 1, 0},
|
@@ -58,6 +61,7 @@ void test_three_rows(void)
|
|
58
61
|
|
59
62
|
void test_four_rows(void)
|
60
63
|
{
|
64
|
+
TEST_IGNORE();
|
61
65
|
size_t expected[4][4] = {
|
62
66
|
{1, 0, 0, 0},
|
63
67
|
{1, 1, 0, 0},
|
@@ -71,6 +75,7 @@ void test_four_rows(void)
|
|
71
75
|
|
72
76
|
void test_negative_rows(void)
|
73
77
|
{
|
78
|
+
TEST_IGNORE();
|
74
79
|
TEST_ASSERT_TRUE((create_triangle(-1) == NULL));
|
75
80
|
}
|
76
81
|
|
@@ -8,61 +8,73 @@ void test_smallest_perfect_number_is_classified_correctly(void)
|
|
8
8
|
|
9
9
|
void test_medium_perfect_number_is_classified_correctly(void)
|
10
10
|
{
|
11
|
+
TEST_IGNORE(); // delete this line to run test
|
11
12
|
TEST_ASSERT_EQUAL(perfect_number, classify_number(28));
|
12
13
|
}
|
13
14
|
|
14
15
|
void test_large_perfect_number_is_classified_correctly(void)
|
15
16
|
{
|
17
|
+
TEST_IGNORE();
|
16
18
|
TEST_ASSERT_EQUAL(perfect_number, classify_number(33550336));
|
17
19
|
}
|
18
20
|
|
19
21
|
void test_smallest_abundant_number_is_classified_correctly(void)
|
20
22
|
{
|
23
|
+
TEST_IGNORE();
|
21
24
|
TEST_ASSERT_EQUAL(abundant_number, classify_number(12));
|
22
25
|
}
|
23
26
|
|
24
27
|
void test_medium_abundant_number_is_classified_correctly(void)
|
25
28
|
{
|
29
|
+
TEST_IGNORE();
|
26
30
|
TEST_ASSERT_EQUAL(abundant_number, classify_number(30));
|
27
31
|
}
|
28
32
|
|
29
33
|
void test_large_abundant_number_is_classified_correctly(void)
|
30
34
|
{
|
35
|
+
TEST_IGNORE();
|
31
36
|
TEST_ASSERT_EQUAL(abundant_number, classify_number(33550335));
|
32
37
|
}
|
33
38
|
|
34
39
|
void test_smallest_prime_deficient_number_is_classified_correctly(void)
|
35
40
|
{
|
41
|
+
TEST_IGNORE();
|
36
42
|
TEST_ASSERT_EQUAL(deficient_number, classify_number(2));
|
37
43
|
}
|
38
44
|
|
39
45
|
void test_smallest_non_prime_deficient_number_is_classified_correctly(void)
|
40
46
|
{
|
47
|
+
TEST_IGNORE();
|
41
48
|
TEST_ASSERT_EQUAL(deficient_number, classify_number(4));
|
42
49
|
}
|
43
50
|
|
44
51
|
void test_medium_deficient_number_is_classified_correctly(void)
|
45
52
|
{
|
53
|
+
TEST_IGNORE();
|
46
54
|
TEST_ASSERT_EQUAL(deficient_number, classify_number(32));
|
47
55
|
}
|
48
56
|
|
49
57
|
void test_large_deficient_number_is_classified_correctly(void)
|
50
58
|
{
|
59
|
+
TEST_IGNORE();
|
51
60
|
TEST_ASSERT_EQUAL(deficient_number, classify_number(33550337));
|
52
61
|
}
|
53
62
|
|
54
63
|
void test_edge_case_is_classified_correctly(void)
|
55
64
|
{
|
65
|
+
TEST_IGNORE();
|
56
66
|
TEST_ASSERT_EQUAL(deficient_number, classify_number(1));
|
57
67
|
}
|
58
68
|
|
59
69
|
void test_zero_is_rejected(void)
|
60
70
|
{
|
71
|
+
TEST_IGNORE();
|
61
72
|
TEST_ASSERT_EQUAL(error, classify_number(0));
|
62
73
|
}
|
63
74
|
|
64
75
|
void test_negative_integer_is_rejected(void)
|
65
76
|
{
|
77
|
+
TEST_IGNORE();
|
66
78
|
TEST_ASSERT_EQUAL(error, classify_number(-1));
|
67
79
|
}
|
68
80
|
|
@@ -13,6 +13,7 @@ void test_phone_number_clean(const char *input, const char *expected)
|
|
13
13
|
|
14
14
|
void test_cleans_parens_dashes_and_spaces_from_the_number(void)
|
15
15
|
{
|
16
|
+
TEST_IGNORE(); // delete this line to run test
|
16
17
|
const char input[] = "(123) 456-7890";
|
17
18
|
const char expected[] = "1234567890";
|
18
19
|
|
@@ -21,6 +22,7 @@ void test_cleans_parens_dashes_and_spaces_from_the_number(void)
|
|
21
22
|
|
22
23
|
void test_cleans_numbers_with_dots(void)
|
23
24
|
{
|
25
|
+
TEST_IGNORE();
|
24
26
|
const char input[] = "123.456.7890";
|
25
27
|
const char expected[] = "1234567890";
|
26
28
|
|
@@ -29,6 +31,7 @@ void test_cleans_numbers_with_dots(void)
|
|
29
31
|
|
30
32
|
void test_cleans_numbers_with_multiple_spaces(void)
|
31
33
|
{
|
34
|
+
TEST_IGNORE();
|
32
35
|
const char input[] = "123 456 7890 ";
|
33
36
|
const char expected[] = "1234567890";
|
34
37
|
|
@@ -37,6 +40,7 @@ void test_cleans_numbers_with_multiple_spaces(void)
|
|
37
40
|
|
38
41
|
void test_invalid_when_9_digits(void)
|
39
42
|
{
|
43
|
+
TEST_IGNORE();
|
40
44
|
const char input[] = "123456789";
|
41
45
|
const char expected[] = "0000000000";
|
42
46
|
|
@@ -45,6 +49,7 @@ void test_invalid_when_9_digits(void)
|
|
45
49
|
|
46
50
|
void test_valid_when_11_digits_and_first_digit_is_1(void)
|
47
51
|
{
|
52
|
+
TEST_IGNORE();
|
48
53
|
const char input[] = "11234567890";
|
49
54
|
const char expected[] = "1234567890";
|
50
55
|
|
@@ -53,6 +58,7 @@ void test_valid_when_11_digits_and_first_digit_is_1(void)
|
|
53
58
|
|
54
59
|
void test_invalid_when_11_digits_and_first_digit_not_1(void)
|
55
60
|
{
|
61
|
+
TEST_IGNORE();
|
56
62
|
const char input[] = "21234567890";
|
57
63
|
const char expected[] = "0000000000";
|
58
64
|
|
@@ -61,6 +67,7 @@ void test_invalid_when_11_digits_and_first_digit_not_1(void)
|
|
61
67
|
|
62
68
|
void test_invalid_when_more_than_11_digits(void)
|
63
69
|
{
|
70
|
+
TEST_IGNORE();
|
64
71
|
const char input[] = "121234567890";
|
65
72
|
const char expected[] = "0000000000";
|
66
73
|
|
@@ -69,6 +76,7 @@ void test_invalid_when_more_than_11_digits(void)
|
|
69
76
|
|
70
77
|
void test_invalid_with_letters(void)
|
71
78
|
{
|
79
|
+
TEST_IGNORE();
|
72
80
|
const char input[] = "123-abc-7890";
|
73
81
|
const char expected[] = "0000000000";
|
74
82
|
|
@@ -77,6 +85,7 @@ void test_invalid_with_letters(void)
|
|
77
85
|
|
78
86
|
void test_invalid_with_punctuations(void)
|
79
87
|
{
|
88
|
+
TEST_IGNORE();
|
80
89
|
const char input[] = "123-@:!-7890";
|
81
90
|
const char expected[] = "0000000000";
|
82
91
|
|
@@ -85,6 +94,7 @@ void test_invalid_with_punctuations(void)
|
|
85
94
|
|
86
95
|
void test_invalid_with_right_number_of_digits_but_letters_mixed_in(void)
|
87
96
|
{
|
97
|
+
TEST_IGNORE();
|
88
98
|
const char input[] = "1a2b3c4d5e6f7g8h9i0j";
|
89
99
|
const char expected[] = "0000000000";
|
90
100
|
|
@@ -93,6 +103,7 @@ void test_invalid_with_right_number_of_digits_but_letters_mixed_in(void)
|
|
93
103
|
|
94
104
|
void test_returns_area_code(void)
|
95
105
|
{
|
106
|
+
TEST_IGNORE();
|
96
107
|
const char input[] = "5024567890";
|
97
108
|
const char expected[] = "502";
|
98
109
|
char *result;
|
@@ -106,6 +117,7 @@ void test_returns_area_code(void)
|
|
106
117
|
|
107
118
|
void test_formats_a_number(void)
|
108
119
|
{
|
120
|
+
TEST_IGNORE();
|
109
121
|
const char input[] = "1234567890";
|
110
122
|
const char expected[] = "(123) 456-7890";
|
111
123
|
char *result;
|
@@ -119,6 +131,7 @@ void test_formats_a_number(void)
|
|
119
131
|
|
120
132
|
void test_cleans_number_before_formatting(void)
|
121
133
|
{
|
134
|
+
TEST_IGNORE();
|
122
135
|
const char input[] = "123-456-7890";
|
123
136
|
const char expected[] = "(123) 456-7890";
|
124
137
|
char *result;
|
@@ -15,84 +15,98 @@ void test_one_yields_itself(void)
|
|
15
15
|
|
16
16
|
void test_three_yields_pling(void)
|
17
17
|
{
|
18
|
+
TEST_IGNORE(); // delete this line to run test
|
18
19
|
char buffer[BUFFER_LENGTH];
|
19
20
|
TEST_ASSERT_EQUAL_STRING("Pling", convert(buffer, sizeof(buffer), 3));
|
20
21
|
}
|
21
22
|
|
22
23
|
void test_five_yields_plang(void)
|
23
24
|
{
|
25
|
+
TEST_IGNORE();
|
24
26
|
char buffer[BUFFER_LENGTH];
|
25
27
|
TEST_ASSERT_EQUAL_STRING("Plang", convert(buffer, sizeof(buffer), 5));
|
26
28
|
}
|
27
29
|
|
28
30
|
void test_seven_yields_plong(void)
|
29
31
|
{
|
32
|
+
TEST_IGNORE();
|
30
33
|
char buffer[BUFFER_LENGTH];
|
31
34
|
TEST_ASSERT_EQUAL_STRING("Plong", convert(buffer, sizeof(buffer), 7));
|
32
35
|
}
|
33
36
|
|
34
37
|
void test_six_yields_pling(void)
|
35
38
|
{
|
39
|
+
TEST_IGNORE();
|
36
40
|
char buffer[BUFFER_LENGTH];
|
37
41
|
TEST_ASSERT_EQUAL_STRING("Pling", convert(buffer, sizeof(buffer), 6));
|
38
42
|
}
|
39
43
|
|
40
44
|
void test_nine_yields_pling(void)
|
41
45
|
{
|
46
|
+
TEST_IGNORE();
|
42
47
|
char buffer[BUFFER_LENGTH];
|
43
48
|
TEST_ASSERT_EQUAL_STRING("Pling", convert(buffer, sizeof(buffer), 9));
|
44
49
|
}
|
45
50
|
|
46
51
|
void test_ten_yields_plang(void)
|
47
52
|
{
|
53
|
+
TEST_IGNORE();
|
48
54
|
char buffer[BUFFER_LENGTH];
|
49
55
|
TEST_ASSERT_EQUAL_STRING("Plang", convert(buffer, sizeof(buffer), 10));
|
50
56
|
}
|
51
57
|
|
52
58
|
void test_fourteen_yields_plong(void)
|
53
59
|
{
|
60
|
+
TEST_IGNORE();
|
54
61
|
char buffer[BUFFER_LENGTH];
|
55
62
|
TEST_ASSERT_EQUAL_STRING("Plong", convert(buffer, sizeof(buffer), 14));
|
56
63
|
}
|
57
64
|
|
58
65
|
void test_fifteen_yields_plingplang(void)
|
59
66
|
{
|
67
|
+
TEST_IGNORE();
|
60
68
|
char buffer[BUFFER_LENGTH];
|
61
69
|
TEST_ASSERT_EQUAL_STRING("PlingPlang", convert(buffer, sizeof(buffer), 15));
|
62
70
|
}
|
63
71
|
|
64
72
|
void test_twenty_one_yields_plingplong(void)
|
65
73
|
{
|
74
|
+
TEST_IGNORE();
|
66
75
|
char buffer[BUFFER_LENGTH];
|
67
76
|
TEST_ASSERT_EQUAL_STRING("PlingPlong", convert(buffer, sizeof(buffer), 21));
|
68
77
|
}
|
69
78
|
|
70
79
|
void test_twenty_five_yields_plang(void)
|
71
80
|
{
|
81
|
+
TEST_IGNORE();
|
72
82
|
char buffer[BUFFER_LENGTH];
|
73
83
|
TEST_ASSERT_EQUAL_STRING("Plang", convert(buffer, sizeof(buffer), 25));
|
74
84
|
}
|
75
85
|
|
76
86
|
void test_thirty_five_yields_plangplong(void)
|
77
87
|
{
|
88
|
+
TEST_IGNORE();
|
78
89
|
char buffer[BUFFER_LENGTH];
|
79
90
|
TEST_ASSERT_EQUAL_STRING("PlangPlong", convert(buffer, sizeof(buffer), 35));
|
80
91
|
}
|
81
92
|
|
82
93
|
void test_forty_nine_yields_plong(void)
|
83
94
|
{
|
95
|
+
TEST_IGNORE();
|
84
96
|
char buffer[BUFFER_LENGTH];
|
85
97
|
TEST_ASSERT_EQUAL_STRING("Plong", convert(buffer, sizeof(buffer), 49));
|
86
98
|
}
|
87
99
|
|
88
100
|
void test_fifty_two_yields_itself(void)
|
89
101
|
{
|
102
|
+
TEST_IGNORE();
|
90
103
|
char buffer[BUFFER_LENGTH];
|
91
104
|
TEST_ASSERT_EQUAL_STRING("52", convert(buffer, sizeof(buffer), 52));
|
92
105
|
}
|
93
106
|
|
94
107
|
void test_one_hundred_five_yields_plingplangplong(void)
|
95
108
|
{
|
109
|
+
TEST_IGNORE();
|
96
110
|
char buffer[BUFFER_LENGTH];
|
97
111
|
TEST_ASSERT_EQUAL_STRING("PlingPlangPlong",
|
98
112
|
convert(buffer, sizeof(buffer), 105));
|
@@ -100,12 +114,14 @@ void test_one_hundred_five_yields_plingplangplong(void)
|
|
100
114
|
|
101
115
|
void test_big_prime_yields_itself(void)
|
102
116
|
{
|
117
|
+
TEST_IGNORE();
|
103
118
|
char buffer[BUFFER_LENGTH];
|
104
119
|
TEST_ASSERT_EQUAL_STRING("12121", convert(buffer, sizeof(buffer), 12121));
|
105
120
|
}
|
106
121
|
|
107
122
|
void test_no_buffer_overflow_for_plingplangplong(void)
|
108
123
|
{
|
124
|
+
TEST_IGNORE();
|
109
125
|
char buffer[BUFFER_LENGTH];
|
110
126
|
buffer[8] = '?';
|
111
127
|
convert(buffer, 8, 105);
|
@@ -114,6 +130,7 @@ void test_no_buffer_overflow_for_plingplangplong(void)
|
|
114
130
|
|
115
131
|
void test_no_buffer_overflow_for_number(void)
|
116
132
|
{
|
133
|
+
TEST_IGNORE();
|
117
134
|
char buffer[BUFFER_LENGTH];
|
118
135
|
buffer[5] = '?';
|
119
136
|
convert(buffer, 5, 10007);
|