mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Minor style tweaks in test TestFileParser (names and wrapping)
This commit is contained in:
parent
d07c85db67
commit
752483b92f
@ -726,7 +726,7 @@ char TestFileParser::Scanner::scanHexPart()
|
||||
return static_cast<char>(value);
|
||||
}
|
||||
|
||||
bool TestFileParser::isBuiltinFunction(std::string const& signature)
|
||||
bool TestFileParser::isBuiltinFunction(std::string const& _signature)
|
||||
{
|
||||
return m_builtins.count(signature) > 0;
|
||||
return m_builtins.count(_signature) > 0;
|
||||
}
|
||||
|
@ -52,7 +52,10 @@ class TestFileParser
|
||||
public:
|
||||
/// Constructor that takes an input stream \param _stream to operate on
|
||||
/// and creates the internal scanner.
|
||||
explicit TestFileParser(std::istream& _stream, std::map<std::string, Builtin> const& _builtins): m_scanner(_stream), m_builtins(_builtins) {}
|
||||
explicit TestFileParser(std::istream& _stream, std::map<std::string, Builtin> const& _builtins):
|
||||
m_scanner(_stream),
|
||||
m_builtins(_builtins)
|
||||
{}
|
||||
|
||||
/// Parses function calls blockwise and returns a list of function calls found.
|
||||
/// Throws an exception if a function call cannot be parsed because of its
|
||||
@ -179,7 +182,7 @@ private:
|
||||
|
||||
/// Checks whether a builtin function with the given signature exist.
|
||||
/// @returns true, if builtin found, false otherwise
|
||||
bool isBuiltinFunction(std::string const& signature);
|
||||
bool isBuiltinFunction(std::string const& _signature);
|
||||
|
||||
/// A scanner instance
|
||||
Scanner m_scanner;
|
||||
|
@ -45,8 +45,7 @@ namespace
|
||||
vector<FunctionCall> parse(string const& _source)
|
||||
{
|
||||
istringstream stream{_source, ios_base::out};
|
||||
TestFileParser parser{stream, {}};
|
||||
return parser.parseFunctionCalls(0);
|
||||
return TestFileParser{stream, {}}.parseFunctionCalls(0);
|
||||
}
|
||||
|
||||
void testFunctionCall(
|
||||
@ -99,7 +98,7 @@ BOOST_AUTO_TEST_CASE(smoke_test)
|
||||
BOOST_REQUIRE_EQUAL(parse(source).size(), 0);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(call_succees)
|
||||
BOOST_AUTO_TEST_CASE(call_success)
|
||||
{
|
||||
char const* source = R"(
|
||||
// success() ->
|
||||
|
Loading…
Reference in New Issue
Block a user