diff options
author | yann300 <yann.levreau@gmail.com> | 2015-05-20 18:17:04 +0800 |
---|---|---|
committer | yann300 <yann.levreau@gmail.com> | 2015-05-20 18:17:04 +0800 |
commit | 91dbf6397832b6825afdf7748416f7aa5126440d (patch) | |
tree | 8f0cfbe73fecf9f95d2a131c0d4fce7c88c0a5da | |
parent | 51d94ae1b98e82c411128c9ea38016b8c8076e38 (diff) | |
parent | b0d5cbf6983030c4e4fb48c45e1602880069b063 (diff) | |
download | dexon-solidity-91dbf6397832b6825afdf7748416f7aa5126440d.tar dexon-solidity-91dbf6397832b6825afdf7748416f7aa5126440d.tar.gz dexon-solidity-91dbf6397832b6825afdf7748416f7aa5126440d.tar.bz2 dexon-solidity-91dbf6397832b6825afdf7748416f7aa5126440d.tar.lz dexon-solidity-91dbf6397832b6825afdf7748416f7aa5126440d.tar.xz dexon-solidity-91dbf6397832b6825afdf7748416f7aa5126440d.tar.zst dexon-solidity-91dbf6397832b6825afdf7748416f7aa5126440d.zip |
Merge remote-tracking branch 'up/develop' into bugFix
Conflicts:
mix/CodeModel.cpp
-rw-r--r-- | libsolidity/SolidityEndToEndTest.cpp | 10 | ||||
-rw-r--r-- | libsolidity/SolidityNameAndTypeResolution.cpp | 2 |
2 files changed, 4 insertions, 8 deletions
diff --git a/libsolidity/SolidityEndToEndTest.cpp b/libsolidity/SolidityEndToEndTest.cpp index 6713382f..90ce20d2 100644 --- a/libsolidity/SolidityEndToEndTest.cpp +++ b/libsolidity/SolidityEndToEndTest.cpp @@ -24,7 +24,7 @@ #include <string> #include <tuple> #include <boost/test/unit_test.hpp> -#include <libdevcrypto/SHA3.h> +#include <libdevcore/Hash.h> #include <test/libsolidity/solidityExecutionFramework.h> using namespace std; @@ -1501,9 +1501,7 @@ BOOST_AUTO_TEST_CASE(sha256) compileAndRun(sourceCode); auto f = [&](u256 const& _input) -> u256 { - h256 ret; - dev::sha256(dev::ref(toBigEndian(_input)), bytesRef(&ret[0], 32)); - return ret; + return dev::sha256(dev::ref(toBigEndian(_input))); }; testSolidityAgainstCpp("a(bytes32)", f, u256(4)); testSolidityAgainstCpp("a(bytes32)", f, u256(5)); @@ -1520,9 +1518,7 @@ BOOST_AUTO_TEST_CASE(ripemd) compileAndRun(sourceCode); auto f = [&](u256 const& _input) -> u256 { - h256 ret; - dev::ripemd160(dev::ref(toBigEndian(_input)), bytesRef(&ret[0], 32)); - return u256(ret); + return h256(dev::ripemd160(h256(_input).ref()), h256::AlignLeft); // This should be aligned right. i guess it's fixed elsewhere? }; testSolidityAgainstCpp("a(bytes32)", f, u256(4)); testSolidityAgainstCpp("a(bytes32)", f, u256(5)); diff --git a/libsolidity/SolidityNameAndTypeResolution.cpp b/libsolidity/SolidityNameAndTypeResolution.cpp index 4ec7b8bd..c52bbf9d 100644 --- a/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/libsolidity/SolidityNameAndTypeResolution.cpp @@ -23,7 +23,7 @@ #include <string> #include <libdevcore/Log.h> -#include <libdevcrypto/SHA3.h> +#include <libdevcore/SHA3.h> #include <libsolidity/Scanner.h> #include <libsolidity/Parser.h> #include <libsolidity/NameAndTypeResolver.h> |