mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge remote-tracking branch 'up/develop' into bugFix
Conflicts: mix/CodeModel.cpp
This commit is contained in:
commit
91dbf63978
@ -24,7 +24,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <boost/test/unit_test.hpp>
|
#include <boost/test/unit_test.hpp>
|
||||||
#include <libdevcrypto/SHA3.h>
|
#include <libdevcore/Hash.h>
|
||||||
#include <test/libsolidity/solidityExecutionFramework.h>
|
#include <test/libsolidity/solidityExecutionFramework.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -1501,9 +1501,7 @@ BOOST_AUTO_TEST_CASE(sha256)
|
|||||||
compileAndRun(sourceCode);
|
compileAndRun(sourceCode);
|
||||||
auto f = [&](u256 const& _input) -> u256
|
auto f = [&](u256 const& _input) -> u256
|
||||||
{
|
{
|
||||||
h256 ret;
|
return dev::sha256(dev::ref(toBigEndian(_input)));
|
||||||
dev::sha256(dev::ref(toBigEndian(_input)), bytesRef(&ret[0], 32));
|
|
||||||
return ret;
|
|
||||||
};
|
};
|
||||||
testSolidityAgainstCpp("a(bytes32)", f, u256(4));
|
testSolidityAgainstCpp("a(bytes32)", f, u256(4));
|
||||||
testSolidityAgainstCpp("a(bytes32)", f, u256(5));
|
testSolidityAgainstCpp("a(bytes32)", f, u256(5));
|
||||||
@ -1520,9 +1518,7 @@ BOOST_AUTO_TEST_CASE(ripemd)
|
|||||||
compileAndRun(sourceCode);
|
compileAndRun(sourceCode);
|
||||||
auto f = [&](u256 const& _input) -> u256
|
auto f = [&](u256 const& _input) -> u256
|
||||||
{
|
{
|
||||||
h256 ret;
|
return h256(dev::ripemd160(h256(_input).ref()), h256::AlignLeft); // This should be aligned right. i guess it's fixed elsewhere?
|
||||||
dev::ripemd160(dev::ref(toBigEndian(_input)), bytesRef(&ret[0], 32));
|
|
||||||
return u256(ret);
|
|
||||||
};
|
};
|
||||||
testSolidityAgainstCpp("a(bytes32)", f, u256(4));
|
testSolidityAgainstCpp("a(bytes32)", f, u256(4));
|
||||||
testSolidityAgainstCpp("a(bytes32)", f, u256(5));
|
testSolidityAgainstCpp("a(bytes32)", f, u256(5));
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <libdevcore/Log.h>
|
#include <libdevcore/Log.h>
|
||||||
#include <libdevcrypto/SHA3.h>
|
#include <libdevcore/SHA3.h>
|
||||||
#include <libsolidity/Scanner.h>
|
#include <libsolidity/Scanner.h>
|
||||||
#include <libsolidity/Parser.h>
|
#include <libsolidity/Parser.h>
|
||||||
#include <libsolidity/NameAndTypeResolver.h>
|
#include <libsolidity/NameAndTypeResolver.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user