Moving alloy/ into xenia/cpu/ to start simplifying things.
This commit is contained in:
46
src/xenia/cpu/test/xe-cpu-hir-test.cc
Normal file
46
src/xenia/cpu/test/xe-cpu-hir-test.cc
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2014 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#define CATCH_CONFIG_RUNNER
|
||||
#include "third_party/catch/single_include/catch.hpp"
|
||||
|
||||
#include "xenia/cpu/test/util.h"
|
||||
|
||||
namespace xe {
|
||||
namespace cpu {
|
||||
namespace test {
|
||||
|
||||
using xe::cpu::frontend::ppc::PPCContext;
|
||||
using xe::cpu::runtime::Runtime;
|
||||
|
||||
int main(std::vector<std::wstring>& args) {
|
||||
std::vector<std::string> narrow_args;
|
||||
auto narrow_argv = new char* [args.size()];
|
||||
for (size_t i = 0; i < args.size(); ++i) {
|
||||
auto narrow_arg = poly::to_string(args[i]);
|
||||
narrow_argv[i] = const_cast<char*>(narrow_arg.data());
|
||||
narrow_args.push_back(std::move(narrow_arg));
|
||||
}
|
||||
int ret = Catch::Session().run(int(args.size()), narrow_argv);
|
||||
if (ret) {
|
||||
#if XE_LIKE_WIN32
|
||||
// Visual Studio kills the console on shutdown, so prevent that.
|
||||
if (poly::debugging::IsDebuggerAttached()) {
|
||||
poly::debugging::Break();
|
||||
}
|
||||
#endif // XE_LIKE_WIN32
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace cpu
|
||||
} // namespace xe
|
||||
|
||||
DEFINE_ENTRY_POINT(L"xe-cpu-hir-test", L"?", xe::cpu::test::main);
|
||||
Reference in New Issue
Block a user