aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorGav Wood <g@ethdev.com>2015-04-21 23:33:02 +0800
committerGav Wood <g@ethdev.com>2015-04-21 23:33:02 +0800
commit817f3d53e94b803f49294a6f68784a16699e2406 (patch)
tree239b2e793a7a656ecb21bed5ebf39b7935e23845 /libsolidity
parent60d364540e438e3f7d4f82a44c62babbbcf4da28 (diff)
parentc834ee5ce1a6d034d4503c5b82ff200a3a6d2c88 (diff)
downloaddexon-solidity-817f3d53e94b803f49294a6f68784a16699e2406.tar.gz
dexon-solidity-817f3d53e94b803f49294a6f68784a16699e2406.tar.zst
dexon-solidity-817f3d53e94b803f49294a6f68784a16699e2406.zip
Merge pull request #1685 from chriseth/sol_fix_ripemd_alignment
Fixed byte alignment for return type of ripemd160 built-in contract.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/SolidityEndToEndTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/SolidityEndToEndTest.cpp b/libsolidity/SolidityEndToEndTest.cpp
index a77dcecd..8b926d6c 100644
--- a/libsolidity/SolidityEndToEndTest.cpp
+++ b/libsolidity/SolidityEndToEndTest.cpp
@@ -1476,7 +1476,7 @@ BOOST_AUTO_TEST_CASE(ripemd)
{
h256 ret;
dev::ripemd160(dev::ref(toBigEndian(_input)), bytesRef(&ret[0], 32));
- return u256(ret) >> (256 - 160);
+ return u256(ret);
};
testSolidityAgainstCpp("a(bytes32)", f, u256(4));
testSolidityAgainstCpp("a(bytes32)", f, u256(5));
@@ -1791,7 +1791,7 @@ BOOST_AUTO_TEST_CASE(gas_for_builtin)
)";
compileAndRun(sourceCode);
BOOST_CHECK(callContractFunction("test(uint256)", 500) == bytes());
- BOOST_CHECK(callContractFunction("test(uint256)", 800) == encodeArgs(u256("0x8eb208f7e05d987a9b044a8e98c6b087f15a0bfc"), true));
+ BOOST_CHECK(callContractFunction("test(uint256)", 800) == encodeArgs(u256("0x8eb208f7e05d987a9b044a8e98c6b087f15a0bfc000000000000000000000000"), true));
}
BOOST_AUTO_TEST_CASE(value_complex)