aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-02-10 21:26:11 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-02-10 21:26:11 +0800
commita82acba49ae68a960f33a2938f3d3560bf65441c (patch)
tree34b1e91ff379f9ce346aaf6c218e38c8141a2f70 /test
parent702ee20a0179afe607383554ee89b0f863e14f63 (diff)
downloaddexon-solidity-a82acba49ae68a960f33a2938f3d3560bf65441c.tar
dexon-solidity-a82acba49ae68a960f33a2938f3d3560bf65441c.tar.gz
dexon-solidity-a82acba49ae68a960f33a2938f3d3560bf65441c.tar.bz2
dexon-solidity-a82acba49ae68a960f33a2938f3d3560bf65441c.tar.lz
dexon-solidity-a82acba49ae68a960f33a2938f3d3560bf65441c.tar.xz
dexon-solidity-a82acba49ae68a960f33a2938f3d3560bf65441c.tar.zst
dexon-solidity-a82acba49ae68a960f33a2938f3d3560bf65441c.zip
Compare start/end timestamp
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp5
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)