summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-04-27 13:41:00 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-04-27 13:41:29 -0700
commitc6420b1549d9d9d65fa39ed2f456ff15c1093cc8 (patch)
tree46ef67f4c691b9f8b529321dca8fdafbca383de7 /platform
parentb4b693e09f7d765b0aa84df208cf8d70ce381b45 (diff)
downloadqtlocation-mapboxgl-c6420b1549d9d9d65fa39ed2f456ff15c1093cc8.tar.gz
[ios] Updated offline pack tests
Updated the MGLOfflinePackProgress boxing test to test the two new fields. Wordsmithed the documentation a bit. Updated the changelog.
Diffstat (limited to 'platform')
-rw-r--r--platform/darwin/src/MGLOfflinePack.h7
-rw-r--r--platform/darwin/test/MGLOfflinePackTests.m6
-rw-r--r--platform/ios/CHANGELOG.md1
3 files changed, 10 insertions, 4 deletions
diff --git a/platform/darwin/src/MGLOfflinePack.h b/platform/darwin/src/MGLOfflinePack.h
index 4d41e70f76..3d4422da33 100644
--- a/platform/darwin/src/MGLOfflinePack.h
+++ b/platform/darwin/src/MGLOfflinePack.h
@@ -55,12 +55,13 @@ typedef NS_ENUM (NSInteger, MGLOfflinePackState) {
*/
typedef struct MGLOfflinePackProgress {
/**
- The number of resources that have been completely downloaded and are ready
- to use offline.
+ The number of resources, including tiles, that have been completely
+ downloaded and are ready to use offline.
*/
uint64_t countOfResourcesCompleted;
/**
- The cumulative size of the downloaded resources (inclusive of tiles) on disk, measured in bytes.
+ The cumulative size of the downloaded resources on disk, including tiles,
+ measured in bytes.
*/
uint64_t countOfBytesCompleted;
/**
diff --git a/platform/darwin/test/MGLOfflinePackTests.m b/platform/darwin/test/MGLOfflinePackTests.m
index 7fb450198e..fa231ba005 100644
--- a/platform/darwin/test/MGLOfflinePackTests.m
+++ b/platform/darwin/test/MGLOfflinePackTests.m
@@ -20,9 +20,11 @@
- (void)testProgressBoxing {
MGLOfflinePackProgress progress = {
- .countOfResourcesCompleted = 1,
+ .countOfResourcesCompleted = 3,
.countOfResourcesExpected = 2,
.countOfBytesCompleted = 7,
+ .countOfTilesCompleted = 1,
+ .countOfTileBytesCompleted = 6,
.maximumResourcesExpected = UINT64_MAX,
};
MGLOfflinePackProgress roundTrippedProgress = [NSValue valueWithMGLOfflinePackProgress:progress].MGLOfflinePackProgressValue;
@@ -30,6 +32,8 @@
XCTAssertEqual(progress.countOfResourcesCompleted, roundTrippedProgress.countOfResourcesCompleted, @"Completed resources should round-trip.");
XCTAssertEqual(progress.countOfResourcesExpected, roundTrippedProgress.countOfResourcesExpected, @"Expected resources should round-trip.");
XCTAssertEqual(progress.countOfBytesCompleted, roundTrippedProgress.countOfBytesCompleted, @"Completed bytes should round-trip.");
+ XCTAssertEqual(progress.countOfTilesCompleted, roundTrippedProgress.countOfTilesCompleted, @"Completed tiles should round-trip.");
+ XCTAssertEqual(progress.countOfTileBytesCompleted, roundTrippedProgress.countOfTileBytesCompleted, @"Completed tile bytes should round-trip.");
XCTAssertEqual(progress.maximumResourcesExpected, roundTrippedProgress.maximumResourcesExpected, @"Maximum expected resources should round-trip.");
}
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index e36fd46290..290df69aed 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -9,6 +9,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CON
- The user dot now moves smoothly between user location updates while user location tracking is disabled. ([#1582](https://github.com/mapbox/mapbox-gl-native/pull/1582))
- An MGLAnnotation can be relocated by changing its `coordinate` property in a KVO-compliant way. An MGLMultiPoint cannot be relocated. ([#3835](https://github.com/mapbox/mapbox-gl-native/pull/3835))
- Setting the `image` property of an MGLAnnotationImage to `nil` resets it to the default red pin image and reclaims resources that can be used to customize additional annotations. ([#3835](https://github.com/mapbox/mapbox-gl-native/pull/3835))
+- `MGLOfflinePackProgress` now indicates how many tiles have been downloaded and how much space they take up. ([#4874](https://github.com/mapbox/mapbox-gl-native/pull/4874))
- The compass, user dot, and visible annotations are now accessible to VoiceOver users. ([#1496](https://github.com/mapbox/mapbox-gl-native/pull/1496))
- The SDK is now localizable. No localizations are currently provided, other than English, but if you need a particular localization, you can install the SDK manually and drop a .lproj folder into the framework. ([#4783](https://github.com/mapbox/mapbox-gl-native/pull/4783))
- Fixed an issue preventing KVO change notifications from being generated on MGLMapView’s `userTrackingMode` key path when `-setUserTrackingMode:animated:` is called. ([#4724](https://github.com/mapbox/mapbox-gl-native/pull/4724))