diff options
author | chriseth <chris@ethereum.org> | 2018-07-02 22:09:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-02 22:09:59 +0800 |
commit | 08aa7e47e482d1cc7861856a666875f3b1ea7d2b (patch) | |
tree | 0a35b8c72f255eb05481d4f296230c102f080310 /test/contracts/LLL_ERC20.cpp | |
parent | da60fdab37ddd6126e5ba605e7041dc6f26ab5ee (diff) | |
parent | 334c023c7231810f28ca5ea04f14df3f722cea07 (diff) | |
download | dexon-solidity-08aa7e47e482d1cc7861856a666875f3b1ea7d2b.tar dexon-solidity-08aa7e47e482d1cc7861856a666875f3b1ea7d2b.tar.gz dexon-solidity-08aa7e47e482d1cc7861856a666875f3b1ea7d2b.tar.bz2 dexon-solidity-08aa7e47e482d1cc7861856a666875f3b1ea7d2b.tar.lz dexon-solidity-08aa7e47e482d1cc7861856a666875f3b1ea7d2b.tar.xz dexon-solidity-08aa7e47e482d1cc7861856a666875f3b1ea7d2b.tar.zst dexon-solidity-08aa7e47e482d1cc7861856a666875f3b1ea7d2b.zip |
Merge pull request #4305 from ethereum/transactionReceipts
Determine transaction status in RPC sessions.
Diffstat (limited to 'test/contracts/LLL_ERC20.cpp')
-rw-r--r-- | test/contracts/LLL_ERC20.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/contracts/LLL_ERC20.cpp b/test/contracts/LLL_ERC20.cpp index 60b43e4f..89d1c4f0 100644 --- a/test/contracts/LLL_ERC20.cpp +++ b/test/contracts/LLL_ERC20.cpp @@ -400,6 +400,7 @@ protected: BOOST_REQUIRE(errors.empty()); } sendMessage(*s_compiledErc20, true); + BOOST_REQUIRE(m_transactionSuccessful); BOOST_REQUIRE(!m_output.empty()); } @@ -629,18 +630,22 @@ BOOST_AUTO_TEST_CASE(bad_data) // Correct data: transfer(address _to, 1). sendMessage((bytes)fromHex("a9059cbb") + (bytes)fromHex("000000000000000000000000123456789a123456789a123456789a123456789a") + encodeArgs(1), false, 0); + BOOST_CHECK(m_transactionSuccessful); BOOST_CHECK(m_output == SUCCESS); // Too little data (address is truncated by one byte). sendMessage((bytes)fromHex("a9059cbb") + (bytes)fromHex("000000000000000000000000123456789a123456789a123456789a12345678") + encodeArgs(1), false, 0); + BOOST_CHECK(!m_transactionSuccessful); BOOST_CHECK(m_output != SUCCESS); // Too much data (address is extended with a zero byte). sendMessage((bytes)fromHex("a9059cbb") + (bytes)fromHex("000000000000000000000000123456789a123456789a123456789a123456789a00") + encodeArgs(1), false, 0); + BOOST_CHECK(!m_transactionSuccessful); BOOST_CHECK(m_output != SUCCESS); // Invalid address (a bit above the 160th is set). sendMessage((bytes)fromHex("a9059cbb") + (bytes)fromHex("000000000000000000000100123456789a123456789a123456789a123456789a") + encodeArgs(1), false, 0); + BOOST_CHECK(!m_transactionSuccessful); BOOST_CHECK(m_output != SUCCESS); } |