diff options
author | LianaHus <liana@ethdev.com> | 2015-09-17 21:04:44 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-09-17 21:15:46 +0800 |
commit | e50400082b1fe3b1086d8ebb874b12b30ef2ff92 (patch) | |
tree | 3bb55ebfe31cbb3a15b7ffa306a4e1a1d99325ae /test/libsolidity | |
parent | e89b8d516b7e208bc67e273e174714f7f9b67b77 (diff) | |
download | dexon-solidity-e50400082b1fe3b1086d8ebb874b12b30ef2ff92.tar.gz dexon-solidity-e50400082b1fe3b1086d8ebb874b12b30ef2ff92.tar.zst dexon-solidity-e50400082b1fe3b1086d8ebb874b12b30ef2ff92.zip |
fixed using string as a type for struct member
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 803ff61a..1f5a92e7 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -5297,7 +5297,10 @@ BOOST_AUTO_TEST_CASE(strings_in_struct) } function buggystruct(){ - bug = Buggy(10, 20, 30, "a"); + bug.first = 10; + bug.second = 20; + bug.third = 30; + bug.last = "asdfghjkl"; } function getFirst() returns (uint) { @@ -5318,14 +5321,11 @@ BOOST_AUTO_TEST_CASE(strings_in_struct) } )"; compileAndRun(sourceCode); - auto first = callContractFunction("getFirst()"); + string s = "asdfghjkl"; BOOST_CHECK(callContractFunction("getFirst()") == encodeArgs(u256(10))); - auto second = callContractFunction("getSecond()"); BOOST_CHECK(callContractFunction("getSecond()") == encodeArgs(u256(20))); - auto third = callContractFunction("getThird()"); BOOST_CHECK(callContractFunction("getThird()") == encodeArgs(u256(30))); - auto last = callContractFunction("getLast()"); - BOOST_CHECK(callContractFunction("getLast()") == encodeArgs(string("a"))); + BOOST_CHECK(callContractFunction("getLast()") == encodeDyn(s)); } BOOST_AUTO_TEST_SUITE_END() |