aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_bigint.cpp
diff options
context:
space:
mode:
authorDaniel Neus <[email protected]>2016-07-26 13:34:11 +0200
committerDaniel Neus <[email protected]>2016-07-26 17:56:08 +0200
commitf007016de8360b42c182ece3e207062b8cd696f3 (patch)
tree25ca5dcb062664015347461fe62cb880d8a43089 /src/tests/test_bigint.cpp
parent5d50db6e964a9305d7271301804a1dcb4ce22606 (diff)
test BigInt::operator%=(word y)
Diffstat (limited to 'src/tests/test_bigint.cpp')
-rw-r--r--src/tests/test_bigint.cpp9
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;
}
};