diff options
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 9df64cdc..c3bac3d7 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -6631,6 +6631,29 @@ BOOST_AUTO_TEST_CASE(delete_on_array_of_structs) // This code interprets x as an array length and thus will go out of gas. // neither of the two should throw due to out-of-bounds access BOOST_CHECK(callContractFunction("f()") == encodeArgs(true)); + +} + +BOOST_AUTO_TEST_CASE(fixed_data_type) +{ + char const* sourceCode = R"( + contract C { + fixed public pi = 3.141592; + } + )"; + compileAndRun(sourceCode, 0, "C"); +} + +BOOST_AUTO_TEST_CASE(fixed_data_type_expression) +{ + char const* sourceCode = R"( + contract C { + function f(fixed a) returns (fixed) { + return (a + 3); + } + } + )"; + compileAndRun(sourceCode, 0, "C"); } BOOST_AUTO_TEST_CASE(internal_library_function) |