Add structs to library interface.

This commit is contained in:
chriseth
2015-10-06 14:20:06 +02:00
parent bf5b387954
commit 44e42bf52e
2 changed files with 31 additions and 7 deletions
+2 -1
View File
@@ -152,7 +152,8 @@ BOOST_AUTO_TEST_CASE(libraries)
}
)";
ContractDefinition const& contract = checkInterface(sourceCode);
set<string> expectedFunctions({"function f(uint256[] x,Lib.Str y,Lib.E z);"});
BOOST_CHECK(contract.isLibrary());
set<string> expectedFunctions({"function f(uint256[] x,Lib.Str storage y,Lib.E z);"});
BOOST_REQUIRE_EQUAL(1, contract.definedFunctions().size());
BOOST_CHECK(expectedFunctions == set<string>({sourcePart(*contract.definedFunctions().at(0))}));
}