bool-ifying xe::cpu

This commit is contained in:
Ben Vanik
2015-05-05 17:21:08 -07:00
parent a38b05db24
commit ade5388728
67 changed files with 270 additions and 347 deletions

View File

@@ -188,7 +188,7 @@ class TestRunner {
bool Setup(TestSuite& suite) {
// Load the binary module.
auto module = std::make_unique<xe::cpu::RawModule>(processor.get());
if (module->LoadFile(START_ADDRESS, suite.bin_file_path)) {
if (!module->LoadFile(START_ADDRESS, suite.bin_file_path)) {
XELOGE("Unable to load test binary %ls", suite.bin_file_path.c_str());
return false;
}
@@ -212,9 +212,8 @@ class TestRunner {
}
// Execute test.
xe::cpu::Function* fn;
processor->ResolveFunction(test_case.address, &fn);
if (!fn) {
xe::cpu::Function* fn = nullptr;
if (!processor->ResolveFunction(test_case.address, &fn)) {
XELOGE("Entry function not found");
return false;
}