Files
MapLibreParticleLab/platform/osx/test/MGLStyleTests.mm
Minh Nguyễn ceb0790cd8 [osx] Unit tests
Added an XCTest bundle to the osxsdk scheme. It contains some basic tests of shared iOS/OS X code.
2015-12-24 14:41:23 -08:00

30 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#import "MGLStyle.h"
#import <mbgl/util/default_styles.hpp>
#pragma clang diagnostic ignored "-Wgnu-statement-expression"
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#import <XCTest/XCTest.h>
@interface MGLStyleTests : XCTestCase
@end
@implementation MGLStyleTests
- (void)testStyleURLs {
// Test that all the default styles have publicly-declared MGLStyle class
// methods and that the URLs are all well-formed.
XCTAssertEqualObjects([MGLStyle streetsStyleURL].absoluteString, @(mbgl::util::default_styles::streets.url));
XCTAssertEqualObjects([MGLStyle emeraldStyleURL].absoluteString, @(mbgl::util::default_styles::emerald.url));
XCTAssertEqualObjects([MGLStyle lightStyleURL].absoluteString, @(mbgl::util::default_styles::light.url));
XCTAssertEqualObjects([MGLStyle darkStyleURL].absoluteString, @(mbgl::util::default_styles::dark.url));
XCTAssertEqualObjects([MGLStyle satelliteStyleURL].absoluteString, @(mbgl::util::default_styles::satellite.url));
XCTAssertEqualObjects([MGLStyle hybridStyleURL].absoluteString, @(mbgl::util::default_styles::hybrid.url));
static_assert(6 == mbgl::util::default_styles::numOrderedStyles,
"MGLStyleTests isn’t testing all the styles in mbgl::util::default_styles.");
}
@end