Changeset View
Changeset View
Standalone View
Standalone View
src/test/lcg_tests.cpp
Show All 40 Lines | BOOST_AUTO_TEST_CASE(lcg_testvalues) { | ||||
for (int i = 0; i < 99; i++) { | for (int i = 0; i < 99; i++) { | ||||
lcg.next(); | lcg.next(); | ||||
} | } | ||||
// Make sure the LCG is producing expected value after many iterations. | // Make sure the LCG is producing expected value after many iterations. | ||||
// This ensures mul and add overflows are acting as expected on this | // This ensures mul and add overflows are acting as expected on this | ||||
// architecture. | // architecture. | ||||
BOOST_CHECK_EQUAL(lcg.next(), 0x6b00b1df); | BOOST_CHECK_EQUAL(lcg.next(), 0x6b00b1df); | ||||
} | } | ||||
assert(false); | |||||
} | } | ||||
BOOST_AUTO_TEST_SUITE_END() | BOOST_AUTO_TEST_SUITE_END() |