73 const std::vector<uint64_t> expected;
74 TestCase(
const uint64_t in_n,
const uint64_t in_m,
75 std::initializer_list<uint64_t>
data)
76 : n(in_n), m(in_m), expected(
data) {
77 assert(
data.size() == m);
80 const std::vector<TestCase> test_cases = {
88 TestCase(5, 15, {0, 0, 0, 0, 1, 1, 2, 4, 8, 16, 31, 61, 120, 236, 464}),
91 {0, 0, 0, 0, 0, 1, 1, 2, 4, 8, 16, 32, 63, 125, 248, 492, 976}),
92 TestCase(56, 15, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})};
94 for (
const auto &tc : test_cases) {
95 assert(math::n_bonacci::N_bonacci(tc.n, tc.m) == tc.expected);
97 std::cout <<
"passed" << std::endl;