From f007016de8360b42c182ece3e207062b8cd696f3 Mon Sep 17 00:00:00 2001 From: Daniel Neus Date: Tue, 26 Jul 2016 13:34:11 +0200 Subject: test BigInt::operator%=(word y) --- src/tests/test_bigint.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tests/test_bigint.cpp b/src/tests/test_bigint.cpp index a7e00498f..6f3d603db 100644 --- a/src/tests/test_bigint.cpp +++ b/src/tests/test_bigint.cpp @@ -303,6 +303,15 @@ class BigInt_Mod_Test : public Text_Based_Test e %= b; result.test_eq("a %= b", e, c); + // if b fits into a Botan::word test %= operator for words + if(b.bytes() <= sizeof(Botan::word)) + { + Botan::word b_word = b.word_at( 0 ); + e = a; + e %= b_word; + result.test_eq("a %= b (as word)", e, c); + } + return result; } }; -- cgit v1.2.3