aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authordjudjuu <julfaber@gmail.com>2017-06-07 21:52:44 +0800
committerdjudjuu <julfaber@gmail.com>2017-06-07 21:52:44 +0800
commit83f0e00900a51c03cc7d8c088bbac0c4814a9e49 (patch)
tree27f077cdd4b72ca2a9c824516e60f24853dee3d9 /test
parentebdebc7c12d152bcf9c96274ecf7dea2e46e2541 (diff)
downloaddexon-solidity-83f0e00900a51c03cc7d8c088bbac0c4814a9e49.tar
dexon-solidity-83f0e00900a51c03cc7d8c088bbac0c4814a9e49.tar.gz
dexon-solidity-83f0e00900a51c03cc7d8c088bbac0c4814a9e49.tar.bz2
dexon-solidity-83f0e00900a51c03cc7d8c088bbac0c4814a9e49.tar.lz
dexon-solidity-83f0e00900a51c03cc7d8c088bbac0c4814a9e49.tar.xz
dexon-solidity-83f0e00900a51c03cc7d8c088bbac0c4814a9e49.tar.zst
dexon-solidity-83f0e00900a51c03cc7d8c088bbac0c4814a9e49.zip
tests for non-legacy mode
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/ASTJSON.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/libsolidity/ASTJSON.cpp b/test/libsolidity/ASTJSON.cpp
index 4476f1ed..e9e00b13 100644
--- a/test/libsolidity/ASTJSON.cpp
+++ b/test/libsolidity/ASTJSON.cpp
@@ -247,6 +247,14 @@ BOOST_AUTO_TEST_CASE(documentation)
Json::Value astJsonB = ASTJsonConverter(true, sourceIndices).toJson(c.ast("b"));
Json::Value documentationB = astJsonB["children"][0]["attributes"]["documentation"];
BOOST_CHECK_EQUAL(documentationB, "This contract is empty and has a line-breaking comment.");
+ //same tests for non-legacy mode
+ astJsonA = ASTJsonConverter(false, sourceIndices).toJson(c.ast("a"));
+ documentationA = astJsonA["nodes"][0]["documentation"];
+ BOOST_CHECK_EQUAL(documentationA, "This contract is empty");
+ astJsonB = ASTJsonConverter(false, sourceIndices).toJson(c.ast("b"));
+ documentationB = astJsonB["nodes"][0]["documentation"];
+ BOOST_CHECK_EQUAL(documentationB, "This contract is empty and has a line-breaking comment.");
+
}