diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-03-13 23:34:20 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-03-13 23:34:20 +0800 |
commit | 1cd179f0d2cec70afdde843927b68c16027f2b0c (patch) | |
tree | 486b347ba1f27b7eb72d622bb09c8dcfcd81d061 /SolidityInterface.cpp | |
parent | 0de5ff34fd14777740ac816d6866f7987f955bc6 (diff) | |
parent | 1bb7f3cbc3737bbdf6653d3721d01dc95a217707 (diff) | |
download | dexon-solidity-1cd179f0d2cec70afdde843927b68c16027f2b0c.tar dexon-solidity-1cd179f0d2cec70afdde843927b68c16027f2b0c.tar.gz dexon-solidity-1cd179f0d2cec70afdde843927b68c16027f2b0c.tar.bz2 dexon-solidity-1cd179f0d2cec70afdde843927b68c16027f2b0c.tar.lz dexon-solidity-1cd179f0d2cec70afdde843927b68c16027f2b0c.tar.xz dexon-solidity-1cd179f0d2cec70afdde843927b68c16027f2b0c.tar.zst dexon-solidity-1cd179f0d2cec70afdde843927b68c16027f2b0c.zip |
Merge pull request #1284 from LefterisJP/sol_SBHCleanup
Solidity StringXX and HashXX types change to BytesXX
Diffstat (limited to 'SolidityInterface.cpp')
-rw-r--r-- | SolidityInterface.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/SolidityInterface.cpp b/SolidityInterface.cpp index ecab64c8..48e2fd7a 100644 --- a/SolidityInterface.cpp +++ b/SolidityInterface.cpp @@ -84,10 +84,10 @@ BOOST_AUTO_TEST_CASE(single_function) BOOST_AUTO_TEST_CASE(single_constant_function) { ContractDefinition const& contract = checkInterface( - "contract test { function f(uint a) constant returns(hash8 x) { 1==2; } }"); + "contract test { function f(uint a) constant returns(bytes1 x) { 1==2; } }"); BOOST_REQUIRE_EQUAL(1, contract.getDefinedFunctions().size()); BOOST_CHECK_EQUAL(getSourcePart(*contract.getDefinedFunctions().front()), - "function f(uint256 a)constant returns(hash8 x){}"); + "function f(uint256 a)constant returns(bytes1 x){}"); } BOOST_AUTO_TEST_CASE(multiple_functions) @@ -128,15 +128,15 @@ BOOST_AUTO_TEST_CASE(inheritance) char const* sourceCode = " contract Base { \n" " function baseFunction(uint p) returns (uint i) { return p; } \n" - " event baseEvent(string32 indexed evtArgBase); \n" + " event baseEvent(bytes32 indexed evtArgBase); \n" " } \n" " contract Derived is Base { \n" - " function derivedFunction(string32 p) returns (string32 i) { return p; } \n" + " function derivedFunction(bytes32 p) returns (bytes32 i) { return p; } \n" " event derivedEvent(uint indexed evtArgDerived); \n" " }"; ContractDefinition const& contract = checkInterface(sourceCode); set<string> expectedFunctions({"function baseFunction(uint256 p)returns(uint256 i){}", - "function derivedFunction(string32 p)returns(string32 i){}"}); + "function derivedFunction(bytes32 p)returns(bytes32 i){}"}); BOOST_REQUIRE_EQUAL(2, contract.getDefinedFunctions().size()); BOOST_CHECK(expectedFunctions == set<string>({getSourcePart(*contract.getDefinedFunctions().at(0)), getSourcePart(*contract.getDefinedFunctions().at(1))})); |