aboutsummaryrefslogtreecommitdiffstats
path: root/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-01-14 22:20:51 +0800
committerChristian <c@ethdev.com>2015-01-15 18:47:00 +0800
commit28d103e0544481b5341ca6f8250a5ad863e47893 (patch)
treef7cfede7ebfc5aec75b947b1af1a82a4746d891e /SolidityEndToEndTest.cpp
parentdc79a79c0621c258829b26c9a4113dd69af6d34c (diff)
downloaddexon-solidity-28d103e0544481b5341ca6f8250a5ad863e47893.tar
dexon-solidity-28d103e0544481b5341ca6f8250a5ad863e47893.tar.gz
dexon-solidity-28d103e0544481b5341ca6f8250a5ad863e47893.tar.bz2
dexon-solidity-28d103e0544481b5341ca6f8250a5ad863e47893.tar.lz
dexon-solidity-28d103e0544481b5341ca6f8250a5ad863e47893.tar.xz
dexon-solidity-28d103e0544481b5341ca6f8250a5ad863e47893.tar.zst
dexon-solidity-28d103e0544481b5341ca6f8250a5ad863e47893.zip
Re-enable MSVC warning 4307.
Diffstat (limited to 'SolidityEndToEndTest.cpp')
-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);