diff options
author | RJ Catalano <rcatalano@macsales.com> | 2016-02-19 06:39:11 +0800 |
---|---|---|
committer | VoR0220 <catalanor0220@gmail.com> | 2016-05-10 00:41:02 +0800 |
commit | 9a075458ad104921c9d747cd34d3e5c299638406 (patch) | |
tree | c2005fb8b8032c54c7ab65196e952d01ab747327 /test/libsolidity/SolidityEndToEndTest.cpp | |
parent | 9e36bdda8a9552f1885e0a63a85db588623b39b2 (diff) | |
download | dexon-solidity-9a075458ad104921c9d747cd34d3e5c299638406.tar.gz dexon-solidity-9a075458ad104921c9d747cd34d3e5c299638406.tar.zst dexon-solidity-9a075458ad104921c9d747cd34d3e5c299638406.zip |
initial work for fixed types...potentially needing a constant literal type for this
notation
Rational implemented...trying to figure out exponential
fix for token bug, also quick fix for the wei and seconds
fixed problem with var...probably a conversion problem for fixed in size capabilities
adding fixed type tests
Removing bitshift and regrouping fixed type tests together
size capabilities functioning properly for fixed types
got exponents up and working with their inverse, changed a few of the tests....something is working that likely shouldn't be
slight changes to how to flip the rational negative around...still trying to figure it out
tests added
updated tests
odd differences in trying soltest from solc binary, let me know if you can replicate
test not working for odd reason
fixed test problem with fixed literals...still need a way to log this error
broken up the tests, added some, changed some things in types and began compiler work
moar tests and prepping for rebuilding much of the types.cpp file
further fixing
initial work for fixed types...potentially needing a constant literal type for this
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) |