1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-08 22:40:59 +00:00

test: reorder function in source

This commit is contained in:
Pavol Rusnak 2017-07-27 19:28:00 +02:00
parent 5dbdf18b6c
commit ea7e1b860d
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -332,6 +332,25 @@ START_TEST(test_bignum_is_odd)
}
END_TEST
START_TEST(test_bignum_is_less)
{
bignum256 a;
bignum256 b;
bn_read_uint32(0x1234, &a);
bn_read_uint32(0x8765, &b);
ck_assert_int_eq(bn_is_less(&a, &b), 1);
ck_assert_int_eq(bn_is_less(&b, &a), 0);
bn_zero(&a);
bn_read_be(fromhex("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"), &b);
ck_assert_int_eq(bn_is_less(&a, &b), 1);
ck_assert_int_eq(bn_is_less(&b, &a), 0);
}
END_TEST
START_TEST(test_bignum_bitcount)
{
bignum256 a, b;
@ -398,25 +417,6 @@ START_TEST(test_bignum_digitcount)
}
END_TEST
START_TEST(test_bignum_is_less)
{
bignum256 a;
bignum256 b;
bn_read_uint32(0x1234, &a);
bn_read_uint32(0x8765, &b);
ck_assert_int_eq(bn_is_less(&a, &b), 1);
ck_assert_int_eq(bn_is_less(&b, &a), 0);
bn_zero(&a);
bn_read_be(fromhex("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"), &b);
ck_assert_int_eq(bn_is_less(&a, &b), 1);
ck_assert_int_eq(bn_is_less(&b, &a), 0);
}
END_TEST
START_TEST(test_bignum_format) {
bignum256 a;
char buf[128];