aboutsummaryrefslogtreecommitdiffstats
path: root/SolidityParser.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2014-12-19 01:16:43 +0800
committerLefteris Karapetsas <lefteris@refu.co>2014-12-19 01:16:43 +0800
commitda29d945e21b0519b75b8c06107d3b903427d051 (patch)
tree2cb5f887a97fe88c2ed64c5f9941bb65c83efd7b /SolidityParser.cpp
parent89f5b8669299ffb943a7c2fb9834e0dcb52d5572 (diff)
downloaddexon-solidity-da29d945e21b0519b75b8c06107d3b903427d051.tar.gz
dexon-solidity-da29d945e21b0519b75b8c06107d3b903427d051.tar.zst
dexon-solidity-da29d945e21b0519b75b8c06107d3b903427d051.zip
updating solidity parser natspec tests to comply with recent changes
Diffstat (limited to 'SolidityParser.cpp')
-rw-r--r--SolidityParser.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/SolidityParser.cpp b/SolidityParser.cpp
index f978cdd9..c14c0512 100644
--- a/SolidityParser.cpp
+++ b/SolidityParser.cpp
@@ -128,7 +128,7 @@ BOOST_AUTO_TEST_CASE(function_natspec_documentation)
BOOST_REQUIRE_NO_THROW(contract = parseText(text));
auto functions = contract->getDefinedFunctions();
BOOST_REQUIRE_NO_THROW(function = functions.at(0));
- BOOST_CHECK_EQUAL(*function->getDocumentation(), " This is a test function");
+ BOOST_CHECK_EQUAL(*function->getDocumentation(), "This is a test function");
}
BOOST_AUTO_TEST_CASE(function_normal_comments)
@@ -166,17 +166,17 @@ BOOST_AUTO_TEST_CASE(multiple_functions_natspec_documentation)
auto functions = contract->getDefinedFunctions();
BOOST_REQUIRE_NO_THROW(function = functions.at(0));
- BOOST_CHECK_EQUAL(*function->getDocumentation(), " This is test function 1");
+ BOOST_CHECK_EQUAL(*function->getDocumentation(), "This is test function 1");
BOOST_REQUIRE_NO_THROW(function = functions.at(1));
- BOOST_CHECK_EQUAL(*function->getDocumentation(), " This is test function 2");
+ BOOST_CHECK_EQUAL(*function->getDocumentation(), "This is test function 2");
BOOST_REQUIRE_NO_THROW(function = functions.at(2));
BOOST_CHECK_MESSAGE(function->getDocumentation() == nullptr,
"Should not have gotten natspec comment for functionName3()");
BOOST_REQUIRE_NO_THROW(function = functions.at(3));
- BOOST_CHECK_EQUAL(*function->getDocumentation(), " This is test function 4");
+ BOOST_CHECK_EQUAL(*function->getDocumentation(), "This is test function 4");
}
BOOST_AUTO_TEST_CASE(multiline_function_documentation)
@@ -194,7 +194,7 @@ BOOST_AUTO_TEST_CASE(multiline_function_documentation)
BOOST_REQUIRE_NO_THROW(function = functions.at(0));
BOOST_CHECK_EQUAL(*function->getDocumentation(),
- " This is a test function\n"
+ "This is a test function\n"
" and it has 2 lines");
}
@@ -220,11 +220,11 @@ BOOST_AUTO_TEST_CASE(natspec_comment_in_function_body)
auto functions = contract->getDefinedFunctions();
BOOST_REQUIRE_NO_THROW(function = functions.at(0));
- BOOST_CHECK_EQUAL(*function->getDocumentation(), " fun1 description");
+ BOOST_CHECK_EQUAL(*function->getDocumentation(), "fun1 description");
BOOST_REQUIRE_NO_THROW(function = functions.at(1));
BOOST_CHECK_EQUAL(*function->getDocumentation(),
- " This is a test function\n"
+ "This is a test function\n"
" and it has 2 lines");
}