diff options
Diffstat (limited to 'test/libsolidity/ASTJSON.cpp')
-rw-r--r-- | test/libsolidity/ASTJSON.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/libsolidity/ASTJSON.cpp b/test/libsolidity/ASTJSON.cpp index c37f3542..a0fc5dd7 100644 --- a/test/libsolidity/ASTJSON.cpp +++ b/test/libsolidity/ASTJSON.cpp @@ -128,7 +128,7 @@ BOOST_AUTO_TEST_CASE(enum_value) BOOST_AUTO_TEST_CASE(modifier_definition) { CompilerStack c; - c.addSource("a", "contract C { modifier M(uint i) { _ } function F() M(1) {} }"); + c.addSource("a", "contract C { modifier M(uint i) { _; } function F() M(1) {} }"); c.parse(); map<string, unsigned> sourceIndices; sourceIndices["a"] = 1; @@ -136,20 +136,20 @@ BOOST_AUTO_TEST_CASE(modifier_definition) Json::Value modifier = astJson["children"][0]["children"][0]; BOOST_CHECK_EQUAL(modifier["name"], "ModifierDefinition"); BOOST_CHECK_EQUAL(modifier["attributes"]["name"], "M"); - BOOST_CHECK_EQUAL(modifier["src"], "13:24:1"); + BOOST_CHECK_EQUAL(modifier["src"], "13:25:1"); } BOOST_AUTO_TEST_CASE(modifier_invocation) { CompilerStack c; - c.addSource("a", "contract C { modifier M(uint i) { _ } function F() M(1) {} }"); + c.addSource("a", "contract C { modifier M(uint i) { _; } function F() M(1) {} }"); c.parse(); map<string, unsigned> sourceIndices; sourceIndices["a"] = 1; Json::Value astJson = ASTJsonConverter(c.ast("a"), sourceIndices).json(); Json::Value modifier = astJson["children"][0]["children"][1]["children"][2]; BOOST_CHECK_EQUAL(modifier["name"], "ModifierInvocation"); - BOOST_CHECK_EQUAL(modifier["src"], "51:4:1"); + BOOST_CHECK_EQUAL(modifier["src"], "52:4:1"); BOOST_CHECK_EQUAL(modifier["children"][0]["attributes"]["type"], "modifier (uint256)"); BOOST_CHECK_EQUAL(modifier["children"][0]["attributes"]["value"], "M"); BOOST_CHECK_EQUAL(modifier["children"][1]["attributes"]["value"], "1"); @@ -185,7 +185,7 @@ BOOST_AUTO_TEST_CASE(array_type_name) BOOST_AUTO_TEST_CASE(placeholder_statement) { CompilerStack c; - c.addSource("a", "contract C { modifier M { _ } }"); + c.addSource("a", "contract C { modifier M { _; } }"); c.parse(); map<string, unsigned> sourceIndices; sourceIndices["a"] = 1; |