Commit 17927781 authored by abolz's avatar abolz

Add a test for BigInteger::operator<<

parent a0f9c5fc
......@@ -120,6 +120,11 @@ TEST(BigInteger, LeftShift) {
EXPECT_TRUE(BIGINTEGER_LITERAL("4537899042132549697536") == a);
a <<= 99;
EXPECT_TRUE(BIGINTEGER_LITERAL("2876235222267216943024851750785644982682875244576768") == a);
a = 1;
a <<= 64; // a.count_ != 1
a <<= 256; // interShift == 0
EXPECT_TRUE(BIGINTEGER_LITERAL("2135987035920910082395021706169552114602704522356652769947041607822219725780640550022962086936576") == a);
}
TEST(BigInteger, Compare) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment