aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--SolidityEndToEndTest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp
index ae241705..3205c038 100644
--- a/SolidityEndToEndTest.cpp
+++ b/SolidityEndToEndTest.cpp
@@ -1031,6 +1031,17 @@ BOOST_AUTO_TEST_CASE(blockchain)
BOOST_CHECK(callContractFunctionWithValue("someInfo()", 28) == encodeArgs(28, 0, 1));
}
+BOOST_AUTO_TEST_CASE(now)
+{
+ char const* sourceCode = "contract test {\n"
+ " function someInfo() returns (bool success) {\n"
+ " return block.timestamp == now && now > 0;\n"
+ " }\n"
+ "}\n";
+ compileAndRun(sourceCode);
+ BOOST_CHECK(callContractFunction("someInfo()") == encodeArgs(true));
+}
+
BOOST_AUTO_TEST_CASE(function_types)
{
char const* sourceCode = "contract test {\n"