2015-12-31 00:52:49 +00:00
|
|
|
/**
|
2016-01-01 20:54:36 +00:00
|
|
|
******************************************************************************
|
|
|
|
* Xenia : Xbox 360 Emulator Research Project *
|
|
|
|
******************************************************************************
|
2019-08-24 11:23:25 +00:00
|
|
|
* Copyright 2019 Ben Vanik. All rights reserved. *
|
2016-01-01 20:54:36 +00:00
|
|
|
* Released under the BSD license - see LICENSE in the root for more details. *
|
|
|
|
******************************************************************************
|
|
|
|
*/
|
2015-12-31 00:52:49 +00:00
|
|
|
|
2016-01-01 20:46:26 +00:00
|
|
|
#include <cstdlib>
|
2015-12-31 00:52:49 +00:00
|
|
|
#include <cstring>
|
|
|
|
#include <locale>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2020-11-26 00:44:24 +00:00
|
|
|
#include "xenia/base/cvar.h"
|
|
|
|
#include "xenia/base/main.h"
|
|
|
|
|
2015-12-31 00:52:49 +00:00
|
|
|
#define CATCH_CONFIG_RUNNER
|
|
|
|
#include "third_party/catch/include/catch.hpp"
|
|
|
|
|
|
|
|
namespace xe {
|
2020-11-26 00:44:24 +00:00
|
|
|
namespace test_suite {
|
|
|
|
|
|
|
|
int test_suite_main(const std::vector<std::string>& args) {
|
|
|
|
// Catch doesn't expose a way to pass a vector of strings, despite building a
|
|
|
|
// vector internally.
|
|
|
|
int argc = 0;
|
|
|
|
std::vector<const char*> argv;
|
|
|
|
for (const auto& arg : args) {
|
|
|
|
argv.push_back(arg.c_str());
|
|
|
|
argc++;
|
|
|
|
}
|
2016-01-01 20:54:36 +00:00
|
|
|
|
|
|
|
// Run Catch.
|
2020-11-26 00:44:24 +00:00
|
|
|
return Catch::Session().run(argc, argv.data());
|
2016-01-01 20:54:36 +00:00
|
|
|
}
|
|
|
|
|
2020-11-26 00:44:24 +00:00
|
|
|
} // namespace test_suite
|
2016-01-01 20:54:36 +00:00
|
|
|
} // namespace xe
|
|
|
|
|
2020-11-26 00:44:24 +00:00
|
|
|
#ifndef XE_TEST_SUITE_NAME
|
|
|
|
#error XE_TEST_SUITE_NAME is undefined!
|
|
|
|
#endif
|
|
|
|
|
|
|
|
DEFINE_ENTRY_POINT(XE_TEST_SUITE_NAME, xe::test_suite::test_suite_main, "");
|