diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-10 21:26:11 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-10 21:26:11 +0800 |
commit | a82acba49ae68a960f33a2938f3d3560bf65441c (patch) | |
tree | 34b1e91ff379f9ce346aaf6c218e38c8141a2f70 | |
parent | 702ee20a0179afe607383554ee89b0f863e14f63 (diff) | |
download | dexon-solidity-a82acba49ae68a960f33a2938f3d3560bf65441c.tar.gz dexon-solidity-a82acba49ae68a960f33a2938f3d3560bf65441c.tar.zst dexon-solidity-a82acba49ae68a960f33a2938f3d3560bf65441c.zip |
Compare start/end timestamp
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 3c2e939c..53b61450 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -1484,10 +1484,13 @@ BOOST_AUTO_TEST_CASE(now) )"; compileAndRun(sourceCode); u256 startBlock = m_blockNumber; + size_t startTime = blockTimestamp(startBlock); auto ret = callContractFunction("someInfo()"); u256 endBlock = m_blockNumber; + size_t endTime = blockTimestamp(endBlock); BOOST_CHECK(startBlock != endBlock); - BOOST_CHECK(ret == encodeArgs(true, blockTimestamp(endBlock))); + BOOST_CHECK(startTime != endTime); + BOOST_CHECK(ret == encodeArgs(true, endTime)); } BOOST_AUTO_TEST_CASE(type_conversions_cleanup) |