aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2016-12-14 21:18:11 +0800
committerYoichi Hirai <i@yoichihirai.com>2017-01-12 01:28:11 +0800
commit9602318eab7affca78b8b5db018e9e646f40e84e (patch)
treec0a5005ec70470a0316b4bf8c6a2349845be485e
parent0216f34010343af6285305b59d47db62261c03c6 (diff)
downloaddexon-solidity-9602318eab7affca78b8b5db018e9e646f40e84e.tar.gz
dexon-solidity-9602318eab7affca78b8b5db018e9e646f40e84e.tar.zst
dexon-solidity-9602318eab7affca78b8b5db018e9e646f40e84e.zip
test: allow multiple errors in modifier-function overriding
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index 11ce9997..9f6ea2b3 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -1056,7 +1056,9 @@ BOOST_AUTO_TEST_CASE(modifier_overrides_function)
contract A { modifier mod(uint a) { _; } }
contract B is A { function mod(uint a) { } }
)";
- CHECK_ERROR(text, DeclarationError, "");
+ // Error: Identifier already declared.
+ // Error: Override changes modifier to function.
+ CHECK_ERROR_ALLOW_MULTI(text, DeclarationError, "");
}
BOOST_AUTO_TEST_CASE(function_overrides_modifier)
@@ -1065,7 +1067,9 @@ BOOST_AUTO_TEST_CASE(function_overrides_modifier)
contract A { function mod(uint a) { } }
contract B is A { modifier mod(uint a) { _; } }
)";
- CHECK_ERROR(text, DeclarationError, "");
+ // Error: Identifier already declared.
+ // Error: Override changes function to modifier.
+ CHECK_ERROR_ALLOW_MULTI(text, DeclarationError, "");
}
BOOST_AUTO_TEST_CASE(modifier_returns_value)