Skip to content

Commit b76610e

Browse files
Sync tests for practice exercise crypto-square (#2532)
[no imporant files changed]
1 parent 710caf3 commit b76610e

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

exercises/practice/crypto-square/.meta/tests.toml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
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
[407c3837-9aa7-4111-ab63-ec54b58e8e9f]
613
description = "empty plaintext results in an empty ciphertext"
714

15+
[aad04a25-b8bb-4304-888b-581bea8e0040]
16+
description = "normalization results in empty plaintext"
17+
818
[64131d65-6fd9-4f58-bdd8-4a2370fb481d]
919
description = "Lowercase"
1020

exercises/practice/crypto-square/.meta/version

Lines changed: 0 additions & 1 deletion
This file was deleted.

exercises/practice/crypto-square/src/test/java/CryptoSquareTest.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ public void emptyPlaintextResultsInEmptyCiphertext() {
1313
assertThat(cryptoSquare.getCiphertext()).isEqualTo(expectedOutput);
1414
}
1515

16+
@Ignore("Remove to run test")
17+
@Test
18+
public void normalizationResultsInEmptyCiphertext() {
19+
CryptoSquare cryptoSquare = new CryptoSquare("... --- ...");
20+
String expectedOutput = "";
21+
22+
assertThat(cryptoSquare.getCiphertext()).isEqualTo(expectedOutput);
23+
}
24+
1625
@Ignore("Remove to run test")
1726
@Test
1827
public void lettersAreLowerCasedDuringEncryption() {
@@ -62,7 +71,7 @@ public void eightCharacterPlaintextResultsInThreeChunksWithATrailingSpace() {
6271
@Test
6372
public void fiftyFourCharacterPlaintextResultsInSevenChunksWithTrailingSpaces() {
6473
CryptoSquare cryptoSquare = new CryptoSquare("If man was meant to stay on the ground, god would have " +
65-
"given us roots.");
74+
"given us roots.");
6675
String expectedOutput = "imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau ";
6776

6877
assertThat(cryptoSquare.getCiphertext()).isEqualTo(expectedOutput);

0 commit comments

Comments
 (0)