tracks/fsharp/exercises/simple-cipher/SimpleCipherTest.fs in trackler-2.0.6.16 vs tracks/fsharp/exercises/simple-cipher/SimpleCipherTest.fs in trackler-2.0.6.17
- old
+ new
@@ -23,11 +23,11 @@
[<Ignore("Remove to run test")>]
let ``Encode random uses randomly generated key`` () =
let keys = List.init 100 (fun _ -> encodeRandom plainText |> fst)
Assert.That(keys |> List.distinct, Is.EqualTo(keys))
-// Here we take advantage of the fact that plaintext of "aaa..." doesn't output
+// Here we take advantage of the fact that plaintext of "aaa..." outputs
// the key. This is a critical problem with shift ciphers, some characters
// will always output the key verbatim.
[<Test>]
[<Ignore("Remove to run test")>]
let ``Encode random can encode`` () =
@@ -60,10 +60,11 @@
[<Ignore("Remove to run test")>]
let ``Cipher is reversible given key`` () =
Assert.That(encode key plainText |> decode key, Is.EqualTo(plainText))
[<Test>]
+[<Ignore("Remove to run test")>]
let ``Cipher can double shift encode`` () =
let plainText = "iamapandabear"
Assert.That(encode plainText plainText, Is.EqualTo("qayaeaagaciai"))
[<Test>]
@@ -107,6 +108,6 @@
[<Test>]
[<Ignore("Remove to run test")>]
let ``Encode throws with empty key`` () =
let key = ""
- Assert.That((fun () -> encode key plainText |> ignore), Throws.Exception)
\ No newline at end of file
+ Assert.That((fun () -> encode key plainText |> ignore), Throws.Exception)