diff options
author | Erik Kundt <bitshift@posteo.org> | 2018-06-29 22:52:41 +0800 |
---|---|---|
committer | Erik Kundt <bitshift@posteo.org> | 2018-07-04 21:45:42 +0800 |
commit | fc2b006fe1266339776820ee0dd2c756bc9766d5 (patch) | |
tree | a24e5be1f1d7dca6e55dc8fd12ea204b318f623f /test/libsolidity/SolidityExpressionCompiler.cpp | |
parent | b42929975f7ac9729f795c416f922613c8ce3994 (diff) | |
download | dexon-solidity-fc2b006fe1266339776820ee0dd2c756bc9766d5.tar.gz dexon-solidity-fc2b006fe1266339776820ee0dd2c756bc9766d5.tar.zst dexon-solidity-fc2b006fe1266339776820ee0dd2c756bc9766d5.zip |
Updates unit test to specify visibility.
Diffstat (limited to 'test/libsolidity/SolidityExpressionCompiler.cpp')
-rw-r--r-- | test/libsolidity/SolidityExpressionCompiler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/libsolidity/SolidityExpressionCompiler.cpp b/test/libsolidity/SolidityExpressionCompiler.cpp index 2ea0247e..949045ea 100644 --- a/test/libsolidity/SolidityExpressionCompiler.cpp +++ b/test/libsolidity/SolidityExpressionCompiler.cpp @@ -175,7 +175,7 @@ BOOST_AUTO_TEST_CASE(literal_true) { char const* sourceCode = R"( contract test { - function f() { bool x = true; } + function f() public { bool x = true; } } )"; bytes code = compileFirstExpression(sourceCode); @@ -384,7 +384,7 @@ BOOST_AUTO_TEST_CASE(unary_inc_dec) { char const* sourceCode = R"( contract test { - function f(uint a) returns (uint x) { x = --a ^ (a-- ^ (++a ^ a++)); } + function f(uint a) public returns (uint x) { x = --a ^ (a-- ^ (++a ^ a++)); } } )"; bytes code = compileFirstExpression(sourceCode, {}, {{"test", "f", "a"}, {"test", "f", "x"}}); @@ -509,9 +509,9 @@ BOOST_AUTO_TEST_CASE(blockhash) } )"; - auto blockhashFun = make_shared<FunctionType>(strings{"uint256"}, strings{"bytes32"}, + auto blockhashFun = make_shared<FunctionType>(strings{"uint256"}, strings{"bytes32"}, FunctionType::Kind::BlockHash, false, StateMutability::View); - + bytes code = compileFirstExpression(sourceCode, {}, {}, {make_shared<MagicVariableDeclaration>("blockhash", blockhashFun)}); bytes expectation({byte(Instruction::PUSH1), 0x03, @@ -523,7 +523,7 @@ BOOST_AUTO_TEST_CASE(gas_left) { char const* sourceCode = R"( contract test { - function f() returns (uint256 val) { + function f() public returns (uint256 val) { return gasleft(); } } |