Commit 1c50e735 by Karsa Zoltán István

Merge branch 'zoli' into 'master'

fix CipherQueue test

See merge request !2
parents ac9b8884 1abaf880
......@@ -110,9 +110,9 @@ int main() {
} END
#endif
//CipherQueue tesztek
CipherQueue queue; //kell majd a következőhöz is
#if ELKESZULT > 8
TEST(Cipher_Queue: caesar + mycipher, _meg tobb szorgalmit prog2bol) {
CipherQueue queue;
const CaesarCipher caesar(6);
const MyCipher myCipher("abc", -2);
queue.add(caesar.clone());
......@@ -123,8 +123,22 @@ int main() {
EXPECT_STREQ("meg tobb szorgalmit progkettobol", str2.c_str());
} END
#endif
CipherQueue queue; //kell majd a következőkhöz is
#if ELKESZULT > 9
TEST(Cipher_Queue: inner queue, _pointert mindenhova) {
TEST(Cipher_Queue: inner queue, _pointert mindenhova_alfa) {
CipherQueue inner;
inner.add(new MyCipher("queue"));
inner.add(new CaesarCipher(10));
queue.add(inner.clone());
queue.add(queue.clone()); //ennek sem kellene gondot okoznia
std::string str1 = queue.encode("pointert mindenhova");
EXPECT_STREQ("pyobdolj gcrdmrlcfs", str1.c_str());
std::string str2 = queue.decode(str1);
EXPECT_STREQ("pointert mindenhova", str2.c_str());
} END
#endif
#if ELKESZULT > 9
TEST(Cipher_Queue: inner queue, _pointert mindenhova_beta) {
std::srand(std::time(nullptr));
CipherQueue inner;
inner.add(new MyCipher("queue"));
......@@ -164,3 +178,4 @@ int main() {
GTEND(std::cerr);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment