aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-11-24 06:57:17 +0800
committerchriseth <c@ethdev.com>2015-11-26 22:37:55 +0800
commitb47d5932528357939ee29758a8b8027c90bdb1e5 (patch)
treea32526db014b5a654e193660e883e97ab437aa95 /test/libsolidity
parent86495dfc57dde9b825ffd8c219ea809446e978f9 (diff)
downloaddexon-solidity-b47d5932528357939ee29758a8b8027c90bdb1e5.tar.gz
dexon-solidity-b47d5932528357939ee29758a8b8027c90bdb1e5.tar.zst
dexon-solidity-b47d5932528357939ee29758a8b8027c90bdb1e5.zip
Do not store elements of a contract by AST node type.
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityParser.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp
index beb71942..b494a1aa 100644
--- a/test/libsolidity/SolidityParser.cpp
+++ b/test/libsolidity/SolidityParser.cpp
@@ -73,7 +73,7 @@ bool successParse(std::string const& _source)
}
void checkFunctionNatspec(
- ASTPointer<FunctionDefinition> _function,
+ FunctionDefinition const* _function,
std::string const& _expectedDoc
)
{
@@ -193,7 +193,7 @@ BOOST_AUTO_TEST_CASE(function_natspec_documentation)
BOOST_CHECK(successParse(text));
ErrorList e;
ASTPointer<ContractDefinition> contract = parseText(text, e);
- ASTPointer<FunctionDefinition> function;
+ FunctionDefinition const* function = nullptr;
ErrorList errors;
auto functions = parseText(text, errors)->definedFunctions();
@@ -204,7 +204,7 @@ BOOST_AUTO_TEST_CASE(function_natspec_documentation)
BOOST_AUTO_TEST_CASE(function_normal_comments)
{
ASTPointer<ContractDefinition> contract;
- ASTPointer<FunctionDefinition> function;
+ FunctionDefinition const* function = nullptr;
char const* text = "contract test {\n"
" uint256 stateVar;\n"
" // We won't see this comment\n"
@@ -221,7 +221,7 @@ BOOST_AUTO_TEST_CASE(function_normal_comments)
BOOST_AUTO_TEST_CASE(multiple_functions_natspec_documentation)
{
ASTPointer<ContractDefinition> contract;
- ASTPointer<FunctionDefinition> function;
+ FunctionDefinition const* function = nullptr;
char const* text = "contract test {\n"
" uint256 stateVar;\n"
" /// This is test function 1\n"
@@ -254,7 +254,7 @@ BOOST_AUTO_TEST_CASE(multiple_functions_natspec_documentation)
BOOST_AUTO_TEST_CASE(multiline_function_documentation)
{
ASTPointer<ContractDefinition> contract;
- ASTPointer<FunctionDefinition> function;
+ FunctionDefinition const* function = nullptr;
char const* text = "contract test {\n"
" uint256 stateVar;\n"
" /// This is a test function\n"
@@ -272,7 +272,7 @@ BOOST_AUTO_TEST_CASE(multiline_function_documentation)
BOOST_AUTO_TEST_CASE(natspec_comment_in_function_body)
{
ASTPointer<ContractDefinition> contract;
- ASTPointer<FunctionDefinition> function;
+ FunctionDefinition const* function = nullptr;
char const* text = "contract test {\n"
" /// fun1 description\n"
" function fun1(uint256 a) {\n"
@@ -301,7 +301,7 @@ BOOST_AUTO_TEST_CASE(natspec_comment_in_function_body)
BOOST_AUTO_TEST_CASE(natspec_docstring_between_keyword_and_signature)
{
ASTPointer<ContractDefinition> contract;
- ASTPointer<FunctionDefinition> function;
+ FunctionDefinition const* function = nullptr;
char const* text = "contract test {\n"
" uint256 stateVar;\n"
" function ///I am in the wrong place \n"
@@ -325,7 +325,7 @@ BOOST_AUTO_TEST_CASE(natspec_docstring_between_keyword_and_signature)
BOOST_AUTO_TEST_CASE(natspec_docstring_after_signature)
{
ASTPointer<ContractDefinition> contract;
- ASTPointer<FunctionDefinition> function;
+ FunctionDefinition const* function = nullptr;
char const* text = "contract test {\n"
" uint256 stateVar;\n"
" function fun1(uint256 a) {\n"