[ios] Updated offline pack tests
Updated the MGLOfflinePackProgress boxing test to test the two new fields. Wordsmithed the documentation a bit. Updated the changelog.
This commit is contained in:
committed by
Minh Nguyễn
parent
b4b693e09f
commit
c6420b1549
@@ -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;
|
||||
/**
|
||||
|
||||
@@ -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.");
|
||||
}
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user