File: main.cpp

package info (click to toggle)
bismuth 3.1.4-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,704 kB
  • sloc: cpp: 5,774; sh: 165; makefile: 32; xml: 10
file content (25 lines) | stat: -rw-r--r-- 610 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// SPDX-FileCopyrightText: 2022 Mikhail Zolotukhin <mail@gikari.com>
// SPDX-License-Identifier: MIT

#define DOCTEST_CONFIG_IMPLEMENT
#include <doctest/doctest.h>

#include <QCoreApplication>
#include <QTimer>

int main(int argc, char **argv)
{
    // Init core application to be able to use Qt stuff
    QCoreApplication app(argc, argv);

    auto testRunner = [&]() {
        doctest::Context context;
        context.applyCommandLine(argc, argv);
        app.exit(context.run());
    };

    QTimer::singleShot(0, &app, testRunner);
    QTimer::singleShot(0, &app, SLOT(quit()));

    return app.exec();
}