mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-01-30 19:13:09 +00:00
Yellow squiggly lines begone! Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes. If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed. The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports. Not everything is removed, but the cleanup should be substantial enough. Because this done on Linux, code that isn't used on it is mostly untouched. (Hopefully no open PR is depending on these imports...)
28 lines
666 B
C++
28 lines
666 B
C++
// Copyright 2023 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
// Based on gtest_main.cc
|
|
|
|
#include "Common/MsgHandler.h"
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
namespace
|
|
{
|
|
bool TestMsgHandler(const char* caption, const char* text, bool yes_no, Common::MsgType style)
|
|
{
|
|
fmt::print(stderr, "{}\n", text);
|
|
ADD_FAILURE();
|
|
// Return yes to any question (we don't need Dolphin to break on asserts)
|
|
return true;
|
|
}
|
|
} // namespace
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
fmt::print(stderr, "Running main() from UnitTestsMain.cpp\n");
|
|
Common::RegisterMsgAlertHandler(TestMsgHandler);
|
|
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
return RUN_ALL_TESTS();
|
|
}
|