summaryrefslogtreecommitdiff
path: root/platform/ios
diff options
context:
space:
mode:
authorJesse Bounds <jesse@rebounds.net>2016-12-02 13:47:48 -0800
committerJesse Bounds <jesse@rebounds.net>2016-12-02 14:21:05 -0800
commit179e9c610fcc771f0c94db09cda720aabc28b752 (patch)
treecd2fa5c039c0402cc440d3d00072b588cda2d206 /platform/ios
parent1db0a96927d53bc0216d48cf5add1254ae6cab89 (diff)
downloadqtlocation-mapboxgl-179e9c610fcc771f0c94db09cda720aabc28b752.tar.gz
[ios, macos] Consolidate tests of MGLStyle addSource in MGLStyleTests
This replaces the integration test of `addSource` when duplicate identifiers are used in `MGLSourceTests` with a more direct unit test in the style class's unit test file `MGLStyleTests`. Although tests of the case where the same instance are actually integration tests where the source instance itself throws, it is easier to test all of this functionality in one place using the public facing MGLStyle API.
Diffstat (limited to 'platform/ios')
-rw-r--r--platform/ios/ios.xcodeproj/project.pbxproj4
-rw-r--r--platform/ios/test/MGLSourceTests.m24
2 files changed, 0 insertions, 28 deletions
diff --git a/platform/ios/ios.xcodeproj/project.pbxproj b/platform/ios/ios.xcodeproj/project.pbxproj
index 25dcfc7252..a5c042a08c 100644
--- a/platform/ios/ios.xcodeproj/project.pbxproj
+++ b/platform/ios/ios.xcodeproj/project.pbxproj
@@ -171,7 +171,6 @@
7E016D851D9E890300A29A21 /* MGLPolygon+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E016D821D9E890300A29A21 /* MGLPolygon+MGLAdditions.h */; };
7E016D861D9E890300A29A21 /* MGLPolygon+MGLAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E016D831D9E890300A29A21 /* MGLPolygon+MGLAdditions.m */; };
7E016D871D9E890300A29A21 /* MGLPolygon+MGLAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E016D831D9E890300A29A21 /* MGLPolygon+MGLAdditions.m */; };
- 92BE56771DEDD44500A4F2B6 /* MGLSourceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 92BE56761DEDD44500A4F2B6 /* MGLSourceTests.m */; };
DA0CD5901CF56F6A00A5F5A5 /* MGLFeatureTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA0CD58F1CF56F6A00A5F5A5 /* MGLFeatureTests.mm */; };
DA17BE301CC4BAC300402C41 /* MGLMapView_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = DA17BE2F1CC4BAC300402C41 /* MGLMapView_Private.h */; };
DA17BE311CC4BDAA00402C41 /* MGLMapView_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = DA17BE2F1CC4BAC300402C41 /* MGLMapView_Private.h */; };
@@ -596,7 +595,6 @@
7E016D7D1D9E86BE00A29A21 /* MGLPolyline+MGLAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MGLPolyline+MGLAdditions.m"; sourceTree = "<group>"; };
7E016D821D9E890300A29A21 /* MGLPolygon+MGLAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MGLPolygon+MGLAdditions.h"; sourceTree = "<group>"; };
7E016D831D9E890300A29A21 /* MGLPolygon+MGLAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MGLPolygon+MGLAdditions.m"; sourceTree = "<group>"; };
- 92BE56761DEDD44500A4F2B6 /* MGLSourceTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLSourceTests.m; sourceTree = "<group>"; };
DA0CD58F1CF56F6A00A5F5A5 /* MGLFeatureTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLFeatureTests.mm; path = ../../darwin/test/MGLFeatureTests.mm; sourceTree = "<group>"; };
DA17BE2F1CC4BAC300402C41 /* MGLMapView_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLMapView_Private.h; sourceTree = "<group>"; };
DA1DC94A1CB6C1C2006E619F /* Mapbox GL.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Mapbox GL.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -902,7 +900,6 @@
children = (
3575798F1D513EF1000B822E /* Layers */,
35B8E08B1D6C8B5100E768D2 /* MGLFilterTests.mm */,
- 92BE56761DEDD44500A4F2B6 /* MGLSourceTests.m */,
DA2207BE1DC0805F0002F84D /* MGLStyleValueTests.swift */,
40CFA64E1D78754A008103BD /* Sources */,
DA2207BD1DC0805F0002F84D /* test-Bridging-Header.h */,
@@ -1916,7 +1913,6 @@
357579831D502AE6000B822E /* MGLRasterStyleLayerTests.m in Sources */,
353D23961D0B0DFE002BE09D /* MGLAnnotationViewTests.m in Sources */,
35E208A71D24210F00EC9A46 /* MGLNSDataAdditionsTests.m in Sources */,
- 92BE56771DEDD44500A4F2B6 /* MGLSourceTests.m in Sources */,
DA0CD5901CF56F6A00A5F5A5 /* MGLFeatureTests.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
diff --git a/platform/ios/test/MGLSourceTests.m b/platform/ios/test/MGLSourceTests.m
deleted file mode 100644
index 3e913d90fb..0000000000
--- a/platform/ios/test/MGLSourceTests.m
+++ /dev/null
@@ -1,24 +0,0 @@
-#import "MGLStyleLayerTests.h"
-
-@interface MGLSourceTests : MGLStyleLayerTests
-
-@end
-
-@implementation MGLSourceTests
-
-- (void)testDuplicateSources {
- MGLVectorSource *source1 = [[MGLVectorSource alloc] initWithIdentifier:@"my-source" URL:[NSURL URLWithString:@"mapbox://mapbox.mapbox-terrain-v2"]];
- MGLVectorSource *source2 = [[MGLVectorSource alloc] initWithIdentifier:@"my-source" URL:[NSURL URLWithString:@"mapbox://mapbox.mapbox-terrain-v2"]];
-
- [self.mapView.style addSource: source1];
-
- @try {
- [self.mapView.style addSource: source2];
- XCTFail(@"Should not have reached this point");
- }
- @catch (NSException *e) {
- XCTAssertNotNil(e, @"Should have thrown an exception");
- }
-}
-
-@end