diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-09-22 23:48:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-22 23:48:37 +0800 |
commit | 1be33872ba773a1bee0b42c1c4aed751a081ca53 (patch) | |
tree | 008494a0618051e4d71a2e28b94e436dc34ece6a /test/libsolidity/SolidityParser.cpp | |
parent | ab8ce58a3e522cfe8d0a36132e5e0b305d4ca052 (diff) | |
parent | a844bbda48564d65033522a64cef30bff5dea973 (diff) | |
download | dexon-solidity-1be33872ba773a1bee0b42c1c4aed751a081ca53.tar dexon-solidity-1be33872ba773a1bee0b42c1c4aed751a081ca53.tar.gz dexon-solidity-1be33872ba773a1bee0b42c1c4aed751a081ca53.tar.bz2 dexon-solidity-1be33872ba773a1bee0b42c1c4aed751a081ca53.tar.lz dexon-solidity-1be33872ba773a1bee0b42c1c4aed751a081ca53.tar.xz dexon-solidity-1be33872ba773a1bee0b42c1c4aed751a081ca53.tar.zst dexon-solidity-1be33872ba773a1bee0b42c1c4aed751a081ca53.zip |
Merge pull request #2935 from ethereum/cleanupTestHelpers
Cleanup test helper macros.
Diffstat (limited to 'test/libsolidity/SolidityParser.cpp')
-rw-r--r-- | test/libsolidity/SolidityParser.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index 60ca03c9..a8698d13 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -250,7 +250,7 @@ BOOST_AUTO_TEST_CASE(function_natspec_documentation) FunctionDefinition const* function = nullptr; auto functions = contract->definedFunctions(); - ETH_TEST_REQUIRE_NO_THROW(function = functions.at(0), "Failed to retrieve function"); + BOOST_REQUIRE_MESSAGE(function = functions.at(0), "Failed to retrieve function"); checkFunctionNatspec(function, "This is a test function"); } @@ -268,7 +268,7 @@ BOOST_AUTO_TEST_CASE(function_normal_comments) ErrorList errors; ASTPointer<ContractDefinition> contract = parseText(text, errors); auto functions = contract->definedFunctions(); - ETH_TEST_REQUIRE_NO_THROW(function = functions.at(0), "Failed to retrieve function"); + BOOST_REQUIRE_MESSAGE(function = functions.at(0), "Failed to retrieve function"); BOOST_CHECK_MESSAGE(function->documentation() == nullptr, "Should not have gotten a Natspecc comment for this function"); } @@ -294,17 +294,17 @@ BOOST_AUTO_TEST_CASE(multiple_functions_natspec_documentation) ASTPointer<ContractDefinition> contract = parseText(text, errors); auto functions = contract->definedFunctions(); - ETH_TEST_REQUIRE_NO_THROW(function = functions.at(0), "Failed to retrieve function"); + BOOST_REQUIRE_MESSAGE(function = functions.at(0), "Failed to retrieve function"); checkFunctionNatspec(function, "This is test function 1"); - ETH_TEST_REQUIRE_NO_THROW(function = functions.at(1), "Failed to retrieve function"); + BOOST_REQUIRE_MESSAGE(function = functions.at(1), "Failed to retrieve function"); checkFunctionNatspec(function, "This is test function 2"); - ETH_TEST_REQUIRE_NO_THROW(function = functions.at(2), "Failed to retrieve function"); + BOOST_REQUIRE_MESSAGE(function = functions.at(2), "Failed to retrieve function"); BOOST_CHECK_MESSAGE(function->documentation() == nullptr, "Should not have gotten natspec comment for functionName3()"); - ETH_TEST_REQUIRE_NO_THROW(function = functions.at(3), "Failed to retrieve function"); + BOOST_REQUIRE_MESSAGE(function = functions.at(3), "Failed to retrieve function"); checkFunctionNatspec(function, "This is test function 4"); } @@ -323,7 +323,7 @@ BOOST_AUTO_TEST_CASE(multiline_function_documentation) ErrorList errors; ASTPointer<ContractDefinition> contract = parseText(text, errors); auto functions = contract->definedFunctions(); - ETH_TEST_REQUIRE_NO_THROW(function = functions.at(0), "Failed to retrieve function"); + BOOST_REQUIRE_MESSAGE(function = functions.at(0), "Failed to retrieve function"); checkFunctionNatspec(function, "This is a test function\n" " and it has 2 lines"); } @@ -351,10 +351,10 @@ BOOST_AUTO_TEST_CASE(natspec_comment_in_function_body) ASTPointer<ContractDefinition> contract = parseText(text, errors); auto functions = contract->definedFunctions(); - ETH_TEST_REQUIRE_NO_THROW(function = functions.at(0), "Failed to retrieve function"); + BOOST_REQUIRE_MESSAGE(function = functions.at(0), "Failed to retrieve function"); checkFunctionNatspec(function, "fun1 description"); - ETH_TEST_REQUIRE_NO_THROW(function = functions.at(1), "Failed to retrieve function"); + BOOST_REQUIRE_MESSAGE(function = functions.at(1), "Failed to retrieve function"); checkFunctionNatspec(function, "This is a test function\n" " and it has 2 lines"); } @@ -380,7 +380,7 @@ BOOST_AUTO_TEST_CASE(natspec_docstring_between_keyword_and_signature) ASTPointer<ContractDefinition> contract = parseText(text, errors); auto functions = contract->definedFunctions(); - ETH_TEST_REQUIRE_NO_THROW(function = functions.at(0), "Failed to retrieve function"); + BOOST_REQUIRE_MESSAGE(function = functions.at(0), "Failed to retrieve function"); BOOST_CHECK_MESSAGE(!function->documentation(), "Shouldn't get natspec docstring for this function"); } @@ -406,7 +406,7 @@ BOOST_AUTO_TEST_CASE(natspec_docstring_after_signature) ASTPointer<ContractDefinition> contract = parseText(text, errors); auto functions = contract->definedFunctions(); - ETH_TEST_REQUIRE_NO_THROW(function = functions.at(0), "Failed to retrieve function"); + BOOST_REQUIRE_MESSAGE(function = functions.at(0), "Failed to retrieve function"); BOOST_CHECK_MESSAGE(!function->documentation(), "Shouldn't get natspec docstring for this function"); } |