Sha256: eba396bf20afae791c55b3b05feff8ac3d01206f18363b4c4cf8ab8fc39a90b6
Contents?: true
Size: 563 Bytes
Versions: 396
Compression:
Stored size: 563 Bytes
Contents
#include "nth_prime.h" #define BOOST_TEST_MAIN #include <boost/test/unit_test.hpp> #include <stdexcept> BOOST_AUTO_TEST_CASE(first) { BOOST_REQUIRE_EQUAL(2, prime::nth(1)); } #if defined(EXERCISM_RUN_ALL_TESTS) BOOST_AUTO_TEST_CASE(second) { BOOST_REQUIRE_EQUAL(3, prime::nth(2)); } BOOST_AUTO_TEST_CASE(sixth) { BOOST_REQUIRE_EQUAL(13, prime::nth(6)); } BOOST_AUTO_TEST_CASE(big_prime) { BOOST_REQUIRE_EQUAL(104743, prime::nth(10001)); } BOOST_AUTO_TEST_CASE(weird_case) { BOOST_REQUIRE_THROW(prime::nth(0), std::domain_error); } #endif
Version data entries
396 entries across 396 versions & 1 rubygems