diff --git a/tests/crypto/bigint_test.cpp b/tests/crypto/bigint_test.cpp index 833c5f4..0d983b3 100644 --- a/tests/crypto/bigint_test.cpp +++ b/tests/crypto/bigint_test.cpp @@ -46,6 +46,10 @@ BOOST_AUTO_TEST_CASE(bigint_test_2) BOOST_CHECK( bi_accu >= a_1 ); } while ( bi_accu.log2() <= 128 ); + // Test self-assignment (a=a) has no effect, but throw in some arcanity to avoid a compiler warning + const volatile auto* bi_accu_self = &bi_accu; + bi_accu = const_cast(*bi_accu_self); + BOOST_CHECK( bi_accu && !bi_accu.is_negative() && bi_accu != bi_1 ); BOOST_CHECK( bi_3.exp( bi_accu.log2() ) > bi_accu );