You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CryptoSquare.normalizedPlaintext("Hello") should be ("hello")
8
-
}
9
-
10
-
test("Remove spaces") {
11
-
pending
12
-
CryptoSquare.normalizedPlaintext("Hi there") should be ("hithere")
13
-
}
14
-
15
-
test("Remove punctuation") {
16
-
pending
17
-
CryptoSquare.normalizedPlaintext("@1, 2%, 3 Go!") should be ("123go")
18
-
}
19
-
20
-
test("empty plaintext results in an empty rectangle") {
21
-
pending
22
-
CryptoSquare.plaintextSegments("") should be (List())
23
-
}
24
-
25
-
test("4 character plaintext results in an 2x2 rectangle") {
26
-
pending
27
-
CryptoSquare.plaintextSegments("Ab Cd") should be (List("ab", "cd"))
28
-
}
29
-
30
-
test("9 character plaintext results in an 3x3 rectangle") {
31
-
pending
32
-
CryptoSquare.plaintextSegments("This is fun!") should be (List("thi", "sis", "fun"))
6
+
test("empty plaintext results in an empty ciphertext") {
7
+
CryptoSquare.ciphertext("") should be("")
33
8
}
34
9
35
-
test("54 character plaintext results in an 8x7 rectangle") {
10
+
test("Lowercase") {
36
11
pending
37
-
CryptoSquare.plaintextSegments("If man was meant to stay on the ground, god would have given us roots.") should be (List("ifmanwas", "meanttos", "tayonthe", "groundgo", "dwouldha", "vegivenu", "sroots"))
12
+
CryptoSquare.ciphertext("A") should be("a")
38
13
}
39
14
40
-
test("empty plaintext results in an empty encode") {
15
+
test("Remove spaces") {
41
16
pending
42
-
CryptoSquare.encoded("") should be ("")
17
+
CryptoSquare.ciphertext(" b ") should be("b")
43
18
}
44
19
45
-
test("Non-empty plaintext results in the combined plaintext segments") {
20
+
test("Remove punctuation") {
46
21
pending
47
-
CryptoSquare.encoded("If man was meant to stay on the ground, god would have given us roots.") should be ("imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau")
22
+
CryptoSquare.ciphertext("@1,%!") should be("1")
48
23
}
49
24
50
-
test("empty plaintext results in an empty ciphertext") {
25
+
test("9 character plaintext results in 3 chunks of 3 characters") {
51
26
pending
52
-
CryptoSquare.ciphertext("") should be ("")
27
+
CryptoSquare.ciphertext("This is fun!") should be("tsf hiu isn")
53
28
}
54
29
55
-
test("9 character plaintext results in 3 chunks of 3 characters") {
30
+
test(
31
+
"8 character plaintext results in 3 chunks, the last one with a trailing space") {
56
32
pending
57
-
CryptoSquare.ciphertext("This is fun!") should be ("tsf hiu isn")
33
+
CryptoSquare.ciphertext("Chill out.") should be("clu hlt io ")
58
34
}
59
35
60
-
test("54 character plaintext results in 7 chunks, the last two padded with spaces") {
36
+
test(
37
+
"54 character plaintext results in 7 chunks, the last two with trailing spaces") {
61
38
pending
62
-
CryptoSquare.ciphertext("If man was meant to stay on the ground, god would have given us roots.") should be ("imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau ")
39
+
CryptoSquare.ciphertext(
40
+
"If man was meant to stay on the ground, god would have given us roots.") should be(
0 commit comments