Skip to content

Commit 686e129

Browse files
authored
Sync tests (#955)
* tests.toml and runtests.jl sync * update to custom-set example.jl * update bob runtests.jl * sync tests.toml and testset.jl [no important files changed]
1 parent 45c931b commit 686e129

File tree

3 files changed

+135
-8
lines changed

3 files changed

+135
-8
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
11+
12+
[5ce422f9-7a4b-4f44-ad29-49c67cb32d2c]
13+
description = "single bit one to decimal"
14+
15+
[0cc3fea8-bb79-46ac-a2ab-5a2c93051033]
16+
description = "binary to single decimal"
17+
18+
[f12db0f9-0d3d-42c2-b3ba-e38cb375a2b8]
19+
description = "single decimal to binary"
20+
21+
[2c45cf54-6da3-4748-9733-5a3c765d925b]
22+
description = "binary to multiple decimal"
23+
24+
[65ddb8b4-8899-4fcc-8618-181b2cf0002d]
25+
description = "decimal to binary"
26+
27+
[8d418419-02a7-4824-8b7a-352d33c6987e]
28+
description = "trinary to hexadecimal"
29+
30+
[d3901c80-8190-41b9-bd86-38d988efa956]
31+
description = "hexadecimal to trinary"
32+
33+
[5d42f85e-21ad-41bd-b9be-a3e8e4258bbf]
34+
description = "15-bit integer"
35+
36+
[d68788f7-66dd-43f8-a543-f15b6d233f83]
37+
description = "empty list"
38+
39+
[5e27e8da-5862-4c5f-b2a9-26c0382b6be7]
40+
description = "single zero"
41+
42+
[2e1c2573-77e4-4b9c-8517-6c56c5bcfdf2]
43+
description = "multiple zeros"
44+
45+
[3530cd9f-8d6d-43f5-bc6e-b30b1db9629b]
46+
description = "leading zeros"
47+
48+
[a6b476a1-1901-4f2a-92c4-4d91917ae023]
49+
description = "input base is one"
50+
51+
[e21a693a-7a69-450b-b393-27415c26a016]
52+
description = "input base is zero"
53+
54+
[54a23be5-d99e-41cc-88e0-a650ffe5fcc2]
55+
description = "input base is negative"
56+
57+
[9eccf60c-dcc9-407b-95d8-c37b8be56bb6]
58+
description = "negative digit"
59+
60+
[232fa4a5-e761-4939-ba0c-ed046cd0676a]
61+
description = "invalid positive digit"
62+
63+
[14238f95-45da-41dc-95ce-18f860b30ad3]
64+
description = "output base is one"
65+
66+
[73dac367-da5c-4a37-95fe-c87fad0a4047]
67+
description = "output base is zero"
68+
69+
[13f81f42-ff53-4e24-89d9-37603a48ebd9]
70+
description = "output base is negative"
71+
72+
[0e6c895d-8a5d-4868-a345-309d094cfe8d]
73+
description = "both bases are negative"

exercises/practice/anagram/.meta/tests.toml

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
1-
# This is an auto-generated file. Regular comments will be removed when this
2-
# file is regenerated. Regenerating will not touch any manually added keys,
3-
# so comments can be added in a "comment" key.
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
411

512
[dd40c4d2-3c8b-44e5-992a-f42b393ec373]
613
description = "no matches"
714

815
[b3cca662-f50a-489e-ae10-ab8290a09bdc]
916
description = "detects two anagrams"
17+
include = false
18+
19+
[03eb9bbe-8906-4ea0-84fa-ffe711b52c8b]
20+
description = "detects two anagrams"
21+
reimplements = "b3cca662-f50a-489e-ae10-ab8290a09bdc"
1022

1123
[a27558ee-9ba0-4552-96b1-ecf665b06556]
1224
description = "does not detect anagram subsets"
@@ -34,12 +46,42 @@ description = "detects anagrams using case-insensitive possible matches"
3446

3547
[7cc195ad-e3c7-44ee-9fd2-d3c344806a2c]
3648
description = "does not detect an anagram if the original word is repeated"
49+
include = false
50+
51+
[630abb71-a94e-4715-8395-179ec1df9f91]
52+
description = "does not detect an anagram if the original word is repeated"
53+
reimplements = "7cc195ad-e3c7-44ee-9fd2-d3c344806a2c"
3754

3855
[9878a1c9-d6ea-4235-ae51-3ea2befd6842]
3956
description = "anagrams must use all letters exactly once"
4057

4158
[85757361-4535-45fd-ac0e-3810d40debc1]
4259
description = "words are not anagrams of themselves (case-insensitive)"
60+
include = false
61+
62+
[68934ed0-010b-4ef9-857a-20c9012d1ebf]
63+
description = "words are not anagrams of themselves"
64+
reimplements = "85757361-4535-45fd-ac0e-3810d40debc1"
65+
66+
[589384f3-4c8a-4e7d-9edc-51c3e5f0c90e]
67+
description = "words are not anagrams of themselves even if letter case is partially different"
68+
reimplements = "85757361-4535-45fd-ac0e-3810d40debc1"
69+
70+
[ba53e423-7e02-41ee-9ae2-71f91e6d18e6]
71+
description = "words are not anagrams of themselves even if letter case is completely different"
72+
reimplements = "85757361-4535-45fd-ac0e-3810d40debc1"
4373

4474
[a0705568-628c-4b55-9798-82e4acde51ca]
4575
description = "words other than themselves can be anagrams"
76+
include = false
77+
78+
[33d3f67e-fbb9-49d3-a90e-0beb00861da7]
79+
description = "words other than themselves can be anagrams"
80+
reimplements = "a0705568-628c-4b55-9798-82e4acde51ca"
81+
82+
[a6854f66-eec1-4afd-a137-62ef2870c051]
83+
description = "handles case of greek letters"
84+
85+
[fd3509e5-e3ba-409d-ac3d-a9ac84d13296]
86+
description = "different characters may have the same bytes"
87+
include = false

exercises/practice/anagram/runtests.jl

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ include("anagram.jl")
1717
end
1818

1919
@testset "detects two anagrams" begin
20-
@test detect_anagrams("master", ["stream", "pigeon", "maters"]) == ["stream", "maters"]
20+
@test detect_anagrams("solemn", ["lemons", "cherry", "melons"]) == ["lemons", "melons"]
2121
end
2222

2323
@testset "does not detect anagram subsets" begin
@@ -65,23 +65,35 @@ include("anagram.jl")
6565
end
6666

6767
@testset "does not detect a anagram if the original word is repeated" begin
68-
@test detect_anagrams("go", ["go Go GO"]) == String[]
68+
@test detect_anagrams("go", ["goGoGO"]) == String[]
6969
end
7070

7171
@testset "anagrams must use all letters exactly once" begin
7272
@test detect_anagrams("tapper", ["patter"]) == String[]
7373
end
7474

75-
@testset "words are not anagrams of themselves (case-insensitive)" begin
76-
@test detect_anagrams("BANANA", ["BANANA", "Banana", "banana"]) == String[]
75+
@testset "words are not anagrams of themselves" begin
76+
@test detect_anagrams("BANANA", ["BANANA"]) == String[]
77+
end
78+
79+
@testset "words are not anagrams of themselves even if letter case is partially different" begin
80+
@test detect_anagrams("BANANA", ["Banana"]) == String[]
81+
end
82+
83+
@testset "words are not anagrams of themselves even if letter case is completely different" begin
84+
@test detect_anagrams("BANANA", ["banana"]) == String[]
7785
end
7886

7987
@testset "words other than themselves can be anagrams" begin
80-
@test detect_anagrams("LISTEN", ["Listen", "Silent", "LISTEN"]) == ["Silent"]
88+
@test detect_anagrams("LISTEN", ["Silent", "LISTEN"]) == ["Silent"]
8189
end
8290

8391
@testset "capital word is not own anagram" begin
8492
@test detect_anagrams("BANANA", ["Banana"]) == String[]
8593
end
94+
95+
@testset "handles case of greek letters" begin
96+
@test detect_anagrams("ΑΒΓ", ["ΒΓΑ", "ΒΓΔ", "γβα", "αβγ"]) == ["ΒΓΑ", "γβα"]
97+
end
8698
end
8799
end

0 commit comments

Comments
 (0)