aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-02-07 00:14:43 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-02-24 08:18:18 +0800
commitba437ef31a95f40f510a475e8b329f061e929b90 (patch)
treeed93cd4ab856a1013c6ed2daf0a5536e1ffac18d /test/libsolidity
parent16e48219d3071038bf7f696f234b50f6370a1171 (diff)
downloaddexon-solidity-ba437ef31a95f40f510a475e8b329f061e929b90.tar.gz
dexon-solidity-ba437ef31a95f40f510a475e8b329f061e929b90.tar.zst
dexon-solidity-ba437ef31a95f40f510a475e8b329f061e929b90.zip
Add type checking test for address methods
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index a1ebc300..bb274614 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -5108,6 +5108,24 @@ BOOST_AUTO_TEST_CASE(early_exit_on_fatal_errors)
CHECK_ERROR(text, DeclarationError, "Identifier not found or not unique");
}
+BOOST_AUTO_TEST_CASE(address_methods)
+{
+ char const* text = R"(
+ contract C {
+ function f() {
+ address addr;
+ uint balance = addr.balance;
+ bool callRet = addr.call();
+ bool callcodeRet = addr.callcode();
+ bool delegatecallRet = addr.delegatecall();
+ bool sendRet = addr.send(1);
+ addr.transfer(1);
+ }
+ }
+ )";
+ CHECK_SUCCESS(text);
+}
+
BOOST_AUTO_TEST_SUITE_END()
}