diff options
author | Alex Sinyagin <sinyagin.alexander@gmail.com> | 2016-08-18 23:38:20 +0800 |
---|---|---|
committer | Alex Sinyagin <sinyagin.alexander@gmail.com> | 2016-08-18 23:38:20 +0800 |
commit | 4b9eb299d023989873528e6e52fdc8925d3fcda9 (patch) | |
tree | 508582ed481c9c9cfb5e91baf7066dd746d7c1e4 /test/libsolidity/ASTJSON.cpp | |
parent | 4387d8bbe3096864da6db478006493e491e8eda6 (diff) | |
download | dexon-solidity-4b9eb299d023989873528e6e52fdc8925d3fcda9.tar.gz dexon-solidity-4b9eb299d023989873528e6e52fdc8925d3fcda9.tar.zst dexon-solidity-4b9eb299d023989873528e6e52fdc8925d3fcda9.zip |
Rename root AST JSON node to SourceUnit
Diffstat (limited to 'test/libsolidity/ASTJSON.cpp')
-rw-r--r-- | test/libsolidity/ASTJSON.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/libsolidity/ASTJSON.cpp b/test/libsolidity/ASTJSON.cpp index 64624a2d..ec60b668 100644 --- a/test/libsolidity/ASTJSON.cpp +++ b/test/libsolidity/ASTJSON.cpp @@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE(smoke_test) map<string, unsigned> sourceIndices; sourceIndices["a"] = 1; Json::Value astJson = ASTJsonConverter(c.ast("a"), sourceIndices).json(); - BOOST_CHECK_EQUAL(astJson["name"], "root"); + BOOST_CHECK_EQUAL(astJson["name"], "SourceUnit"); } BOOST_AUTO_TEST_CASE(source_location) @@ -56,7 +56,7 @@ BOOST_AUTO_TEST_CASE(source_location) map<string, unsigned> sourceIndices; sourceIndices["a"] = 1; Json::Value astJson = ASTJsonConverter(c.ast("a"), sourceIndices).json(); - BOOST_CHECK_EQUAL(astJson["name"], "root"); + BOOST_CHECK_EQUAL(astJson["name"], "SourceUnit"); BOOST_CHECK_EQUAL(astJson["children"][0]["name"], "ContractDefinition"); BOOST_CHECK_EQUAL(astJson["children"][0]["children"][0]["name"], "FunctionDefinition"); BOOST_CHECK_EQUAL(astJson["children"][0]["children"][0]["src"], "13:32:1"); |