Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync tests #324

Merged
merged 6 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions exercises/practice/anagram/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,11 @@ include = false
[33d3f67e-fbb9-49d3-a90e-0beb00861da7]
description = "words other than themselves can be anagrams"
reimplements = "a0705568-628c-4b55-9798-82e4acde51ca"

[a6854f66-eec1-4afd-a137-62ef2870c051]
description = "handles case of greek letters"
include = false

[fd3509e5-e3ba-409d-ac3d-a9ac84d13296]
description = "different characters may have the same bytes"
include = false
5 changes: 5 additions & 0 deletions exercises/practice/bob/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ description = "alternate silence"

[66953780-165b-4e7e-8ce3-4bcb80b6385a]
description = "multiple line question"
include = false

[5371ef75-d9ea-4103-bcfa-2da973ddec1b]
description = "starting with whitespace"
Expand All @@ -83,3 +84,7 @@ description = "other whitespace"

[12983553-8601-46a8-92fa-fcaa3bc4a2a0]
description = "non-question ending with whitespace"

[2c7278ac-f955-4eb4-bf8f-e33eb4116a15]
description = "multiple line question"
reimplements = "66953780-165b-4e7e-8ce3-4bcb80b6385a"
4 changes: 2 additions & 2 deletions exercises/practice/bob/test.sml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ val testsuite =
(fn _ => response ("\t\t\t\t\t\t\t\t\t\t") |> Expect.equalTo "Fine. Be that way!"),

test "multiple line question"
(fn _ => response ("\nDoes this cryogenic chamber make me look fat?\nNo.") |> Expect.equalTo "Whatever."),
(fn _ => response ("\nDoes this cryogenic chamber make\n me look fat?") |> Expect.equalTo "Sure."),

test "starting with whitespace"
(fn _ => response (" hmmmmmmm...") |> Expect.equalTo "Whatever."),
Expand All @@ -84,4 +84,4 @@ val testsuite =
(fn _ => response ("This is a statement ending with whitespace ") |> Expect.equalTo "Whatever.")
]

val _ = Test.run testsuite
val _ = Test.run testsuite
3 changes: 3 additions & 0 deletions exercises/practice/pig-latin/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ description = "first letter and ay are moved to the end of words that start with
[bce94a7a-a94e-4e2b-80f4-b2bb02e40f71]
description = "first letter and ay are moved to the end of words that start with consonants -> word beginning with q without a following u"

[e59dbbe8-ccee-4619-a8e9-ce017489bfc0]
description = "first letter and ay are moved to the end of words that start with consonants -> word beginning with consonant and vowel containing qu"

[c01e049a-e3e2-451c-bf8e-e2abb7e438b8]
description = "some letter clusters are treated like a single consonant -> word beginning with ch"

Expand Down
7 changes: 5 additions & 2 deletions exercises/practice/pig-latin/test.sml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ val testsuite =
(fn _ => translate ("xenon") |> Expect.equalTo "enonxay"),

test "word beginning with q without a following u"
(fn _ => translate ("qat") |> Expect.equalTo "atqay")
(fn _ => translate ("qat") |> Expect.equalTo "atqay"),

test "word beginning with consonald and vowel containing qu"
glennj marked this conversation as resolved.
Show resolved Hide resolved
(fn _ => translate ("liquid") |> Expect.equalTo "iquidlay")
],

describe "some letter clusters are treated like a single consonant" [
Expand Down Expand Up @@ -87,4 +90,4 @@ val testsuite =
]
]

val _ = Test.run testsuite
val _ = Test.run testsuite
4 changes: 4 additions & 0 deletions exercises/practice/protein-translation/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,15 @@ description = "Translation stops if STOP codon in middle of three-codon sequence
[2c2a2a60-401f-4a80-b977-e0715b23b93d]
description = "Translation stops if STOP codon in middle of six-codon sequence"

[f6f92714-769f-4187-9524-e353e8a41a80]
description = "Sequence of two non-STOP codons does not translate to a STOP codon"

[1e75ea2a-f907-4994-ae5c-118632a1cb0f]
description = "Non-existing codon can't translate"

[9eac93f3-627a-4c90-8653-6d0a0595bc6f]
description = "Unknown amino acids, not part of a codon, can't translate"
reimplements = "1e75ea2a-f907-4994-ae5c-118632a1cb0f"

[9d73899f-e68e-4291-b1e2-7bf87c00f024]
description = "Incomplete RNA sequence can't translate"
Expand Down
3 changes: 3 additions & 0 deletions exercises/practice/protein-translation/test.sml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ val testsuite =
test "Translation stops if STOP codon in middle of six-codon sequence"
(fn _ => proteins "UGGUGUUAUUAAUGGUUU" |> Expect.equalTo ["Tryptophan", "Cysteine", "Tyrosine"]),

test "Sequence of two non-STOP codons does not translate to a STOP codon"
(fn _ => proteins "AUGAUG" |> Expect.equalTo ["Methionine", "Methionine"]),

test "Non-existing codon can't translate"
(fn _ => (fn _ => proteins "AAA") |> Expect.error (Fail "Invalid codon")),

Expand Down
12 changes: 12 additions & 0 deletions exercises/practice/reverse-string/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,15 @@ description = "a palindrome"

[b9e7dec1-c6df-40bd-9fa3-cd7ded010c4c]
description = "an even-sized word"

[1bed0f8a-13b0-4bd3-9d59-3d0593326fa2]
description = "wide characters"
include = false

[93d7e1b8-f60f-4f3c-9559-4056e10d2ead]
description = "grapheme cluster with pre-combined form"
include = false

[1028b2c1-6763-4459-8540-2da47ca512d9]
description = "grapheme clusters"
include = false
3 changes: 3 additions & 0 deletions exercises/practice/roman-numerals/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,8 @@ description = "3000 is MMM"
[3bc4b41c-c2e6-49d9-9142-420691504336]
description = "3001 is MMMI"

[2f89cad7-73f6-4d1b-857b-0ef531f68b7e]
description = "3888 is MMMDCCCLXXXVIII"

[4e18e96b-5fbb-43df-a91b-9cb511fe0856]
description = "3999 is MMMCMXCIX"
7 changes: 5 additions & 2 deletions exercises/practice/roman-numerals/test.sml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ val testsuite =
(fn _ => roman (3001) |> Expect.equalTo "MMMI"),

test "3999 is MMMCMXCIX"
(fn _ => roman (3999) |> Expect.equalTo "MMMCMXCIX")
(fn _ => roman (3999) |> Expect.equalTo "MMMCMXCIX"),

test "3888 is MMMDCCCLXXXVIII"
(fn _ => roman (3888) |> Expect.equalTo "MMMDCCCLXXXVIII")
]

val _ = Test.run testsuite
val _ = Test.run testsuite