From c8b05339335d8e9166ef6863f7697bcc59f09260 Mon Sep 17 00:00:00 2001 From: Lu Guanqun Date: Mon, 11 Jan 2016 15:30:25 +0000 Subject: [cond-expr] change the end to end test --- test/libsolidity/SolidityEndToEndTest.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/libsolidity') diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index d7827946..0f0eb417 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -147,20 +147,21 @@ BOOST_AUTO_TEST_CASE(conditional_expression_storage_memory) contract test { bytes2[2] data1; function f(bool cond) returns (uint) { + data1[0] = "cc"; + bytes2[2] memory x; - x[0] = "aa"; bytes2[2] memory y; y[0] = "bb"; - data1 = cond ? x : y; + x = cond ? y : data1; uint ret = 0; - if (data1[0] == "aa") + if (x[0] == "bb") { ret = 1; } - if (data1[0] == "bb") + if (x[0] == "cc") { ret = 2; } -- cgit