aboutsummaryrefslogtreecommitdiffstats
path: root/SolidityNameAndTypeResolution.cpp
diff options
context:
space:
mode:
authorLu Guanqun <guanqun.lu@gmail.com>2015-02-10 22:43:13 +0800
committerLu Guanqun <guanqun.lu@gmail.com>2015-02-10 23:39:13 +0800
commit466f0e01001bae0782d7f41ef944301f1a2e1e7f (patch)
tree16d5c60dc75a60810d059ad595eef5b544fd7b03 /SolidityNameAndTypeResolution.cpp
parent2f15494f83838faf27502fe7bbeb02ffd34e6d46 (diff)
downloaddexon-solidity-466f0e01001bae0782d7f41ef944301f1a2e1e7f.tar
dexon-solidity-466f0e01001bae0782d7f41ef944301f1a2e1e7f.tar.gz
dexon-solidity-466f0e01001bae0782d7f41ef944301f1a2e1e7f.tar.bz2
dexon-solidity-466f0e01001bae0782d7f41ef944301f1a2e1e7f.tar.lz
dexon-solidity-466f0e01001bae0782d7f41ef944301f1a2e1e7f.tar.xz
dexon-solidity-466f0e01001bae0782d7f41ef944301f1a2e1e7f.tar.zst
dexon-solidity-466f0e01001bae0782d7f41ef944301f1a2e1e7f.zip
small fixes per chris's comments
Diffstat (limited to 'SolidityNameAndTypeResolution.cpp')
-rw-r--r--SolidityNameAndTypeResolution.cpp8
1 files changed, 4 insertions, 4 deletions
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()