From d8fcb8eda6221b8de8ee2a8d6666fc3a5a77a80f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20D=C5=82ugo=C5=82=C4=99cki?= Date: Wed, 8 Apr 2015 01:37:24 +0200 Subject: [PATCH] Inverse tests checks. --- tests/gene/copy.cpp | 9 +++++---- tests/gene/create.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 9 deletions(-) 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; } -- 2.30.2