aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityABIJSON.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-09-06 16:59:13 +0800
committerchriseth <c@ethdev.com>2016-09-06 16:59:13 +0800
commitdff9633084ebc241d8268c5dbd35a0c5307fd6fc (patch)
tree023c638a4be2f60d2d0e8c7b9391664c0bdf68f1 /test/libsolidity/SolidityABIJSON.cpp
parent384f189a6adffa7b1879bb06ded4453ef5f00dcb (diff)
downloaddexon-solidity-dff9633084ebc241d8268c5dbd35a0c5307fd6fc.tar
dexon-solidity-dff9633084ebc241d8268c5dbd35a0c5307fd6fc.tar.gz
dexon-solidity-dff9633084ebc241d8268c5dbd35a0c5307fd6fc.tar.bz2
dexon-solidity-dff9633084ebc241d8268c5dbd35a0c5307fd6fc.tar.lz
dexon-solidity-dff9633084ebc241d8268c5dbd35a0c5307fd6fc.tar.xz
dexon-solidity-dff9633084ebc241d8268c5dbd35a0c5307fd6fc.tar.zst
dexon-solidity-dff9633084ebc241d8268c5dbd35a0c5307fd6fc.zip
Test and fixes for payable fallback in ABI.
Diffstat (limited to 'test/libsolidity/SolidityABIJSON.cpp')
-rw-r--r--test/libsolidity/SolidityABIJSON.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityABIJSON.cpp b/test/libsolidity/SolidityABIJSON.cpp
index 9ee74d41..185ba3bf 100644
--- a/test/libsolidity/SolidityABIJSON.cpp
+++ b/test/libsolidity/SolidityABIJSON.cpp
@@ -645,6 +645,7 @@ BOOST_AUTO_TEST_CASE(include_fallback_function)
[
{
"constant" : false,
+ "payable": false,
"type" : "fallback"
}
]
@@ -684,6 +685,25 @@ BOOST_AUTO_TEST_CASE(payable_function)
checkInterface(sourceCode, interface);
}
+BOOST_AUTO_TEST_CASE(payable_fallback_unction)
+{
+ char const* sourceCode = R"(
+ contract test {
+ function () payable {}
+ }
+ )";
+
+ char const* interface = R"(
+ [
+ {
+ "constant" : false,
+ "payable": true,
+ "type" : "fallback"
+ }
+ ]
+ )";
+ checkInterface(sourceCode, interface);
+}
BOOST_AUTO_TEST_SUITE_END()