From d141ec61c8d03b6f5760fe44e6ff82eca057072e Mon Sep 17 00:00:00 2001 From: Matthew Ellison Date: Mon, 14 May 2018 21:49:13 -0400 Subject: [PATCH] Added test with large offset --- testMain.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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