Fix failing tests on ArchLinux and potentially MacOS

This commit is contained in:
Mathias Baumann 2019-10-24 16:37:18 +02:00
parent 15e39f7d65
commit b3a5c9c9c0
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))