mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
testsuite adjustment
This commit is contained in:
parent
e3583d04f7
commit
6316a76ab9
@ -139,13 +139,13 @@ private:
|
||||
return _node.id();
|
||||
}
|
||||
template<class Container>
|
||||
Json::Value getContainerIds(Container container)
|
||||
Json::Value getContainerIds(Container const& container)
|
||||
{
|
||||
Json::Value tmp(Json::arrayValue);
|
||||
for (auto it = container.begin(); it != container.end(); ++it)
|
||||
for (auto const& element: container)
|
||||
{
|
||||
solAssert(*it, "");
|
||||
tmp.append(nodeId(**it));
|
||||
solAssert(element, "");
|
||||
tmp.append(nodeId(*element));
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
@ -90,10 +90,12 @@ BOOST_AUTO_TEST_CASE(basic_compilation)
|
||||
BOOST_CHECK(result["sources"]["fileA"].isObject());
|
||||
BOOST_CHECK(result["sources"]["fileA"]["AST"].isObject());
|
||||
BOOST_CHECK(dev::jsonCompactPrint(result["sources"]["fileA"]["AST"]) ==
|
||||
"{\"children\":[{\"attributes\":{\"fullyImplemented\":true,\"isLibrary\":false,\"linearizedBaseContracts\":[1],"
|
||||
"\"name\":\"A\"},\"children\":[],\"id\":1,\"name\":\"ContractDefinition\",\"src\":\"0:14:0\"}],\"name\":\"SourceUnit\"}");
|
||||
"{\"attributes\":{\"absolutePath\":\"fileA\",\"exportedSymbols\":{\"A\":[1]}},"
|
||||
"\"children\":[{\"attributes\":{\"baseContracts\":[null],\"contractDependencies\":[null],"
|
||||
"\"contractKind\":\"contract\",\"fullyImplemented\":true,\"linearizedBaseContracts\":[1],"
|
||||
"\"name\":\"A\",\"nodes\":[null],\"scope\":2},\"id\":1,\"name\":\"ContractDefinition\","
|
||||
"\"src\":\"0:14:0\"}],\"id\":2,\"name\":\"SourceUnit\",\"src\":\"0:14:0\"}");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
@ -216,8 +216,8 @@ BOOST_AUTO_TEST_CASE(basic_compilation)
|
||||
BOOST_CHECK(result["sources"]["fileA"]["legacyAST"].isObject());
|
||||
BOOST_CHECK(dev::jsonCompactPrint(result["sources"]["fileA"]["legacyAST"]) ==
|
||||
"{\"attributes\":{\"absolutePath\":\"fileA\",\"exportedSymbols\":{\"A\":[1]}},\"children\":"
|
||||
"[{\"attributes\":{\"baseContracts\":[null],\"contractDependencies\":[null],\"fullyImplemented\":true,"
|
||||
"\"isLibrary\":false,\"linearizedBaseContracts\":[1],\"name\":\"A\",\"nodes\":[null],\"scope\":2},"
|
||||
"[{\"attributes\":{\"baseContracts\":[null],\"contractDependencies\":[null],\"contractKind\":\"contract\","
|
||||
"\"fullyImplemented\":true,\"linearizedBaseContracts\":[1],\"name\":\"A\",\"nodes\":[null],\"scope\":2},"
|
||||
"\"id\":1,\"name\":\"ContractDefinition\",\"src\":\"0:14:0\"}],\"id\":2,\"name\":\"SourceUnit\",\"src\":\"0:14:0\"}");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user