diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-20 07:34:54 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-30 01:30:37 +0800 |
commit | 328554a4f91bbd77fc9a901e0bde66eb16d988ea (patch) | |
tree | 1d6365c17cc0ede81bb951e330ba08c1ca31aed3 /test | |
parent | 7d525620d88d3539b5c0f85ee2c5ba49506e30bc (diff) | |
download | dexon-solidity-328554a4f91bbd77fc9a901e0bde66eb16d988ea.tar.gz dexon-solidity-328554a4f91bbd77fc9a901e0bde66eb16d988ea.tar.zst dexon-solidity-328554a4f91bbd77fc9a901e0bde66eb16d988ea.zip |
Add new libsolc entry points (solidity_license/version/compile)
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/LibSolc.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/libsolidity/LibSolc.cpp b/test/libsolidity/LibSolc.cpp index f42d374f..9d5ffa27 100644 --- a/test/libsolidity/LibSolc.cpp +++ b/test/libsolidity/LibSolc.cpp @@ -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() } |