diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2016-06-23 16:39:27 +0200 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2016-11-27 18:50:24 +0200 |
commit | c810d16f0d2787f15e06651ea595020415d5a8d5 (patch) | |
tree | 216b098897a887f5c1a8fff0aa78350e75445e52 /test | |
parent | 5ae92de618e5242f6a8a30485b5ecaa9ef0ebb5e (diff) | |
download | qtlocation-mapboxgl-c810d16f0d2787f15e06651ea595020415d5a8d5.tar.gz |
[android][build] core tests - initial setup for rendering tests
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/annotations/assets.zip | bin | 481374 -> 0 bytes | |||
-rw-r--r-- | test/fixtures/api/assets.zip | bin | 167696 -> 0 bytes | |||
-rw-r--r-- | test/fixtures/storage/assets.zip | bin | 1243 -> 0 bytes | |||
-rw-r--r-- | test/map/transform.test.cpp | 6 | ||||
-rw-r--r-- | test/src/mbgl/test/util.hpp | 5 | ||||
-rw-r--r-- | test/storage/asset_file_source.test.cpp | 2 |
6 files changed, 11 insertions, 2 deletions
diff --git a/test/fixtures/annotations/assets.zip b/test/fixtures/annotations/assets.zip Binary files differdeleted file mode 100644 index 869380034f..0000000000 --- a/test/fixtures/annotations/assets.zip +++ /dev/null diff --git a/test/fixtures/api/assets.zip b/test/fixtures/api/assets.zip Binary files differdeleted file mode 100644 index fe00443f61..0000000000 --- a/test/fixtures/api/assets.zip +++ /dev/null diff --git a/test/fixtures/storage/assets.zip b/test/fixtures/storage/assets.zip Binary files differdeleted file mode 100644 index 4006ee10f2..0000000000 --- a/test/fixtures/storage/assets.zip +++ /dev/null diff --git a/test/map/transform.test.cpp b/test/map/transform.test.cpp index 0cd92bfc2f..7f3a5e0556 100644 --- a/test/map/transform.test.cpp +++ b/test/map/transform.test.cpp @@ -109,7 +109,13 @@ TEST(Transform, IntegerZoom) { auto checkIntegerZoom = [&transform](uint8_t zoomInt, double zoom) { double scale = transform.getState().zoomScale(zoom); transform.setScale(scale); +#if __ANDROID__ + // Android uses log(x) / M_LN2 instead of log2(x) because the latter + // is _broken in ARMv5 - that approach being less precise than log2(x). + ASSERT_NEAR(transform.getScale(), scale, 0.0001); +#else ASSERT_DOUBLE_EQ(transform.getScale(), scale); +#endif ASSERT_NEAR(transform.getZoom(), zoom, 0.0001); ASSERT_EQ(transform.getState().getIntegerZoom(), zoomInt); ASSERT_NEAR(transform.getState().getZoomFraction(), zoom - zoomInt, 0.0001); diff --git a/test/src/mbgl/test/util.hpp b/test/src/mbgl/test/util.hpp index 8445822699..34d8969d3c 100644 --- a/test/src/mbgl/test/util.hpp +++ b/test/src/mbgl/test/util.hpp @@ -4,7 +4,10 @@ #include <TargetConditionals.h> #endif -#if TARGET_OS_IOS +#if __ANDROID__ +#define TEST_READ_ONLY 0 +#define TEST_HAS_SERVER 0 +#elif TARGET_OS_IOS #define TEST_READ_ONLY 1 #define TEST_HAS_SERVER 0 #else diff --git a/test/storage/asset_file_source.test.cpp b/test/storage/asset_file_source.test.cpp index b275cfc05a..7e634fc68e 100644 --- a/test/storage/asset_file_source.test.cpp +++ b/test/storage/asset_file_source.test.cpp @@ -27,7 +27,7 @@ TEST(AssetFileSource, Load) { AssetFileSource fs(getFileSourceRoot()); // iOS seems to run out of file descriptors... -#if TARGET_OS_IPHONE +#if TARGET_OS_IPHONE || __ANDROID__ unsigned numThreads = 30; #else unsigned numThreads = 50; |