mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibCrypto: Add Fibonacci signed and unsigned bigint benchmarks
This commit is contained in:
parent
ce98d2bbf3
commit
51a2fb3ffc
|
|
@ -47,6 +47,12 @@ TEST_CASE(test_bigint_fib500)
|
|||
EXPECT_EQ(bigint_fibonacci(500).words(), result);
|
||||
}
|
||||
|
||||
BENCHMARK_CASE(bench_bigint_fib100000)
|
||||
{
|
||||
auto res = bigint_fibonacci(100000);
|
||||
(void)res;
|
||||
}
|
||||
|
||||
TEST_CASE(test_unsigned_bigint_addition_initialization)
|
||||
{
|
||||
Crypto::UnsignedBigInteger num1;
|
||||
|
|
@ -637,6 +643,12 @@ TEST_CASE(test_signed_bigint_fibo500)
|
|||
EXPECT_EQ(result.unsigned_value().words(), expected_result);
|
||||
}
|
||||
|
||||
BENCHMARK_CASE(bench_signed_bigint_fib100000)
|
||||
{
|
||||
auto res = bigint_signed_fibonacci(100000);
|
||||
(void)res;
|
||||
}
|
||||
|
||||
TEST_CASE(test_signed_addition_edgecase_borrow_with_zero)
|
||||
{
|
||||
Crypto::SignedBigInteger num1 { Crypto::UnsignedBigInteger { { UINT32_MAX - 3, UINT32_MAX } }, false };
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user