package caesar import ( "testing" ) func TestEncode(t *testing.T) { msg := "Attack at dawn" if Encode(msg) != "Dwwdfn dw gdzq" { t.Fail() } } func TestCaesar(t *testing.T) { if testing.Short() { t.Skip() } msg := "Attack at dawn" t.Logf("testing encoding message %s", msg) encoded := Encode(msg) if encoded == msg { t.Log("expected ciphertext and plaintext to differ") t.Fail() } decoded := Decode(encoded) if decoded != msg { t.Logf("expected recovered plaintext to match message, but got: %s", decoded) t.Fail() } } func BenchmarkCaesar(b *testing.B) { b.Fail() }