summaryrefslogtreecommitdiff
path: root/test/src/mbgl/test/test.cpp
blob: 30df01c488e0e952a476e0beae54143f34f4dcab (plain)
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
26
27
#include <mbgl/actor/scheduler.hpp>
#include <mbgl/gfx/backend.hpp>
#include <mbgl/test.hpp>
#include <mbgl/test/util.hpp>

#include <gtest/gtest.h>

#include <args.hxx>

namespace mbgl {

int runTests(int argc, char *argv[]) {
#if TEST_HAS_SERVER
    auto server = std::make_unique<test::Server>("test/storage/server.js");
#endif

    testing::InitGoogleTest(&argc, argv);

    args::ArgumentParser argumentParser("Unit tests");
    args::ValueFlag<std::string> backendValue(argumentParser, "Backend", "Rendering backend", {"backend"});

    argumentParser.ParseCLI(argc, argv);

    return RUN_ALL_TESTS();
}

} // namespace mbgl