mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add new libsolc entry points (solidity_license/version/compile)
This commit is contained in:
@@ -201,6 +201,26 @@ BOOST_AUTO_TEST_CASE(standard_compilation)
|
||||
BOOST_CHECK(result.isMember("contracts"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(new_api)
|
||||
{
|
||||
char const* input = R"(
|
||||
{
|
||||
"language": "Solidity",
|
||||
"sources": {
|
||||
"fileA": {
|
||||
"content": "contract A { }"
|
||||
}
|
||||
}
|
||||
}
|
||||
)";
|
||||
BOOST_CHECK_EQUAL(string(version()), string(solidity_version()));
|
||||
BOOST_CHECK_EQUAL(string(license()), string(solidity_license()));
|
||||
BOOST_CHECK_EQUAL(
|
||||
string(compileStandard(input, nullptr)),
|
||||
string(solidity_compile(input, nullptr))
|
||||
);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user