aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/LibSolc.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-06-20 07:34:54 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-06-30 01:30:37 +0800
commit328554a4f91bbd77fc9a901e0bde66eb16d988ea (patch)
tree1d6365c17cc0ede81bb951e330ba08c1ca31aed3 /test/libsolidity/LibSolc.cpp
parent7d525620d88d3539b5c0f85ee2c5ba49506e30bc (diff)
downloaddexon-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/libsolidity/LibSolc.cpp')
-rw-r--r--test/libsolidity/LibSolc.cpp20
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()
}