diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-27 05:01:35 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-27 05:01:35 +0800 |
commit | 6b05bbbbb42dafdbf38661fd9c2c3c3e88a425a2 (patch) | |
tree | 734cf62327bf53fb1f705a93b6c25de3b0d51e75 /test/libsolidity | |
parent | 4407a13c1730bf9ed4bcaf00c3f72640f6ddb2a7 (diff) | |
download | dexon-solidity-6b05bbbbb42dafdbf38661fd9c2c3c3e88a425a2.tar dexon-solidity-6b05bbbbb42dafdbf38661fd9c2c3c3e88a425a2.tar.gz dexon-solidity-6b05bbbbb42dafdbf38661fd9c2c3c3e88a425a2.tar.bz2 dexon-solidity-6b05bbbbb42dafdbf38661fd9c2c3c3e88a425a2.tar.lz dexon-solidity-6b05bbbbb42dafdbf38661fd9c2c3c3e88a425a2.tar.xz dexon-solidity-6b05bbbbb42dafdbf38661fd9c2c3c3e88a425a2.tar.zst dexon-solidity-6b05bbbbb42dafdbf38661fd9c2c3c3e88a425a2.zip |
Update tests for function type comparison
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 0c56e585..eb1cf0dc 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -571,6 +571,17 @@ BOOST_AUTO_TEST_CASE(comparison_of_function_types) } } )"; + CHECK_ERROR(text, TypeError, "Operator < not compatible"); + text = R"( + contract C { + function f() returns (bool ret) { + return f == f; + } + function g() returns (bool ret) { + return f != f; + } + } + )"; CHECK_SUCCESS(text); } |