forked from mapbox/mapbox-maps-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use constant test values in locations tests, update fixtures (mapbox#…
…2269) Co-authored-by: Release SDK bot for Maps SDK team <[email protected]>
- Loading branch information
1 parent
b724094
commit 7016454
Showing
36 changed files
with
228 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
Tests/MapboxMapsTests/Helpers/Random/CLAccuracyAuthorization+Random.swift
This file was deleted.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
Tests/MapboxMapsTests/Helpers/Random/CLLocationCoordinate2D+Random.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import CoreLocation | ||
|
||
extension CLLocationCoordinate2D { | ||
static func random() -> Self { | ||
static func testConstantValue() -> Self { | ||
return CLLocationCoordinate2D( | ||
latitude: .random(in: -90...90), | ||
longitude: .random(in: -180..<180)) | ||
latitude: .testConstantValue(), | ||
longitude: .testConstantValue()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
Tests/MapboxMapsTests/Location/Fixtures/Location+Fixtures.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import MapboxMaps | ||
import MapboxCommon | ||
|
||
extension Location { | ||
static func testConstantValue() -> Location { | ||
Location( | ||
coordinate: .testConstantValue(), | ||
timestamp: Date(), | ||
bearing: .testConstantValue(), | ||
bearingAccuracy: .testConstantValue() | ||
) | ||
} | ||
} | ||
|
||
extension Heading { | ||
static func testConstantValue() -> Heading { | ||
Heading(direction: .testConstantValue(), | ||
accuracy: .testSourceValue()) | ||
} | ||
} | ||
|
||
extension PuckRenderingData { | ||
static func testConstantValue() -> PuckRenderingData { | ||
PuckRenderingData(location: .testConstantValue(), heading: .testConstantValue()) | ||
} | ||
} | ||
|
||
extension CLAccuracyAuthorization { | ||
static func testConstantValue() -> Self { | ||
return .reducedAccuracy | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.