Fixing test output.

This commit is contained in:
Ben Vanik 2015-08-30 16:26:36 -07:00
parent 499e8b4b5b
commit dfa5b90c36
2 changed files with 12 additions and 11 deletions

View File

@ -12,6 +12,8 @@
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include "xenia/base/logging.h"
namespace xe { namespace xe {
namespace cpu { namespace cpu {
@ -30,18 +32,17 @@ DebugInfo::~DebugInfo() {
void DebugInfo::Dump() { void DebugInfo::Dump() {
if (source_disasm_) { if (source_disasm_) {
printf("PPC:\n%s\n", source_disasm_); XELOGD("PPC:\n%s\n", source_disasm_);
} }
if (raw_hir_disasm_) { if (raw_hir_disasm_) {
printf("Unoptimized HIR:\n%s\n", raw_hir_disasm_); XELOGD("Unoptimized HIR:\n%s\n", raw_hir_disasm_);
} }
if (hir_disasm_) { if (hir_disasm_) {
printf("Optimized HIR:\n%s\n", hir_disasm_); XELOGD("Optimized HIR:\n%s\n", hir_disasm_);
} }
if (machine_code_disasm_) { if (machine_code_disasm_) {
printf("Machine Code:\n%s\n", machine_code_disasm_); XELOGD("Machine Code:\n%s\n", machine_code_disasm_);
} }
fflush(stdout);
} }
} // namespace cpu } // namespace cpu

View File

@ -293,9 +293,9 @@ class TestRunner {
reg_value.c_str(), actual_value, reg_value.c_str(), actual_value,
xe::countof(actual_value))) { xe::countof(actual_value))) {
any_failed = true; any_failed = true;
printf("Register %s assert failed:\n", reg_name.c_str()); XELOGE("Register %s assert failed:\n", reg_name.c_str());
printf(" Expected: %s == %s\n", reg_name.c_str(), reg_value.c_str()); XELOGE(" Expected: %s == %s\n", reg_name.c_str(), reg_value.c_str());
printf(" Actual: %s == %s\n", reg_name.c_str(), actual_value); XELOGE(" Actual: %s == %s\n", reg_name.c_str(), actual_value);
} }
} else if (it.first == "MEMORY_OUT") { } else if (it.first == "MEMORY_OUT") {
size_t space_pos = it.second.find(" "); size_t space_pos = it.second.find(" ");
@ -318,9 +318,9 @@ class TestRunner {
uint8_t actual = *p; uint8_t actual = *p;
if (expected != actual) { if (expected != actual) {
any_failed = true; any_failed = true;
printf("Memory %s assert failed:\n", address_str.c_str()); XELOGE("Memory %s assert failed:\n", address_str.c_str());
printf(" Expected: %.8X %.2X\n", current_address, expected); XELOGE(" Expected: %.8X %.2X\n", current_address, expected);
printf(" Actual: %.8X %.2X\n", current_address, actual); XELOGE(" Actual: %.8X %.2X\n", current_address, actual);
} }
++p; ++p;
} }