Files
MapLibreParticleLab/platform/qt/test/main.cpp
Dan Paulat 8b804a1903 maplibre support for Qt6 and MSVC 2019 (#125)
* [qt] Updating CMake project files for Qt6

* [qt] Updating non-test projects for Qt6 and msvc2019

* [qt] Test fixes for Qt6 and msvc2019

* [qt] Link whole test archive for Qt and msvc2019

* [qt] Fixing Qt6 headless backend renderer

* [qt] Fixes for test failures

* [qt] Expression and style parser test fixes

* [qt] Backwards compatibility with Qt5 and Qt6

Minimum version is Qt 5.4 due to use of QOpenGLWidget

* [qt] LLVM is no longer required for a Windows build

* [msvc] msvc2019 fixes for maplibre

* Update test/storage/offline_database.test.cpp

Co-authored-by: Tadej Novak <tadej@tano.si>

* Vector + const is not standard C++

Co-authored-by: Tadej Novak <tadej@tano.si>
2021-08-07 11:10:45 -04:00

30 lines
569 B
C++

#include <QApplication>
#include <mbgl/test.hpp>
#include <cstring>
#include <cerrno>
#include <cstdio>
#if defined(_MSC_VER) && !defined(__clang__)
#include <direct.h>
#else
#include <unistd.h>
#endif
#define xstr(s) str(s)
#define str(s) #s
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
#ifdef WORK_DIRECTORY
const int result = chdir(xstr(WORK_DIRECTORY));
if (result != 0) {
fprintf(stderr, "failed to change directory: %s\n", strerror(errno));
return errno;
}
#endif
return mbgl::runTests(argc, argv);
}