Files
MapLibreParticleLab/platform/darwin/test/MLNSourceQueryTests.m
mwilsnd 20d9e1028c Platform flattening overhaul (#1393)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bart Louwers <bart@emeel.net>
2023-07-26 17:50:34 +02:00

26 lines
936 B
Objective-C

#import <Mapbox.h>
#import <XCTest/XCTest.h>
@interface MLNSourceQueryTests : XCTestCase <MLNMapViewDelegate>
@end
@implementation MLNSourceQueryTests
- (void) testQueryVectorTileSource {
MLNVectorTileSource *source = [[MLNVectorTileSource alloc] initWithIdentifier:@"vector" tileURLTemplates:@[@"fake"] options:nil];
NSSet *sourceLayers = [NSSet setWithObjects:@"buildings", @"water", nil];
NSArray* features = [source featuresInSourceLayersWithIdentifiers:sourceLayers predicate:nil];
// Source not added yet, so features is 0
XCTAssertEqual([features count], 0);
}
- (void) testQueryShapeSource {
MLNShapeSource *source = [[MLNShapeSource alloc] initWithIdentifier:@"shape" shape:[MLNShapeCollection shapeCollectionWithShapes:@[]] options:nil];
NSArray* features = [source featuresMatchingPredicate:nil];
// Source not added yet, so features is 0
XCTAssertEqual([features count], 0);
}
@end