aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp12
-rw-r--r--test/libsolidity/SolidityParser.cpp2
2 files changed, 5 insertions, 9 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index 0b5a86d7..5002cc4f 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -109,13 +109,9 @@ ASTPointer<SourceUnit> parseAndAnalyse(string const& _source)
return sourceAndError.first;
}
-bool success(std::string const& _source)
+bool success(string const& _source)
{
- auto sourceAndError = parseAnalyseAndReturnError(_source);
-
- if (sourceAndError.second && *sourceAndError.second == Error::Type::TypeError)
- return false;
- return true;
+ return !parseAnalyseAndReturnError(_source).second;
}
Error::Type expectError(std::string const& _source, bool _warning = false)
@@ -2472,7 +2468,7 @@ BOOST_AUTO_TEST_CASE(tuples)
}
}
)";
- BOOST_CHECK_NO_THROW(parseAndAnalyse(text));
+ BOOST_CHECK(success(text));
}
BOOST_AUTO_TEST_CASE(tuples_empty_components)
@@ -2484,7 +2480,7 @@ BOOST_AUTO_TEST_CASE(tuples_empty_components)
}
}
)";
- SOLIDITY_CHECK_ERROR_TYPE(parseAndAnalyseReturnError(text), TypeError);
+ BOOST_CHECK(expectError(text) == Error::Type::TypeError);
}
BOOST_AUTO_TEST_CASE(multi_variable_declaration_wildcards_fail_5)
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp
index 9aa4a8ef..c181ae7e 100644
--- a/test/libsolidity/SolidityParser.cpp
+++ b/test/libsolidity/SolidityParser.cpp
@@ -1012,7 +1012,7 @@ BOOST_AUTO_TEST_CASE(tuples)
}
}
)";
- BOOST_CHECK_NO_THROW(parseText(text));
+ BOOST_CHECK(successParse(text));
}
BOOST_AUTO_TEST_SUITE_END()