mirror of
https://bitbucket.org/Mattrixwv/cipherstream.git
synced 2025-12-06 18:33:58 -05:00
Added test with large offset
This commit is contained in:
15
testMain.hpp
15
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
|
||||
|
||||
Reference in New Issue
Block a user