Files
MapLibreParticleLab/platform/default/src/mbgl/test/main.cpp
Bart Louwers 550f64be22 core: rename mbgl namespace to mln (#4487)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-08-14 23:25:20 +02:00

29 lines
554 B
C++

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