From 466f0e01001bae0782d7f41ef944301f1a2e1e7f Mon Sep 17 00:00:00 2001 From: Lu Guanqun Date: Tue, 10 Feb 2015 22:43:13 +0800 Subject: small fixes per chris's comments --- SolidityNameAndTypeResolution.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'SolidityNameAndTypeResolution.cpp') diff --git a/SolidityNameAndTypeResolution.cpp b/SolidityNameAndTypeResolution.cpp index b529f0b7..d013f5c5 100644 --- a/SolidityNameAndTypeResolution.cpp +++ b/SolidityNameAndTypeResolution.cpp @@ -980,16 +980,16 @@ BOOST_AUTO_TEST_CASE(exp_operator_negative_exponent) contract test { function f() returns(uint d) { return 2 ** -3; } })"; - BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode), InternalCompilerError); + BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode), TypeError); } -BOOST_AUTO_TEST_CASE(exp_operator_const_overflowed) +BOOST_AUTO_TEST_CASE(exp_operator_exponent_too_big) { char const* sourceCode = R"( contract test { - function f() returns(uint d) { return 10 ** 256; } + function f() returns(uint d) { return 2 ** 10000000000; } })"; - BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode), InternalCompilerError); + BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode), TypeError); } BOOST_AUTO_TEST_SUITE_END() -- cgit v1.2.3