aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--SolidityEndToEndTest.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp
index 16787c8e..b79e9c4b 100644
--- a/SolidityEndToEndTest.cpp
+++ b/SolidityEndToEndTest.cpp
@@ -28,10 +28,6 @@
#include <libdevcrypto/SHA3.h>
#include <test/solidityExecutionFramework.h>
-#ifdef _MSC_VER
-#pragma warning(disable: 4307) //integral constant overflow for high_bits_cleaning
-#endif
-
using namespace std;
namespace dev
@@ -386,7 +382,8 @@ BOOST_AUTO_TEST_CASE(high_bits_cleaning)
{
char const* sourceCode = "contract test {\n"
" function run() returns(uint256 y) {\n"
- " uint32 x = uint32(0xffffffff) + 10;\n"
+ " uint32 t = uint32(0xffffffff);\n"
+ " uint32 x = t + 10;\n"
" if (x >= 0xffffffff) return 0;\n"
" return x;"
" }\n"
@@ -394,7 +391,8 @@ BOOST_AUTO_TEST_CASE(high_bits_cleaning)
compileAndRun(sourceCode);
auto high_bits_cleaning_cpp = []() -> u256
{
- uint32_t x = uint32_t(0xffffffff) + 10;
+ uint32_t t = uint32_t(0xffffffff);
+ uint32_t x = t + 10;
if (x >= 0xffffffff)
return 0;
return x;
@@ -426,14 +424,16 @@ BOOST_AUTO_TEST_CASE(small_unsigned_types)
{
char const* sourceCode = "contract test {\n"
" function run() returns(uint256 y) {\n"
- " uint32 x = uint32(0xffffff) * 0xffffff;\n"
+ " uint32 t = uint32(0xffffff);\n"
+ " uint32 x = t * 0xffffff;\n"
" return x / 0x100;"
" }\n"
"}\n";
compileAndRun(sourceCode);
auto small_unsigned_types_cpp = []() -> u256
{
- uint32_t x = uint32_t(0xffffff) * 0xffffff;
+ uint32_t t = uint32_t(0xffffff);
+ uint32_t x = t * 0xffffff;
return x / 0x100;
};
testSolidityAgainstCpp("run()", small_unsigned_types_cpp);