2020-12-26 12:42:39 +01:00
|
|
|
#include "common/NetworkManager.hpp"
|
|
|
|
#include "common/NetworkRequest.hpp"
|
|
|
|
#include "common/NetworkResult.hpp"
|
|
|
|
#include "common/Outcome.hpp"
|
|
|
|
#include "common/QLogging.hpp"
|
Sort and force grouping of includes (#4172)
This change enforces strict include grouping using IncludeCategories
In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:
In ChatterSet.hpp, I changed lrucache to a <>include
In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)
2022-11-27 19:32:53 +01:00
|
|
|
#include "providers/twitch/api/Helix.hpp"
|
2023-04-01 13:23:18 +02:00
|
|
|
#include "singletons/Settings.hpp"
|
2020-12-26 12:42:39 +01:00
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
Sort and force grouping of includes (#4172)
This change enforces strict include grouping using IncludeCategories
In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:
In ChatterSet.hpp, I changed lrucache to a <>include
In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)
2022-11-27 19:32:53 +01:00
|
|
|
#include <QApplication>
|
2020-12-26 12:42:39 +01:00
|
|
|
#include <QJsonArray>
|
|
|
|
#include <QtConcurrent>
|
Sort and force grouping of includes (#4172)
This change enforces strict include grouping using IncludeCategories
In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:
In ChatterSet.hpp, I changed lrucache to a <>include
In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)
2022-11-27 19:32:53 +01:00
|
|
|
#include <QTimer>
|
2020-12-26 12:42:39 +01:00
|
|
|
|
|
|
|
#include <chrono>
|
|
|
|
#include <thread>
|
|
|
|
|
|
|
|
using namespace chatterino;
|
|
|
|
|
2022-05-07 17:22:39 +02:00
|
|
|
#define SUPPORT_QT_NETWORK_TESTS
|
|
|
|
|
2020-12-26 12:42:39 +01:00
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
|
|
|
2022-05-07 17:22:39 +02:00
|
|
|
#ifdef SUPPORT_QT_NETWORK_TESTS
|
2020-12-26 12:42:39 +01:00
|
|
|
QApplication app(argc, argv);
|
|
|
|
|
|
|
|
chatterino::NetworkManager::init();
|
|
|
|
|
2023-04-01 13:23:18 +02:00
|
|
|
// Ensure settings are initialized before any tests are run
|
|
|
|
chatterino::Settings settings("/tmp/c2-empty-test");
|
|
|
|
|
2020-12-26 12:42:39 +01:00
|
|
|
QtConcurrent::run([&app] {
|
|
|
|
auto res = RUN_ALL_TESTS();
|
|
|
|
|
|
|
|
chatterino::NetworkManager::deinit();
|
|
|
|
|
|
|
|
app.exit(res);
|
|
|
|
});
|
2019-05-11 14:13:03 +02:00
|
|
|
|
2020-12-26 12:42:39 +01:00
|
|
|
return app.exec();
|
2022-05-07 17:22:39 +02:00
|
|
|
#else
|
|
|
|
return RUN_ALL_TESTS();
|
|
|
|
#endif
|
2020-12-26 12:42:39 +01:00
|
|
|
}
|