diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-07-23 17:39:56 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-09-17 12:28:55 +0300 |
commit | 79670593de7ce2a7bfcf86d373dd145f5c52cb55 (patch) | |
tree | c8d95bf5a9a6e306ff92760948344fe2c4b77130 /test/src | |
parent | d424850257cc5e747c9d9525ef8a8a4de3df2f90 (diff) | |
download | qtlocation-mapboxgl-79670593de7ce2a7bfcf86d373dd145f5c52cb55.tar.gz |
[build] Make test/util.hpp a public interface
We will build the tests as a library and platforms will
provide the test runner.
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/mbgl/test/util.hpp | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/test/src/mbgl/test/util.hpp b/test/src/mbgl/test/util.hpp deleted file mode 100644 index 9f56841dcc..0000000000 --- a/test/src/mbgl/test/util.hpp +++ /dev/null @@ -1,78 +0,0 @@ -#pragma once - -#ifdef __APPLE__ -#include <TargetConditionals.h> -#endif - -#if ANDROID - #define TEST_READ_ONLY 0 - #undef TEST_HAS_SERVER - #define TEST_HAS_SERVER 0 -#elif TARGET_OS_IOS - #define TEST_READ_ONLY 1 - #undef TEST_HAS_SERVER - #define TEST_HAS_SERVER 0 -#else - #define TEST_READ_ONLY 0 - #ifndef TEST_HAS_SERVER - #define TEST_HAS_SERVER 1 - #endif -#endif - -#if TARGET_OS_SIMULATOR - #define TEST_IS_SIMULATOR 1 -#else - #define TEST_IS_SIMULATOR 0 -#endif - -#if !TEST_IS_SIMULATOR && !CI_BUILD -#define TEST_REQUIRES_ACCURATE_TIMING(name) name -#else -#define TEST_REQUIRES_ACCURATE_TIMING(name) DISABLED_ ## name -#endif - -#if !TEST_READ_ONLY -#define TEST_REQUIRES_WRITE(name) name -#else -#define TEST_REQUIRES_WRITE(name) DISABLED_ ## name -#endif - -#if TEST_HAS_SERVER -#define TEST_REQUIRES_SERVER(name) name -#else -#define TEST_REQUIRES_SERVER(name) DISABLED_ ## name -#endif - -#if !CI_BUILD -#define TEST_DISABLED_ON_CI(name) name -#else -#define TEST_DISABLED_ON_CI(name) DISABLED_ ## name -#endif - -#include <mbgl/util/image.hpp> -#include <mbgl/util/chrono.hpp> - -#include <cstdint> -#include <memory> - -#include <gtest/gtest.h> - -namespace mbgl { -namespace test { - -class Server { -public: - Server(const char* script); - ~Server(); - -private: - int fd = -1; -}; - -void checkImage(const std::string& base, - const PremultipliedImage& actual, - double imageThreshold = 0, - double pixelThreshold = 0); - -} // namespace test -} // namespace mbgl |