diff options
author | Juha Alanen <juha.alanen@mapbox.com> | 2020-01-10 14:05:05 +0200 |
---|---|---|
committer | Juha Alanen <juha.alanen@mapbox.com> | 2020-01-10 17:19:30 +0200 |
commit | f4385a11d2c236f3f8ddffd5be52016f8a3b4e77 (patch) | |
tree | bf542e939e0a536961489d5960410997569dceee | |
parent | 0b3942572e5fc7be575ff15c82a9e31d508609f7 (diff) | |
download | qtlocation-mapboxgl-f4385a11d2c236f3f8ddffd5be52016f8a3b4e77.tar.gz |
[android] Use stub HTTP file source for test runners
-rw-r--r-- | next/platform/android/android.cmake | 5 | ||||
-rw-r--r-- | platform/android/src/test/http_file_source_test_stub.cpp | 18 |
2 files changed, 22 insertions, 1 deletions
diff --git a/next/platform/android/android.cmake b/next/platform/android/android.cmake index 59b92f59fb..429963b87b 100644 --- a/next/platform/android/android.cmake +++ b/next/platform/android/android.cmake @@ -106,7 +106,6 @@ target_sources( ${MBGL_ROOT}/platform/android/src/gson/json_object.hpp ${MBGL_ROOT}/platform/android/src/gson/json_primitive.cpp ${MBGL_ROOT}/platform/android/src/gson/json_primitive.hpp - ${MBGL_ROOT}/platform/android/src/http_file_source.cpp ${MBGL_ROOT}/platform/android/src/image.cpp ${MBGL_ROOT}/platform/android/src/java/util.cpp ${MBGL_ROOT}/platform/android/src/java/util.hpp @@ -257,6 +256,7 @@ add_library( mbgl-core-android STATIC ${MBGL_ROOT}/platform/android/src/file_source.cpp ${MBGL_ROOT}/platform/android/src/file_source.hpp + ${MBGL_ROOT}/platform/android/src/http_file_source.cpp ${MBGL_ROOT}/platform/android/src/i18n/collator.cpp ${MBGL_ROOT}/platform/android/src/i18n/collator_jni.hpp ${MBGL_ROOT}/platform/android/src/i18n/number_format.cpp @@ -328,6 +328,7 @@ add_library( ${MBGL_ROOT}/platform/android/src/test/collator_test_stub.cpp ${MBGL_ROOT}/platform/android/src/test/number_format_test_stub.cpp ${MBGL_ROOT}/platform/default/src/mbgl/storage/file_source.cpp + ${MBGL_ROOT}/platform/android/src/test/http_file_source_test_stub.cpp ) target_include_directories( @@ -377,6 +378,7 @@ add_library( ${MBGL_ROOT}/platform/android/src/test/collator_test_stub.cpp ${MBGL_ROOT}/platform/android/src/test/number_format_test_stub.cpp ${MBGL_ROOT}/platform/default/src/mbgl/storage/file_source.cpp + ${MBGL_ROOT}/platform/android/src/test/http_file_source_test_stub.cpp ) target_include_directories( @@ -425,6 +427,7 @@ add_library( ${MBGL_ROOT}/platform/default/src/mbgl/text/local_glyph_rasterizer.cpp ${MBGL_ROOT}/platform/android/src/test/collator_test_stub.cpp ${MBGL_ROOT}/platform/android/src/test/number_format_test_stub.cpp + ${MBGL_ROOT}/platform/android/src/test/http_file_source_test_stub.cpp ) target_include_directories( diff --git a/platform/android/src/test/http_file_source_test_stub.cpp b/platform/android/src/test/http_file_source_test_stub.cpp new file mode 100644 index 0000000000..930a20907a --- /dev/null +++ b/platform/android/src/test/http_file_source_test_stub.cpp @@ -0,0 +1,18 @@ +#include <mbgl/storage/http_file_source.hpp> +#include <mbgl/storage/resource.hpp> + +#include <mbgl/util/async_task.hpp> + +namespace mbgl { + +class HTTPFileSource::Impl {}; + +HTTPFileSource::HTTPFileSource() : impl(std::make_unique<Impl>()) {} + +HTTPFileSource::~HTTPFileSource() = default; + +std::unique_ptr<AsyncRequest> HTTPFileSource::request(const Resource&, Callback) { + return std::make_unique<AsyncRequest>(); +} + +} // namespace mbgl |