diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-15 20:30:14 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-15 20:30:14 +0000 |
commit | c2df35e6d042ed22c3b2babdc96817210742cb4b (patch) | |
tree | 28de4e74396b50aa929c360bb71ca940b26f1a89 /kbruch/testcases/primenumber_test.cpp | |
parent | e91a687ea077784e22afb909503e7e3eab92a444 (diff) | |
download | tdeedu-c2df35e6d042ed22c3b2babdc96817210742cb4b.tar.gz tdeedu-c2df35e6d042ed22c3b2babdc96817210742cb4b.zip |
Fix some kdeedu build issues
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236928 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbruch/testcases/primenumber_test.cpp')
-rw-r--r-- | kbruch/testcases/primenumber_test.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/kbruch/testcases/primenumber_test.cpp b/kbruch/testcases/primenumber_test.cpp index 0a5ee2b6..c0e322fb 100644 --- a/kbruch/testcases/primenumber_test.cpp +++ b/kbruch/testcases/primenumber_test.cpp @@ -36,52 +36,52 @@ class primenumber_test /** test the prime number algorithm */ void test_isPrimeNumber() { - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(0) == 0); - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(2) == 1); - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(3) == 1); - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(4) == 0); - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(5) == 1); - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(6) == 0); - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(7) == 1); - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(8) == 0); - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(9) == 0); - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(23) == 1); - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(9) == 0); - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(9) == 0); - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(6) == 0); - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(101) == 1); - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(323) == 0); // 17 * 19 - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(1001) == 0); // 7 * 143 - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(1002) == 0); // 2 * 501 - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(3) == 1); - BOOST_RETQUIRE(m_primenumber.isPrimeNumber(2) == 1); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(0) == 0); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(2) == 1); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(3) == 1); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(4) == 0); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(5) == 1); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(6) == 0); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(7) == 1); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(8) == 0); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(9) == 0); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(23) == 1); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(9) == 0); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(9) == 0); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(6) == 0); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(101) == 1); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(323) == 0); // 17 * 19 + BOOST_REQUIRE(m_primenumber.isPrimeNumber(1001) == 0); // 7 * 143 + BOOST_REQUIRE(m_primenumber.isPrimeNumber(1002) == 0); // 2 * 501 + BOOST_REQUIRE(m_primenumber.isPrimeNumber(3) == 1); + BOOST_REQUIRE(m_primenumber.isPrimeNumber(2) == 1); } /** test the get_first() function */ void test_get_first() { - BOOST_RETQUIRE(m_primenumber.get_first() == 2); + BOOST_REQUIRE(m_primenumber.get_first() == 2); } /** test the move and get functions */ void test_move_get_func() { m_primenumber.move_first(); - BOOST_RETQUIRE(m_primenumber.get_current() == 2); - BOOST_RETQUIRE(m_primenumber.get_next() == 3); + BOOST_REQUIRE(m_primenumber.get_current() == 2); + BOOST_REQUIRE(m_primenumber.get_next() == 3); m_primenumber.move_forward(); - BOOST_RETQUIRE(m_primenumber.get_current() == 5); + BOOST_REQUIRE(m_primenumber.get_current() == 5); m_primenumber.move_back(); - BOOST_RETQUIRE(m_primenumber.get_current() == 3); + BOOST_REQUIRE(m_primenumber.get_current() == 3); unsigned int tmp = m_primenumber.get_last(); m_primenumber.move_last(); - BOOST_RETQUIRE(m_primenumber.get_current() == tmp); + BOOST_REQUIRE(m_primenumber.get_current() == tmp); m_primenumber.move_forward(); - BOOST_RETQUIRE(m_primenumber.get_last() != tmp); + BOOST_REQUIRE(m_primenumber.get_last() != tmp); } private: |