2023-05-20 12:54:50 +02:00
|
|
|
#include "singletons/Settings.hpp"
|
|
|
|
|
2021-08-08 14:16:30 +02:00
|
|
|
#include <benchmark/benchmark.h>
|
|
|
|
#include <QApplication>
|
|
|
|
#include <QtConcurrent>
|
|
|
|
|
2023-05-20 12:54:50 +02:00
|
|
|
using namespace chatterino;
|
|
|
|
|
2021-08-08 14:16:30 +02:00
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
QApplication app(argc, argv);
|
|
|
|
|
|
|
|
::benchmark::Initialize(&argc, argv);
|
|
|
|
|
2023-05-20 12:54:50 +02:00
|
|
|
// Ensure settings are initialized before any tests are run
|
2023-05-21 12:10:49 +02:00
|
|
|
chatterino::Settings settings("/tmp/c2-empty-mock");
|
2023-05-20 12:54:50 +02:00
|
|
|
|
2021-08-08 14:16:30 +02:00
|
|
|
QtConcurrent::run([&app] {
|
|
|
|
::benchmark::RunSpecifiedBenchmarks();
|
|
|
|
|
|
|
|
app.exit(0);
|
|
|
|
});
|
|
|
|
|
|
|
|
return app.exec();
|
|
|
|
}
|