diff --git a/testMain.hpp b/testMain.hpp index 8469ba2..c87cda8 100644 --- a/testMain.hpp +++ b/testMain.hpp @@ -292,6 +292,21 @@ bool caesarTest(std::string& errorString){ passed = false; } + inputString = "you"; + outputString = "iye"; + //Try it forwards + cipherString = cipher.encode(10, inputString); + if(cipherString != outputString){ + errorString += testingError(ENCODE, inputString, outputString, cipherString); + passed = false; + } + //Try it backwards + cipherString = cipher.decode(10, outputString); + if(cipherString != inputString){ + errorString += testingError(DECODE, outputString, inputString, cipherString); + passed = false; + } + return passed; } #endif //CAESAR_TEST