diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-29 01:15:41 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-09-13 18:40:57 +0800 |
commit | fd1f8ab38ba7f2bb04e67a44ea5e947eddcf9b13 (patch) | |
tree | f26a3d511fb37abc12b67070582acc20cac3d156 /test | |
parent | 88946f9f03625fab345572c66b33ee3e05a07159 (diff) | |
download | dexon-solidity-fd1f8ab38ba7f2bb04e67a44ea5e947eddcf9b13.tar.gz dexon-solidity-fd1f8ab38ba7f2bb04e67a44ea5e947eddcf9b13.tar.zst dexon-solidity-fd1f8ab38ba7f2bb04e67a44ea5e947eddcf9b13.zip |
Rename .sig to .selector on function types
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 6 | ||||
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 22 |
2 files changed, 14 insertions, 14 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index f3d0fde3..661d184a 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -10056,16 +10056,16 @@ BOOST_AUTO_TEST_CASE(function_types_sig) char const* sourceCode = R"( contract C { function f() returns (bytes4) { - return this.f.sig; + return this.f.selector; } function g() returns (bytes4) { function () external returns (bytes4) fun = this.f; - return fun.sig; + return fun.selector; } function h() returns (bytes4) { function () external returns (bytes4) fun = this.f; var funvar = fun; - return funvar.sig; + return funvar.selector; } } )"; diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 6576634f..9f33c5b3 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -6290,34 +6290,34 @@ BOOST_AUTO_TEST_CASE(function_types_sig) char const* text = R"( contract C { function f() returns (bytes4) { - return f.sig; + return f.selector; } } )"; - CHECK_ERROR(text, TypeError, "Member \"sig\" not found"); + CHECK_ERROR(text, TypeError, "Member \"selector\" not found"); text = R"( contract C { function g() internal { } function f() returns (bytes4) { - return g.sig; + return g.selector; } } )"; - CHECK_ERROR(text, TypeError, "Member \"sig\" not found"); + CHECK_ERROR(text, TypeError, "Member \"selector\" not found"); text = R"( contract C { function f() returns (bytes4) { function () g; - return g.sig; + return g.selector; } } )"; - CHECK_ERROR(text, TypeError, "Member \"sig\" not found"); + CHECK_ERROR(text, TypeError, "Member \"selector\" not found"); text = R"( contract C { function f() returns (bytes4) { - return this.f.sig; + return this.f.selector; } } )"; @@ -6325,7 +6325,7 @@ BOOST_AUTO_TEST_CASE(function_types_sig) text = R"( contract C { function f() external returns (bytes4) { - return this.f.sig; + return this.f.selector; } } )"; @@ -6336,7 +6336,7 @@ BOOST_AUTO_TEST_CASE(function_types_sig) } function f() external returns (bytes4) { var g = this.h; - return g.sig; + return g.selector; } } )"; @@ -6347,7 +6347,7 @@ BOOST_AUTO_TEST_CASE(function_types_sig) } function f() external returns (bytes4) { function () external g = this.h; - return g.sig; + return g.selector; } } )"; @@ -6359,7 +6359,7 @@ BOOST_AUTO_TEST_CASE(function_types_sig) function f() external returns (bytes4) { function () external g = this.h; var i = g; - return i.sig; + return i.selector; } } )"; |