From dae9d17676a3279a01e7e69f8a8980828b11d2b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20B=20Nagy?= <20251272+BNAndras@users.noreply.github.com> Date: Sun, 30 Aug 2026 22:43:06 -0700 Subject: [PATCH] Sync tests not needing example updates --- exercises/practice/bob/.meta/tests.toml | 89 ++++++++++--------- exercises/practice/bob/BobTests.fs | 88 +++++++++--------- exercises/practice/connect/.meta/tests.toml | 19 +++- exercises/practice/connect/ConnectTests.fs | 18 ++++ exercises/practice/line-up/.meta/tests.toml | 18 ++++ exercises/practice/line-up/LineUpTests.fs | 24 +++++ .../practice/perfect-numbers/.meta/tests.toml | 42 +++++---- .../perfect-numbers/PerfectNumbersTests.fs | 4 + 8 files changed, 198 insertions(+), 104 deletions(-) diff --git a/exercises/practice/bob/.meta/tests.toml b/exercises/practice/bob/.meta/tests.toml index 5299e2895..c6a464960 100644 --- a/exercises/practice/bob/.meta/tests.toml +++ b/exercises/practice/bob/.meta/tests.toml @@ -9,17 +9,20 @@ # As user-added comments (using the # character) will be removed when this file # is regenerated, comments can be added via a `comment` key. -[e162fead-606f-437a-a166-d051915cea8e] -description = "stating something" +[8a2e771d-d6f1-4e3f-b6c6-b41495556e37] +description = "asking a question" [73a966dc-8017-47d6-bb32-cf07d1a5fcd9] description = "shouting" -[d6c98afd-df35-4806-b55e-2c457c3ab748] -description = "shouting gibberish" +[a5193c61-4a92-4f68-93e2-f554eb385ec6] +description = "forceful question" -[8a2e771d-d6f1-4e3f-b6c6-b41495556e37] -description = "asking a question" +[bc39f7c6-f543-41be-9a43-fd1c2f753fc0] +description = "silence" + +[e162fead-606f-437a-a166-d051915cea8e] +description = "stating something" [81080c62-4e4d-4066-b30a-48d8d76920d9] description = "asking a numeric question" @@ -27,23 +30,34 @@ description = "asking a numeric question" [2a02716d-685b-4e2e-a804-2adaf281c01e] description = "asking gibberish" -[c02f9179-ab16-4aa7-a8dc-940145c385f7] -description = "talking forcefully" +[bb0011c5-cd52-4a5b-8bfb-a87b6283b0e2] +description = "question with no letters" -[153c0e25-9bb5-4ec5-966e-598463658bcd] -description = "using acronyms in regular speech" +[9bfc677d-ea3a-45f2-be44-35bc8fa3753e] +description = "non-letters with question" -[a5193c61-4a92-4f68-93e2-f554eb385ec6] -description = "forceful question" +[8608c508-f7de-4b17-985b-811878b3cf45] +description = "prattling on" -[a20e0c54-2224-4dde-8b10-bd2cdd4f61bc] -description = "shouting numbers" +[05b304d6-f83b-46e7-81e0-4cd3ca647900] +description = "ending with whitespace" -[f7bc4b92-bdff-421e-a238-ae97f230ccac] -description = "no letters" +[66953780-165b-4e7e-8ce3-4bcb80b6385a] +description = "multiple line question" +include = false -[bb0011c5-cd52-4a5b-8bfb-a87b6283b0e2] -description = "question with no letters" +[2c7278ac-f955-4eb4-bf8f-e33eb4116a15] +description = "multiple line question" +reimplements = "66953780-165b-4e7e-8ce3-4bcb80b6385a" + +[d6c98afd-df35-4806-b55e-2c457c3ab748] +description = "shouting gibberish" + +[3c954328-86fb-4c71-8961-e18d6a5e2517] +description = "shouting a statement containing a question mark" + +[a20e0c54-2224-4dde-8b10-bd2cdd4f61bc] +description = "shouting numbers" [496143c8-1c31-4c01-8a08-88427af85c66] description = "shouting with special characters" @@ -51,40 +65,29 @@ description = "shouting with special characters" [e6793c1c-43bd-4b8d-bc11-499aea73925f] description = "shouting with no exclamation mark" -[aa8097cc-c548-4951-8856-14a404dd236a] -description = "statement containing question mark" - -[9bfc677d-ea3a-45f2-be44-35bc8fa3753e] -description = "non-letters with question" - -[8608c508-f7de-4b17-985b-811878b3cf45] -description = "prattling on" - -[bc39f7c6-f543-41be-9a43-fd1c2f753fc0] -description = "silence" - [d6c47565-372b-4b09-b1dd-c40552b8378b] description = "prolonged silence" [4428f28d-4100-4d85-a902-e5a78cb0ecd3] description = "alternate silence" -[66953780-165b-4e7e-8ce3-4bcb80b6385a] -description = "multiple line question" -include = false +[72bd5ad3-9b2f-4931-a988-dce1f5771de2] +description = "other whitespace" -[5371ef75-d9ea-4103-bcfa-2da973ddec1b] -description = "starting with whitespace" +[c02f9179-ab16-4aa7-a8dc-940145c385f7] +description = "talking forcefully" -[05b304d6-f83b-46e7-81e0-4cd3ca647900] -description = "ending with whitespace" +[153c0e25-9bb5-4ec5-966e-598463658bcd] +description = "using acronyms in regular speech" -[72bd5ad3-9b2f-4931-a988-dce1f5771de2] -description = "other whitespace" +[f7bc4b92-bdff-421e-a238-ae97f230ccac] +description = "no letters" + +[aa8097cc-c548-4951-8856-14a404dd236a] +description = "statement containing question mark" + +[5371ef75-d9ea-4103-bcfa-2da973ddec1b] +description = "starting with 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" diff --git a/exercises/practice/bob/BobTests.fs b/exercises/practice/bob/BobTests.fs index 67c19c8d1..2f6224e82 100644 --- a/exercises/practice/bob/BobTests.fs +++ b/exercises/practice/bob/BobTests.fs @@ -6,20 +6,24 @@ open Xunit open Bob [] -let ``Stating something`` () = - response "Tom-ay-to, tom-aaaah-to." |> should equal "Whatever." +let ``Asking a question`` () = + response "Does this cryogenic chamber make me look fat?" |> should equal "Sure." [] let ``Shouting`` () = response "WATCH OUT!" |> should equal "Whoa, chill out!" [] -let ``Shouting gibberish`` () = - response "FCECDFCAAB" |> should equal "Whoa, chill out!" +let ``Forceful question`` () = + response "WHAT'S GOING ON?" |> should equal "Calm down, I know what I'm doing!" [] -let ``Asking a question`` () = - response "Does this cryogenic chamber make me look fat?" |> should equal "Sure." +let ``Silence`` () = + response "" |> should equal "Fine. Be that way!" + +[] +let ``Stating something`` () = + response "Tom-ay-to, tom-aaaah-to." |> should equal "Whatever." [] let ``Asking a numeric question`` () = @@ -30,28 +34,36 @@ let ``Asking gibberish`` () = response "fffbbcbeab?" |> should equal "Sure." [] -let ``Talking forcefully`` () = - response "Hi there!" |> should equal "Whatever." +let ``Question with no letters`` () = + response "4?" |> should equal "Sure." [] -let ``Using acronyms in regular speech`` () = - response "It's OK if you don't want to go work for NASA." |> should equal "Whatever." +let ``Non-letters with question`` () = + response ":) ?" |> should equal "Sure." [] -let ``Forceful question`` () = - response "WHAT'S GOING ON?" |> should equal "Calm down, I know what I'm doing!" +let ``Prattling on`` () = + response "Wait! Hang on. Are you going to be OK?" |> should equal "Sure." [] -let ``Shouting numbers`` () = - response "1, 2, 3 GO!" |> should equal "Whoa, chill out!" +let ``Ending with whitespace`` () = + response "Okay if like my spacebar quite a bit? " |> should equal "Sure." [] -let ``No letters`` () = - response "1, 2, 3" |> should equal "Whatever." +let ``Multiple line question`` () = + response "\nDoes this cryogenic chamber make\n me look fat?" |> should equal "Sure." [] -let ``Question with no letters`` () = - response "4?" |> should equal "Sure." +let ``Shouting gibberish`` () = + response "FCECDFCAAB" |> should equal "Whoa, chill out!" + +[] +let ``Shouting a statement containing a question mark`` () = + response "DO LIONS EAT PEOPLE? AHHHHH." |> should equal "Whoa, chill out!" + +[] +let ``Shouting numbers`` () = + response "1, 2, 3 GO!" |> should equal "Whoa, chill out!" [] let ``Shouting with special characters`` () = @@ -62,46 +74,38 @@ let ``Shouting with no exclamation mark`` () = response "I HATE THE DENTIST" |> should equal "Whoa, chill out!" [] -let ``Statement containing question mark`` () = - response "Ending with ? means a question." |> should equal "Whatever." - -[] -let ``Non-letters with question`` () = - response ":) ?" |> should equal "Sure." +let ``Prolonged silence`` () = + response " " |> should equal "Fine. Be that way!" [] -let ``Prattling on`` () = - response "Wait! Hang on. Are you going to be OK?" |> should equal "Sure." +let ``Alternate silence`` () = + response "\t\t\t\t\t\t\t\t\t\t" |> should equal "Fine. Be that way!" [] -let ``Silence`` () = - response "" |> should equal "Fine. Be that way!" +let ``Other whitespace`` () = + response "\n\r \t" |> should equal "Fine. Be that way!" [] -let ``Prolonged silence`` () = - response " " |> should equal "Fine. Be that way!" +let ``Talking forcefully`` () = + response "Hi there!" |> should equal "Whatever." [] -let ``Alternate silence`` () = - response "\t\t\t\t\t\t\t\t\t\t" |> should equal "Fine. Be that way!" +let ``Using acronyms in regular speech`` () = + response "It's OK if you don't want to go work for NASA." |> should equal "Whatever." [] -let ``Starting with whitespace`` () = - response " hmmmmmmm..." |> should equal "Whatever." +let ``No letters`` () = + response "1, 2, 3" |> should equal "Whatever." [] -let ``Ending with whitespace`` () = - response "Okay if like my spacebar quite a bit? " |> should equal "Sure." +let ``Statement containing question mark`` () = + response "Ending with ? means a question." |> should equal "Whatever." [] -let ``Other whitespace`` () = - response "\n\r \t" |> should equal "Fine. Be that way!" +let ``Starting with whitespace`` () = + response " hmmmmmmm..." |> should equal "Whatever." [] let ``Non-question ending with whitespace`` () = response "This is a statement ending with whitespace " |> should equal "Whatever." -[] -let ``Multiple line question`` () = - response "\nDoes this cryogenic chamber make\n me look fat?" |> should equal "Sure." - diff --git a/exercises/practice/connect/.meta/tests.toml b/exercises/practice/connect/.meta/tests.toml index 59ec615e3..951b87e5c 100644 --- a/exercises/practice/connect/.meta/tests.toml +++ b/exercises/practice/connect/.meta/tests.toml @@ -1,6 +1,13 @@ -# This is an auto-generated file. Regular comments will be removed when this -# file is regenerated. Regenerating will not touch any manually added keys, -# so comments can be added in a "comment" key. +# This is an auto-generated file. +# +# Regenerating this file via `configlet sync` will: +# - Recreate every `description` key/value pair +# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications +# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion) +# - Preserve any other key/value pair +# +# As user-added comments (using the # character) will be removed when this file +# is regenerated, comments can be added via a `comment` key. [6eff0df4-3e92-478d-9b54-d3e8b354db56] description = "an empty board has no winner" @@ -23,6 +30,12 @@ description = "nobody wins crossing adjacent angles" [cd61c143-92f6-4a8d-84d9-cb2b359e226b] description = "X wins crossing from left to right" +[495e33ed-30a9-4012-b46e-d7c4d5fe13c3] +description = "X wins with left-hand dead end fork" + +[ab167ab0-4a98-4d0f-a1c0-e1cddddc3d58] +description = "X wins with right-hand dead end fork" + [73d1eda6-16ab-4460-9904-b5f5dd401d0b] description = "O wins crossing from top to bottom" diff --git a/exercises/practice/connect/ConnectTests.fs b/exercises/practice/connect/ConnectTests.fs index 52f730b3f..261d10d19 100644 --- a/exercises/practice/connect/ConnectTests.fs +++ b/exercises/practice/connect/ConnectTests.fs @@ -64,6 +64,24 @@ let ``X wins crossing from left to right`` () = " . O X ." ] winner board |> should equal (Some Black) +[] +let ``X wins with left-hand dead end fork`` () = + let board = + [ ". . X . "; + " X X . . "; + " . X X X "; + " O O O O" ] + winner board |> should equal (Some Black) + +[] +let ``X wins with right-hand dead end fork`` () = + let board = + [ ". . X X "; + " X X . . "; + " . X X . "; + " O O O O" ] + winner board |> should equal (Some Black) + [] let ``O wins crossing from top to bottom`` () = let board = diff --git a/exercises/practice/line-up/.meta/tests.toml b/exercises/practice/line-up/.meta/tests.toml index 36fdf1d0c..dd66fc158 100644 --- a/exercises/practice/line-up/.meta/tests.toml +++ b/exercises/practice/line-up/.meta/tests.toml @@ -51,9 +51,24 @@ description = "format non-exceptional ordinal numeral 13" [2bdcebc5-c029-4874-b6cc-e9bec80d603a] description = "format exceptional ordinal numeral 21" +[a98e2e22-ab41-4557-a7c2-efedc19c16da] +description = "format exceptional ordinal numeral 22 ending in nd even though it is a multiple of 11" + +[ab45d2fb-e0ee-4016-b605-76917584db0a] +description = "format exceptional ordinal numeral 33 ending in rd even though it is a multiple of 11" + +[c9243603-9f17-45b3-9a41-db9ebdbf08e1] +description = "format exceptional ordinal numeral 52 ending in nd even though it is a multiple of 13" + [74ee2317-0295-49d2-baf0-d56bcefa14e3] description = "format exceptional ordinal numeral 62" +[3f6c408c-4331-42b6-bb6c-3ad0823e568a] +description = "format non-exceptional ordinal numeral 72 ending in nd even though it is a multiple of 12" + +[8db52cd9-9689-413f-a812-6c36fcfd0d07] +description = "format exceptional ordinal numeral 91 ending in st even though it is a multiple of 13" + [b37c332d-7f68-40e3-8503-e43cbd67a0c4] description = "format exceptional ordinal numeral 100" @@ -65,3 +80,6 @@ description = "format non-exceptional ordinal numeral 112" [06b62efe-199e-4ce7-970d-4bf73945713f] description = "format exceptional ordinal numeral 123" + +[6792c54e-59a7-4faf-839a-c4bb61014229] +description = "format large number 972 ending in nd even though it is a multiple of 12" diff --git a/exercises/practice/line-up/LineUpTests.fs b/exercises/practice/line-up/LineUpTests.fs index c2cd4c957..781eeadb4 100644 --- a/exercises/practice/line-up/LineUpTests.fs +++ b/exercises/practice/line-up/LineUpTests.fs @@ -61,10 +61,30 @@ let ``Format non-exceptional ordinal numeral 13`` () = let ``Format exceptional ordinal numeral 21`` () = format "Washi" 21 |> should equal "Washi, you are the 21st customer we serve today. Thank you!" +[] +let ``Format exceptional ordinal numeral 22 ending in nd even though it is a multiple of 11`` () = + format "Ingrid" 22 |> should equal "Ingrid, you are the 22nd customer we serve today. Thank you!" + +[] +let ``Format exceptional ordinal numeral 33 ending in rd even though it is a multiple of 11`` () = + format "Mario" 33 |> should equal "Mario, you are the 33rd customer we serve today. Thank you!" + +[] +let ``Format exceptional ordinal numeral 52 ending in nd even though it is a multiple of 13`` () = + format "Quentin" 52 |> should equal "Quentin, you are the 52nd customer we serve today. Thank you!" + [] let ``Format exceptional ordinal numeral 62`` () = format "Nayra" 62 |> should equal "Nayra, you are the 62nd customer we serve today. Thank you!" +[] +let ``Format non-exceptional ordinal numeral 72 ending in nd even though it is a multiple of 12`` () = + format "Ugo" 72 |> should equal "Ugo, you are the 72nd customer we serve today. Thank you!" + +[] +let ``Format exceptional ordinal numeral 91 ending in st even though it is a multiple of 13`` () = + format "Boris" 91 |> should equal "Boris, you are the 91st customer we serve today. Thank you!" + [] let ``Format exceptional ordinal numeral 100`` () = format "John" 100 |> should equal "John, you are the 100th customer we serve today. Thank you!" @@ -81,3 +101,7 @@ let ``Format non-exceptional ordinal numeral 112`` () = let ``Format exceptional ordinal numeral 123`` () = format "Yma" 123 |> should equal "Yma, you are the 123rd customer we serve today. Thank you!" +[] +let ``Format large number 972 ending in nd even though it is a multiple of 12`` () = + format "Elias" 972 |> should equal "Elias, you are the 972nd customer we serve today. Thank you!" + diff --git a/exercises/practice/perfect-numbers/.meta/tests.toml b/exercises/practice/perfect-numbers/.meta/tests.toml index 3232bb44e..81d484081 100644 --- a/exercises/practice/perfect-numbers/.meta/tests.toml +++ b/exercises/practice/perfect-numbers/.meta/tests.toml @@ -1,42 +1,52 @@ -# This is an auto-generated file. Regular comments will be removed when this -# file is regenerated. Regenerating will not touch any manually added keys, -# so comments can be added in a "comment" key. +# This is an auto-generated file. +# +# Regenerating this file via `configlet sync` will: +# - Recreate every `description` key/value pair +# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications +# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion) +# - Preserve any other key/value pair +# +# As user-added comments (using the # character) will be removed when this file +# is regenerated, comments can be added via a `comment` key. [163e8e86-7bfd-4ee2-bd68-d083dc3381a3] -description = "Smallest perfect number is classified correctly" +description = "Perfect numbers -> Smallest perfect number is classified correctly" [169a7854-0431-4ae0-9815-c3b6d967436d] -description = "Medium perfect number is classified correctly" +description = "Perfect numbers -> Medium perfect number is classified correctly" [ee3627c4-7b36-4245-ba7c-8727d585f402] -description = "Large perfect number is classified correctly" +description = "Perfect numbers -> Large perfect number is classified correctly" [80ef7cf8-9ea8-49b9-8b2d-d9cb3db3ed7e] -description = "Smallest abundant number is classified correctly" +description = "Abundant numbers -> Smallest abundant number is classified correctly" [3e300e0d-1a12-4f11-8c48-d1027165ab60] -description = "Medium abundant number is classified correctly" +description = "Abundant numbers -> Medium abundant number is classified correctly" [ec7792e6-8786-449c-b005-ce6dd89a772b] -description = "Large abundant number is classified correctly" +description = "Abundant numbers -> Large abundant number is classified correctly" + +[05f15b93-849c-45e9-9c7d-1ea131ef7d10] +description = "Abundant numbers -> Perfect square abundant number is classified correctly" [e610fdc7-2b6e-43c3-a51c-b70fb37413ba] -description = "Smallest prime deficient number is classified correctly" +description = "Deficient numbers -> Smallest prime deficient number is classified correctly" [0beb7f66-753a-443f-8075-ad7fbd9018f3] -description = "Smallest non-prime deficient number is classified correctly" +description = "Deficient numbers -> Smallest non-prime deficient number is classified correctly" [1c802e45-b4c6-4962-93d7-1cad245821ef] -description = "Medium deficient number is classified correctly" +description = "Deficient numbers -> Medium deficient number is classified correctly" [47dd569f-9e5a-4a11-9a47-a4e91c8c28aa] -description = "Large deficient number is classified correctly" +description = "Deficient numbers -> Large deficient number is classified correctly" [a696dec8-6147-4d68-afad-d38de5476a56] -description = "Edge case (no factors other than itself) is classified correctly" +description = "Deficient numbers -> Edge case (no factors other than itself) is classified correctly" [72445cee-660c-4d75-8506-6c40089dc302] -description = "Zero is rejected (not a natural number)" +description = "Invalid inputs -> Zero is rejected (as it is not a positive integer)" [2d72ce2c-6802-49ac-8ece-c790ba3dae13] -description = "Negative integer is rejected (not a natural number)" +description = "Invalid inputs -> Negative integer is rejected (as it is not a positive integer)" diff --git a/exercises/practice/perfect-numbers/PerfectNumbersTests.fs b/exercises/practice/perfect-numbers/PerfectNumbersTests.fs index 209c3d651..f39643826 100644 --- a/exercises/practice/perfect-numbers/PerfectNumbersTests.fs +++ b/exercises/practice/perfect-numbers/PerfectNumbersTests.fs @@ -29,6 +29,10 @@ let ``Medium abundant number is classified correctly`` () = let ``Large abundant number is classified correctly`` () = classify 33550335 |> should equal (Some Classification.Abundant) +[] +let ``Perfect square abundant number is classified correctly`` () = + classify 196 |> should equal (Some Classification.Abundant) + [] let ``Smallest prime deficient number is classified correctly`` () = classify 2 |> should equal (Some Classification.Deficient)