From be62f618372e41005dfe4612f102b1aeb1935939 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Tue, 19 May 2015 16:55:43 +0200 Subject: [PATCH] Test for issue #1977 Test that reproduces issue #1977 and will fail on ArchLinux with Boost version: 1.58.0-1 gcc version: 4.9.2-4 --- test/libevm/vm.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/libevm/vm.cpp b/test/libevm/vm.cpp index 7b589d238..9f790501d 100644 --- a/test/libevm/vm.cpp +++ b/test/libevm/vm.cpp @@ -438,6 +438,15 @@ void doVMTests(json_spirit::mValue& v, bool _fillin) BOOST_AUTO_TEST_SUITE(VMTests) +// test that reproduces issue https://github.com/ethereum/cpp-ethereum/issues/1977 +BOOST_AUTO_TEST_CASE(u256_overflow_test) +{ + dev::u256 a = 14; + dev::bigint b = dev::bigint("115792089237316195423570985008687907853269984665640564039457584007913129639948"); + // to fix cast `a` to dev::bigint + BOOST_CHECK(a < b); +} + BOOST_AUTO_TEST_CASE(vmtests) { dev::test::executeTests("vmtests", "/VMTests",dev::test::getFolder(__FILE__) + "/VMTestsFiller", dev::test::doVMTests);