summaryrefslogtreecommitdiff
path: root/platform/macos/test
diff options
context:
space:
mode:
authorJesse Bounds <jesse@rebounds.net>2017-04-12 15:22:55 -0400
committerJesse Bounds <jesse@rebounds.net>2017-04-13 14:52:15 -0400
commit9340b4822a9d5f43952ba71ff16315d606de50bc (patch)
tree1984817588ebb6b5168d9a8484df86c49dc3fc48 /platform/macos/test
parentcf8584538c8bf3c524a6dc54c07a301bf14523be (diff)
downloadqtlocation-mapboxgl-9340b4822a9d5f43952ba71ff16315d606de50bc.tar.gz
[ios, macos] Add Swift integration tests for map view delegate
Diffstat (limited to 'platform/macos/test')
-rw-r--r--platform/macos/test/MGLMapViewDelegateIntegrationTests.swift56
1 files changed, 56 insertions, 0 deletions
diff --git a/platform/macos/test/MGLMapViewDelegateIntegrationTests.swift b/platform/macos/test/MGLMapViewDelegateIntegrationTests.swift
new file mode 100644
index 0000000000..3f82e7c61a
--- /dev/null
+++ b/platform/macos/test/MGLMapViewDelegateIntegrationTests.swift
@@ -0,0 +1,56 @@
+import XCTest
+import Mapbox
+
+class MGLMapViewDelegateIntegrationTests: XCTestCase {
+
+ func testCoverage() {
+ MGLSDKTestHelpers.checkTestsContainAllMethods(testClass: MGLMapViewDelegateIntegrationTests.self, in: MGLMapViewDelegate.self)
+ }
+
+}
+
+extension MGLMapViewDelegateIntegrationTests: MGLMapViewDelegate {
+
+ func mapView(_ mapView: MGLMapView, shouldChangeFrom oldCamera: MGLMapCamera, to newCamera: MGLMapCamera) -> Bool { return false }
+
+ func mapView(_ mapView: MGLMapView, lineWidthForPolylineAnnotation annotation: MGLPolyline) -> CGFloat { return 0 }
+
+ func mapView(_ mapView: MGLMapView, annotationCanShowCallout annotation: MGLAnnotation) -> Bool { return false }
+
+ func mapView(_ mapView: MGLMapView, imageFor annotation: MGLAnnotation) -> MGLAnnotationImage? { return nil }
+
+ func mapView(_ mapView: MGLMapView, alphaForShapeAnnotation annotation: MGLShape) -> CGFloat { return 0 }
+
+ func mapViewDidFinishRenderingFrame(_ mapView: MGLMapView, fullyRendered: Bool) {}
+
+ func mapViewDidFinishRenderingMap(_ mapView: MGLMapView, fullyRendered: Bool) {}
+
+ func mapViewDidFailLoadingMap(_ mapView: MGLMapView, withError error: Error) {}
+
+ func mapView(_ mapView: MGLMapView, didDeselect annotation: MGLAnnotation) {}
+
+ func mapView(_ mapView: MGLMapView, didSelect annotation: MGLAnnotation) {}
+
+ func mapView(_ mapView: MGLMapView, didFinishLoading style: MGLStyle) {}
+
+ func mapViewWillStartRenderingFrame(_ mapView: MGLMapView) {}
+
+ func mapViewWillStartRenderingMap(_ mapView: MGLMapView) {}
+
+ func mapViewWillStartLoadingMap(_ mapView: MGLMapView) {}
+
+ func mapViewDidFinishLoadingMap(_ mapView: MGLMapView) {}
+
+ func mapViewCameraIsChanging(_ mapView: MGLMapView) {}
+
+ func mapView(_ mapView: MGLMapView, cameraDidChangeAnimated animated: Bool) {}
+
+ func mapView(_ mapView: MGLMapView, cameraWillChangeAnimated animated: Bool) {}
+
+ func mapView(_ mapView: MGLMapView, strokeColorForShapeAnnotation annotation: MGLShape) -> NSColor { return .black }
+
+ func mapView(_ mapView: MGLMapView, fillColorForPolygonAnnotation annotation: MGLPolygon) -> NSColor { return .black }
+
+ func mapView(_ mapView: MGLMapView, calloutViewControllerFor annotation: MGLAnnotation) -> NSViewController? { return nil }
+
+}