From 9a7502b4796e52e9c71afb829cd6ac777d4f8f0f Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Wed, 23 Apr 2025 14:48:04 +0200 Subject: [PATCH] Update exercises --- exercises/practice/crypto-square/.meta/tests.toml | 5 +++++ .../practice/crypto-square/CryptoSquareTests.cs | 6 ++++++ exercises/practice/game-of-life/GameOfLifeTests.cs | 2 -- .../intergalactic-transmission/.meta/tests.toml | 6 ++++++ .../practice/largest-series-product/.meta/tests.toml | 12 ++++++++++-- .../LargestSeriesProductTests.cs | 12 ++++++++++++ 6 files changed, 39 insertions(+), 4 deletions(-) diff --git a/exercises/practice/crypto-square/.meta/tests.toml b/exercises/practice/crypto-square/.meta/tests.toml index 085d142ead..94ef0819fe 100644 --- a/exercises/practice/crypto-square/.meta/tests.toml +++ b/exercises/practice/crypto-square/.meta/tests.toml @@ -32,3 +32,8 @@ description = "8 character plaintext results in 3 chunks, the last one with a tr [fbcb0c6d-4c39-4a31-83f6-c473baa6af80] description = "54 character plaintext results in 7 chunks, the last two with trailing spaces" +include = false + +[33fd914e-fa44-445b-8f38-ff8fbc9fe6e6] +description = "54 character plaintext results in 8 chunks, the last two with trailing spaces" +reimplements = "fbcb0c6d-4c39-4a31-83f6-c473baa6af80" diff --git a/exercises/practice/crypto-square/CryptoSquareTests.cs b/exercises/practice/crypto-square/CryptoSquareTests.cs index 0479b80dea..6bcdc1c0ec 100644 --- a/exercises/practice/crypto-square/CryptoSquareTests.cs +++ b/exercises/practice/crypto-square/CryptoSquareTests.cs @@ -47,4 +47,10 @@ public void Fifty_four_character_plaintext_results_in_7_chunks_the_last_two_with { Assert.Equal("imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau ", CryptoSquare.Ciphertext("If man was meant to stay on the ground, god would have given us roots.")); } + + [Fact(Skip = "Remove this Skip property to run this test")] + public void Fifty_four_character_plaintext_results_in_8_chunks_the_last_two_with_trailing_spaces() + { + Assert.Equal("imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau ", CryptoSquare.Ciphertext("If man was meant to stay on the ground, god would have given us roots.")); + } } diff --git a/exercises/practice/game-of-life/GameOfLifeTests.cs b/exercises/practice/game-of-life/GameOfLifeTests.cs index 307e5537d6..02e73dc468 100644 --- a/exercises/practice/game-of-life/GameOfLifeTests.cs +++ b/exercises/practice/game-of-life/GameOfLifeTests.cs @@ -1,5 +1,3 @@ -using Xunit; - public class GameOfLifeTests { [Fact] diff --git a/exercises/practice/intergalactic-transmission/.meta/tests.toml b/exercises/practice/intergalactic-transmission/.meta/tests.toml index 37ebc138e2..64a8aaced4 100644 --- a/exercises/practice/intergalactic-transmission/.meta/tests.toml +++ b/exercises/practice/intergalactic-transmission/.meta/tests.toml @@ -42,6 +42,9 @@ description = "calculate transmit sequences -> eight byte message" [54a0642a-d5aa-490c-be89-8e171a0cab6f] description = "calculate transmit sequences -> twenty byte message" +[9a8084dd-3336-474c-90cb-8a852524604d] +description = "decode received messages -> empty message" + [879af739-0094-4736-9127-bd441b1ddbbf] description = "decode received messages -> zero message" @@ -63,6 +66,9 @@ description = "decode received messages -> second byte has wrong parity" [b985692e-6338-46c7-8cea-bc38996d4dfd] description = "decode received messages -> 0xcf4b00 is decoded to 0xce94" +[7a1f4d48-696d-4679-917c-21b7da3ff3fd] +description = "decode received messages -> 0xe2566500 is decoded to 0xe2ad90" + [467549dc-a558-443b-80c5-ff3d4eb305d4] description = "decode received messages -> six byte message" diff --git a/exercises/practice/largest-series-product/.meta/tests.toml b/exercises/practice/largest-series-product/.meta/tests.toml index 8831692597..5a62d619ed 100644 --- a/exercises/practice/largest-series-product/.meta/tests.toml +++ b/exercises/practice/largest-series-product/.meta/tests.toml @@ -38,17 +38,25 @@ description = "reports zero if all spans include zero" [5d81aaf7-4f67-4125-bf33-11493cc7eab7] description = "rejects span longer than string length" +include = false + +[0ae1ce53-d9ba-41bb-827f-2fceb64f058b] +description = "rejects span longer than string length" +reimplements = "5d81aaf7-4f67-4125-bf33-11493cc7eab7" [06bc8b90-0c51-4c54-ac22-3ec3893a079e] description = "reports 1 for empty string and empty product (0 span)" -include = false [3ec0d92e-f2e2-4090-a380-70afee02f4c0] description = "reports 1 for nonempty string and empty product (0 span)" -include = false [6d96c691-4374-4404-80ee-2ea8f3613dd4] description = "rejects empty string and nonzero span" +include = false + +[6cf66098-a6af-4223-aab1-26aeeefc7402] +description = "rejects empty string and nonzero span" +reimplements = "6d96c691-4374-4404-80ee-2ea8f3613dd4" [7a38f2d6-3c35-45f6-8d6f-12e6e32d4d74] description = "rejects invalid character in digits" diff --git a/exercises/practice/largest-series-product/LargestSeriesProductTests.cs b/exercises/practice/largest-series-product/LargestSeriesProductTests.cs index d6ed5d3c7d..c600a87721 100644 --- a/exercises/practice/largest-series-product/LargestSeriesProductTests.cs +++ b/exercises/practice/largest-series-product/LargestSeriesProductTests.cs @@ -60,6 +60,18 @@ public void Rejects_span_longer_than_string_length() Assert.Throws(() => LargestSeriesProduct.GetLargestProduct("123", 4)); } + [Fact(Skip = "Remove this Skip property to run this test")] + public void Reports_1_for_empty_string_and_empty_product_0_span() + { + Assert.Equal(1, LargestSeriesProduct.GetLargestProduct("", 0)); + } + + [Fact(Skip = "Remove this Skip property to run this test")] + public void Reports_1_for_nonempty_string_and_empty_product_0_span() + { + Assert.Equal(1, LargestSeriesProduct.GetLargestProduct("123", 0)); + } + [Fact(Skip = "Remove this Skip property to run this test")] public void Rejects_empty_string_and_nonzero_span() {