diff options
author | Jesse Bounds <jesse@rebounds.net> | 2016-12-02 13:47:48 -0800 |
---|---|---|
committer | Jesse Bounds <jesse@rebounds.net> | 2016-12-02 14:21:05 -0800 |
commit | 179e9c610fcc771f0c94db09cda720aabc28b752 (patch) | |
tree | cd2fa5c039c0402cc440d3d00072b588cda2d206 /platform/ios/test | |
parent | 1db0a96927d53bc0216d48cf5add1254ae6cab89 (diff) | |
download | qtlocation-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/test')
-rw-r--r-- | platform/ios/test/MGLSourceTests.m | 24 |
1 files changed, 0 insertions, 24 deletions
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 |