From: Rafał Długołęcki Date: Tue, 7 Apr 2015 23:37:24 +0000 (+0200) Subject: Inverse tests checks. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=d8fcb8eda6221b8de8ee2a8d6666fc3a5a77a80f;p=genetic.git Inverse tests checks. --- diff --git a/tests/gene/copy.cpp b/tests/gene/copy.cpp index 554fa12..635e2cc 100644 --- a/tests/gene/copy.cpp +++ b/tests/gene/copy.cpp @@ -13,12 +13,13 @@ int main() { gene = gene2; - if (gene.get() != 20) { - cout << "Gene does not copied value\n"; + if (gene.get() == 20) { + cout << "Gene copied value from second gene\n"; + return 0; } - cout << "Gene copied value from second gene\n"; + cout << "Gene does not copied value\n"; - return 0; + return 1; } diff --git a/tests/gene/create.cpp b/tests/gene/create.cpp index 9bc970e..d0739e3 100644 --- a/tests/gene/create.cpp +++ b/tests/gene/create.cpp @@ -10,12 +10,12 @@ int main() { _Gene gene(1); - if (gene.get() != 1) { - cout << "Gene does not contained initial value\n"; - return 1; + if (gene.get() == 1) { + cout << "Gene contained initial value\n"; + return 0; } - cout << "Gene contained initial value\n"; - return 0; + cout << "Gene does not contained initial value\n"; + return 1; }