aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorLu Guanqun <guanqun.lu@gmail.com>2016-01-11 15:08:28 +0800
committerLu Guanqun <guanqun.lu@gmail.com>2016-01-23 01:14:00 +0800
commitbf7daf0814ac17fece679a9d1aa187a8bdcf901b (patch)
tree54a0d2556c61d5efb27f3bc12394429da70f7328 /test/libsolidity/SolidityEndToEndTest.cpp
parentb003290638e16e595c25e433f2f65648ea6644da (diff)
downloaddexon-solidity-bf7daf0814ac17fece679a9d1aa187a8bdcf901b.tar.gz
dexon-solidity-bf7daf0814ac17fece679a9d1aa187a8bdcf901b.tar.zst
dexon-solidity-bf7daf0814ac17fece679a9d1aa187a8bdcf901b.zip
[cond-expr] don't allow conditional as left value for the first stage
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp
index 3b9b8449..be291735 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -128,22 +128,6 @@ BOOST_AUTO_TEST_CASE(conditional_expression_multiple)
BOOST_CHECK(callContractFunction("f(uint256)", u256(40)) == toBigEndian(u256(10)));
}
-BOOST_AUTO_TEST_CASE(conditional_expression_as_left_value)
-{
- char const* sourceCode = R"(
- contract test {
- function f(uint x) returns(uint d) {
- uint y = 1;
- uint z = 1;
- (x > 10 ? y : z) = 3;
- return y ** z;
- }
- })";
- compileAndRun(sourceCode);
- BOOST_CHECK(callContractFunction("f(uint256)", u256(20)) == toBigEndian(u256(3)));
- BOOST_CHECK(callContractFunction("f(uint256)", u256(5)) == toBigEndian(u256(1)));
-}
-
BOOST_AUTO_TEST_CASE(conditional_expression_with_return_values)
{
char const* sourceCode = R"(