Skip to content

Commit

Permalink
Fixed Swift tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arguiot authored Feb 20, 2018
1 parent 5b8aa2e commit 1db8a8e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions __test__/test.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ extension String {

func test() -> Int {
print("Testing Encryption")
if "Hello World!".encrypt(n: 4) == "Lipps$[svph%" {
if "Hello World!".encrypt(4) == "Lipps$[svph%" {
print("Done! No problems")
} else {
print("Oups!\n \"Hello World!\".encrypt(n: 4) isn't equal to \"Lipps$[svph%\"")
print("Output: \("Hello World!".encrypt(n: 4))")
print("Oups!\n \"Hello World!\".encrypt(4) isn't equal to \"Lipps$[svph%\"")
print("Output: \("Hello World!".encrypt(4))")
exit(1)
}

print("Testing Decryption")
if "Lipps$[svph%".decrypt(n: 4) == "Hello World!" {
if "Lipps$[svph%".decrypt(4) == "Hello World!" {
print("Done! No problems")
} else {
print("Oups!\n \"Lipps$[svph%\".decrypt(n: 4) isn't equal to \"Hello World!\"")
print("Output: \("Lipps$[svph%".decrypt(n: 4))")
print("Oups!\n \"Lipps$[svph%\".decrypt(4) isn't equal to \"Hello World!\"")
print("Output: \("Lipps$[svph%".decrypt(4))")
exit(1)
}
print("Tests are done.")
Expand Down

0 comments on commit 1db8a8e

Please sign in to comment.