diff options
author | Jack Lloyd <[email protected]> | 2016-07-27 15:53:11 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-07-27 15:53:11 -0400 |
commit | da574388e26df7b625b198efdb8e0757a4e4ecda (patch) | |
tree | 10b570eace0a797a4fafafb30493ef252e943dec /src | |
parent | d5e068a6827f3499bca62b2c0ec9fd8132ee15ca (diff) | |
parent | f007016de8360b42c182ece3e207062b8cd696f3 (diff) |
Merge GH #558 Test BigInt::operator%=(word y)
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/test_bigint.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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; } }; |