MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / test

Function test

code/mathematics/mod_pow.test.cpp:1–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1void test() {
2 assert_equal(16, mod_pow(234, 2334, 23));
3 assert_equal(400, mod_pow(42, 34, 2344));
4 assert_equal(1, mod_pow(1, 34, 2344));
5 assert_equal(0, mod_pow(1, 34, 1));
6 assert_equal(1, mod_pow(-1, 34, 2344));
7 assert_equal(2343, mod_pow(-1, 35, 2344));
8 assert_equal(1425, mod_pow(-23, 34, 2344));
9 assert_equal(41, mod_pow(-23, 35, 2344));
10}
11// vim: cc=60 ts=2 sts=2 sw=2:

Callers

nothing calls this directly

Calls 2

mod_powFunction · 0.85
assert_equalFunction · 0.50

Tested by

no test coverage detected