diff options
author | chriseth <chris@ethereum.org> | 2018-12-06 17:04:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-06 17:04:58 +0800 |
commit | 5a08ae5e719820ba6d34a66187304747cf5c061f (patch) | |
tree | 8c7cc409fd8155580947ecf7a0f5fd385fe0336f /test | |
parent | 15e28fa444843d6b8e5bef81ae9fc73a41ae97f6 (diff) | |
parent | 936c67415ae058984c5666c44bf68fd1ebfaf23a (diff) | |
download | dexon-solidity-5a08ae5e719820ba6d34a66187304747cf5c061f.tar.gz dexon-solidity-5a08ae5e719820ba6d34a66187304747cf5c061f.tar.zst dexon-solidity-5a08ae5e719820ba6d34a66187304747cf5c061f.zip |
Merge pull request #5600 from ethereum/simplifyToHex
Simplify toHex()
Diffstat (limited to 'test')
-rw-r--r-- | test/libdevcore/CommonData.cpp | 2 | ||||
-rw-r--r-- | test/libevmasm/Assembler.cpp | 2 | ||||
-rw-r--r-- | test/liblll/EndToEndTest.cpp | 2 | ||||
-rw-r--r-- | test/libsolidity/StandardCompiler.cpp | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/test/libdevcore/CommonData.cpp b/test/libdevcore/CommonData.cpp index 2020ddb0..8da937de 100644 --- a/test/libdevcore/CommonData.cpp +++ b/test/libdevcore/CommonData.cpp @@ -37,7 +37,7 @@ BOOST_AUTO_TEST_SUITE(CommonData) BOOST_AUTO_TEST_CASE(test_to_hex) { - BOOST_CHECK_EQUAL(toHex(fromHex("FF"), 2, HexPrefix::DontAdd, HexCase::Lower), "ff"); + BOOST_CHECK_EQUAL(toHex(fromHex("FF"), HexPrefix::DontAdd, HexCase::Lower), "ff"); } BOOST_AUTO_TEST_CASE(test_format_number) diff --git a/test/libevmasm/Assembler.cpp b/test/libevmasm/Assembler.cpp index bece2be4..6976755f 100644 --- a/test/libevmasm/Assembler.cpp +++ b/test/libevmasm/Assembler.cpp @@ -106,7 +106,7 @@ BOOST_AUTO_TEST_CASE(all_assembly_items) _assembly.assemblyString(), " /* \"root.asm\":1:3 */\n" "tag_1:\n" - " keccak256(0x2, 0x1)\n" + " keccak256(0x02, 0x01)\n" " bytecodeSize\n" " linkerSymbol(\"bf005014d9d0f534b8fcb268bd84c491a2380f4acd260d1ccfe9cd8201f7e994\")\n" " jump(tag_1)\n" diff --git a/test/liblll/EndToEndTest.cpp b/test/liblll/EndToEndTest.cpp index aad89b91..85ce65a1 100644 --- a/test/liblll/EndToEndTest.cpp +++ b/test/liblll/EndToEndTest.cpp @@ -1008,7 +1008,7 @@ BOOST_AUTO_TEST_CASE(sub_assemblies) compileAndRun(sourceCode); bytes ret = callFallback(); BOOST_REQUIRE(ret.size() == 32); - u256 rVal = u256(toHex(ret, 2, HexPrefix::Add)); + u256 rVal = u256(toHex(ret, HexPrefix::Add)); BOOST_CHECK(rVal != 0); BOOST_CHECK(rVal < u256("0x10000000000000000000000000000000000000000")); } diff --git a/test/libsolidity/StandardCompiler.cpp b/test/libsolidity/StandardCompiler.cpp index 1570a9d2..118d8210 100644 --- a/test/libsolidity/StandardCompiler.cpp +++ b/test/libsolidity/StandardCompiler.cpp @@ -333,11 +333,11 @@ BOOST_AUTO_TEST_CASE(basic_compilation) " /* \"fileA\":0:14 contract A { } */\n mstore(0x40, 0x80)\n " "callvalue\n /* \"--CODEGEN--\":8:17 */\n dup1\n " "/* \"--CODEGEN--\":5:7 */\n iszero\n tag_1\n jumpi\n " - "/* \"--CODEGEN--\":30:31 */\n 0x0\n /* \"--CODEGEN--\":27:28 */\n " + "/* \"--CODEGEN--\":30:31 */\n 0x00\n /* \"--CODEGEN--\":27:28 */\n " "dup1\n /* \"--CODEGEN--\":20:32 */\n revert\n /* \"--CODEGEN--\":5:7 */\n" "tag_1:\n /* \"fileA\":0:14 contract A { } */\n pop\n dataSize(sub_0)\n dup1\n " - "dataOffset(sub_0)\n 0x0\n codecopy\n 0x0\n return\nstop\n\nsub_0: assembly {\n " - "/* \"fileA\":0:14 contract A { } */\n mstore(0x40, 0x80)\n 0x0\n " + "dataOffset(sub_0)\n 0x00\n codecopy\n 0x00\n return\nstop\n\nsub_0: assembly {\n " + "/* \"fileA\":0:14 contract A { } */\n mstore(0x40, 0x80)\n 0x00\n " "dup1\n revert\n\n auxdata: 0xa165627a7a72305820" ) == 0); BOOST_CHECK(contract["evm"]["gasEstimates"].isObject()); |