Merge pull request #7568 from ethereum/fixtest

Fix failing tests on ArchLinux and potentially MacOS
This commit is contained in:
chriseth 2019-10-29 12:37:51 +01:00 committed by GitHub
commit 5d906cd58d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -356,13 +356,13 @@ string dev::eth::disassemble(bytes const& _mem)
stringstream ret;
eachInstruction(_mem, [&](Instruction _instr, u256 const& _data) {
if (!isValidInstruction(_instr))
ret << "0x" << hex << int(_instr) << " ";
ret << "0x" << std::uppercase << std::hex << int(_instr) << " ";
else
{
InstructionInfo info = instructionInfo(_instr);
ret << info.name << " ";
if (info.additional)
ret << "0x" << hex << _data << " ";
ret << "0x" << std::uppercase << std::hex << _data << " ";
}
});
return ret.str();

View File

@ -294,7 +294,7 @@ void CommandLineInterface::handleOpcode(string const& _contract)
else
{
sout() << "Opcodes: " << endl;
sout() << dev::eth::disassemble(m_compiler->object(_contract).bytecode);
sout() << std::uppercase << dev::eth::disassemble(m_compiler->object(_contract).bytecode);
sout() << endl;
}
}

View File

@ -52,7 +52,7 @@ void InterpreterState::dumpTraceAndState(ostream& _out) const
words[(offset / 0x20) * 0x20] |= u256(uint32_t(value)) << (256 - 8 - 8 * size_t(offset % 0x20));
for (auto const& [offset, value]: words)
if (value != 0)
_out << " " << std::hex << std::setw(4) << offset << ": " << h256(value).hex() << endl;
_out << " " << std::uppercase << std::hex << std::setw(4) << offset << ": " << h256(value).hex() << endl;
_out << "Storage dump:" << endl;
for (auto const& slot: storage)
if (slot.second != h256(0))