diff options
author | chriseth <c@ethdev.com> | 2017-01-27 01:20:54 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-01-27 01:21:19 +0800 |
commit | a9c6ff4ac8c271aaada1965894b34933b662c044 (patch) | |
tree | 55f18269b78cb12ef7cce34ad4599e4471fdee41 /test | |
parent | ff8008cdf714a2a2e0f4ff9095158d4ef6a33cbb (diff) | |
download | dexon-solidity-a9c6ff4ac8c271aaada1965894b34933b662c044.tar dexon-solidity-a9c6ff4ac8c271aaada1965894b34933b662c044.tar.gz dexon-solidity-a9c6ff4ac8c271aaada1965894b34933b662c044.tar.bz2 dexon-solidity-a9c6ff4ac8c271aaada1965894b34933b662c044.tar.lz dexon-solidity-a9c6ff4ac8c271aaada1965894b34933b662c044.tar.xz dexon-solidity-a9c6ff4ac8c271aaada1965894b34933b662c044.tar.zst dexon-solidity-a9c6ff4ac8c271aaada1965894b34933b662c044.zip |
Refactor json return type generation.
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index b6067ea5..472067ec 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -1102,25 +1102,25 @@ BOOST_AUTO_TEST_CASE(state_variable_accessors) BOOST_REQUIRE((contract = retrieveContract(source, 0)) != nullptr); FunctionTypePointer function = retrieveFunctionBySignature(*contract, "foo()"); BOOST_REQUIRE(function && function->hasDeclaration()); - auto returnParams = function->returnParameterTypeNames(false); - BOOST_CHECK_EQUAL(returnParams.at(0), "uint256"); + auto returnParams = function->returnParameterTypes(); + BOOST_CHECK_EQUAL(returnParams.at(0)->canonicalName(false), "uint256"); BOOST_CHECK(function->isConstant()); function = retrieveFunctionBySignature(*contract, "map(uint256)"); BOOST_REQUIRE(function && function->hasDeclaration()); - auto params = function->parameterTypeNames(false); - BOOST_CHECK_EQUAL(params.at(0), "uint256"); - returnParams = function->returnParameterTypeNames(false); - BOOST_CHECK_EQUAL(returnParams.at(0), "bytes4"); + auto params = function->parameterTypes(); + BOOST_CHECK_EQUAL(params.at(0)->canonicalName(false), "uint256"); + returnParams = function->returnParameterTypes(); + BOOST_CHECK_EQUAL(returnParams.at(0)->canonicalName(false), "bytes4"); BOOST_CHECK(function->isConstant()); function = retrieveFunctionBySignature(*contract, "multiple_map(uint256,uint256)"); BOOST_REQUIRE(function && function->hasDeclaration()); - params = function->parameterTypeNames(false); - BOOST_CHECK_EQUAL(params.at(0), "uint256"); - BOOST_CHECK_EQUAL(params.at(1), "uint256"); - returnParams = function->returnParameterTypeNames(false); - BOOST_CHECK_EQUAL(returnParams.at(0), "bytes4"); + params = function->parameterTypes(); + BOOST_CHECK_EQUAL(params.at(0)->canonicalName(false), "uint256"); + BOOST_CHECK_EQUAL(params.at(1)->canonicalName(false), "uint256"); + returnParams = function->returnParameterTypes(); + BOOST_CHECK_EQUAL(returnParams.at(0)->canonicalName(false), "bytes4"); BOOST_CHECK(function->isConstant()); } |