|
|
|
@ -153,6 +153,18 @@ START_TEST(test_bignum_is_zero)
|
|
|
|
|
}
|
|
|
|
|
END_TEST
|
|
|
|
|
|
|
|
|
|
START_TEST(test_bignum_one)
|
|
|
|
|
{
|
|
|
|
|
bignum256 a;
|
|
|
|
|
bignum256 b;
|
|
|
|
|
|
|
|
|
|
bn_read_be(fromhex("0000000000000000000000000000000000000000000000000000000000000001"), &a);
|
|
|
|
|
bn_one(&b);
|
|
|
|
|
|
|
|
|
|
ck_assert_int_eq(bn_is_equal(&a, &b), 1);
|
|
|
|
|
}
|
|
|
|
|
END_TEST
|
|
|
|
|
|
|
|
|
|
START_TEST(test_bignum_read_le)
|
|
|
|
|
{
|
|
|
|
|
bignum256 a;
|
|
|
|
@ -2602,6 +2614,7 @@ Suite *test_suite(void)
|
|
|
|
|
tcase_add_test(tc, test_bignum_is_equal);
|
|
|
|
|
tcase_add_test(tc, test_bignum_zero);
|
|
|
|
|
tcase_add_test(tc, test_bignum_is_zero);
|
|
|
|
|
tcase_add_test(tc, test_bignum_one);
|
|
|
|
|
tcase_add_test(tc, test_bignum_read_le);
|
|
|
|
|
tcase_add_test(tc, test_bignum_write_le);
|
|
|
|
|
tcase_add_test(tc, test_bignum_read_uint32);
|
|
|
|
|