aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/StandardCompiler.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/libsolidity/StandardCompiler.cpp b/test/libsolidity/StandardCompiler.cpp
index 553f1d1f..9b53e841 100644
--- a/test/libsolidity/StandardCompiler.cpp
+++ b/test/libsolidity/StandardCompiler.cpp
@@ -255,7 +255,12 @@ BOOST_AUTO_TEST_CASE(basic_compilation)
"{\"creation\":{\"codeDepositCost\":\"10200\",\"executionCost\":\"62\",\"totalCost\":\"10262\"}}");
BOOST_CHECK(contract["metadata"].isString());
BOOST_CHECK(isValidMetadata(contract["metadata"].asString()));
- /// @TODO check "sources" (ast)
+ BOOST_CHECK(result["sources"].isObject());
+ BOOST_CHECK(result["sources"]["fileA"].isObject());
+ BOOST_CHECK(result["sources"]["fileA"]["legacyAST"].isObject());
+ BOOST_CHECK(dev::jsonCompactPrint(result["sources"]["fileA"]["legacyAST"]) ==
+ "{\"children\":[{\"attributes\":{\"fullyImplemented\":true,\"isLibrary\":false,\"linearizedBaseContracts\":[1],"
+ "\"name\":\"A\"},\"children\":[],\"id\":1,\"name\":\"ContractDefinition\",\"src\":\"0:14:0\"}],\"name\":\"SourceUnit\"}");
}
BOOST_AUTO_TEST_SUITE_END()