aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-11-22 20:41:33 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-12-12 17:40:29 +0800
commit7ff9a85592cbb50b7a72654849582c780d7fc494 (patch)
tree282450de706a54a293878bc8b98abf5474801cdc /test
parent5226d54ed16bb7247c64ac67fec786301a3210ec (diff)
downloaddexon-solidity-7ff9a85592cbb50b7a72654849582c780d7fc494.tar.gz
dexon-solidity-7ff9a85592cbb50b7a72654849582c780d7fc494.tar.zst
dexon-solidity-7ff9a85592cbb50b7a72654849582c780d7fc494.zip
Reduce the types of errors outputted by ConstantEvaluator
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index d141361f..b4e4c56e 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -7419,25 +7419,25 @@ BOOST_AUTO_TEST_CASE(array_length_invalid_expression)
uint[-true] ids;
}
)";
- CHECK_ERROR(text, TypeError, "Invalid constant expression.");
+ CHECK_ERROR(text, TypeError, "Invalid array length, expected integer literal or constant expression.");
text = R"(
contract C {
uint[true/1] ids;
}
)";
- CHECK_ERROR(text, TypeError, "Invalid constant expression.");
+ CHECK_ERROR(text, TypeError, "Invalid array length, expected integer literal or constant expression.");
text = R"(
contract C {
uint[1/true] ids;
}
)";
- CHECK_ERROR(text, TypeError, "Invalid constant expression.");
+ CHECK_ERROR(text, TypeError, "Invalid array length, expected integer literal or constant expression.");
text = R"(
contract C {
uint[1.111111E1111111111111] ids;
}
)";
- CHECK_ERROR(text, TypeError, "Invalid literal value.");
+ CHECK_ERROR(text, TypeError, "Invalid array length, expected integer literal or constant expression.");
text = R"(
contract C {
uint[3/0] ids;