Skip to content

Fix Typographical Errors in Solidity Test Files #15873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 16 commits into from
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR seems to add 3 new tests now. Was it meant to be a rename? If so, you probably forgot to commit the removal of the file with the old name.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
==== Source: s1.sol ====
function f(uint24) pure returns (uint) { return 24; }
function g(bool) pure returns (bool) { return true; }
==== Source: s2.sol ====
import {f as g, g as g} from "s1.sol";
contract C {
function foo() public pure returns (uint, bool) {
return (g(2), g(false));
}
}
// ----
// foo() -> 24, true
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
==== Source: s1.sol ====
function f(uint) pure returns (uint) { return 24; }
function g() pure returns (bool) { return true; }
==== Source: s2.sol ====
import {f as g, g as g} from "s1.sol";
contract C {
function foo() public pure returns (uint, bool) {
return (g(2), g());
}
}
// ----
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
library L {
struct S { int a; }
enum State { idle, running, blocked }
}

contract D {
struct X { uint b; }
enum Color { red, green, blue }
}

contract C {
function f() pure public {
abi.decode("", (L.S));
abi.decode("", (L.State));
abi.decode("", (D.X));
abi.decode("", (D.Color));
}
}
// ----
2 changes: 1 addition & 1 deletion test/libsolidity/util/TestFileParserTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ BOOST_AUTO_TEST_CASE(call_arguments_tuple_invalid_empty)
BOOST_REQUIRE_THROW(parse(source), TestParserError);
}

BOOST_AUTO_TEST_CASE(call_arguments_tuple_invalid_parantheses)
BOOST_AUTO_TEST_CASE(call_arguments_tuple_invalid_parentheses)
{
char const* source = R"(
// f((uint8,() -> FAILURE
Expand Down