diff options
author | winsvega <winsvega@mail.ru> | 2015-04-10 07:13:54 +0800 |
---|---|---|
committer | winsvega <winsvega@mail.ru> | 2015-04-16 21:46:40 +0800 |
commit | c867e185bf1bf2d813bc8123d904c6a9bd7bde90 (patch) | |
tree | 8cfaf8676c2c0fd30dab5a2d3dce7e7d34e6a568 /TestHelper.cpp | |
parent | 3e605abea486792ad749461f4d9e209b2ee6f07e (diff) | |
download | dexon-solidity-c867e185bf1bf2d813bc8123d904c6a9bd7bde90.tar.gz dexon-solidity-c867e185bf1bf2d813bc8123d904c6a9bd7bde90.tar.zst dexon-solidity-c867e185bf1bf2d813bc8123d904c6a9bd7bde90.zip |
All Fields Hex: VMTests
Diffstat (limited to 'TestHelper.cpp')
-rw-r--r-- | TestHelper.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp index 2c7f9a48..a689a40b 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -131,7 +131,11 @@ json_spirit::mObject& ImportTest::makeAllFieldsHex(json_spirit::mObject& _o) if (std::find(std::begin(hashes), std::end(hashes), key) != std::end(hashes)) continue; +<<<<<<< HEAD std::string str; +======= + string str; +>>>>>>> All Fields Hex: VMTests json_spirit::mValue value = (*it).second; if (value.type() == json_spirit::int_type) @@ -140,7 +144,18 @@ json_spirit::mObject& ImportTest::makeAllFieldsHex(json_spirit::mObject& _o) str = value.get_str(); else continue; +<<<<<<< HEAD _o[key] = (str.substr(0, 2) == "0x") ? str : "0x" + toHex(toCompactBigEndian(toInt(str))); +======= + _o[key] = (str.substr(0, 2) == "0x" || + str.find("a") != string::npos || + str.find("b") != string::npos || + str.find("c") != string::npos || + str.find("d") != string::npos || + str.find("e") != string::npos || + str.find("f") != string::npos + ) ? str : "0x" + toHex(toCompactBigEndian(toInt(str))); +>>>>>>> All Fields Hex: VMTests } return _o; } |