diff options
Diffstat (limited to 'platform/darwin/test/MGLExpressionTests.mm')
-rw-r--r-- | platform/darwin/test/MGLExpressionTests.mm | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/platform/darwin/test/MGLExpressionTests.mm b/platform/darwin/test/MGLExpressionTests.mm index 61d389f9f9..9c75dedaa3 100644 --- a/platform/darwin/test/MGLExpressionTests.mm +++ b/platform/darwin/test/MGLExpressionTests.mm @@ -710,30 +710,15 @@ using namespace std::string_literals; XCTAssertEqualObjects(expression.mgl_jsonExpressionObject, jsonExpression); XCTAssertEqualObjects([NSExpression expressionWithMGLJSONObject:jsonExpression], expression); } -} - -- (void)testInterpolationExpressionObjectWithEmptyStopsDictionary { { NSDictionary *stops = @{}; NSExpression *expression = [NSExpression expressionWithFormat:@"mgl_interpolate:withCurveType:parameters:stops:(x, 'cubic-bezier', { 0.42, 0, 0.58, 1 }, %@)", stops]; - @try { - (void)expression.mgl_jsonExpressionObject; - XCTFail(); - } - @catch (NSException *e){ - XCTAssert(e.name == NSInvalidArgumentException); - } + XCTAssertThrowsSpecificNamed(expression.mgl_jsonExpressionObject, NSException, NSInvalidArgumentException); } { NSDictionary *stops = @{}; NSExpression *expression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:($zoomLevel, 11, %@)", stops]; - @try { - (void)expression.mgl_jsonExpressionObject; - XCTFail(); - } - @catch (NSException *e){ - XCTAssert(e.name == NSInvalidArgumentException); - } + XCTAssertThrowsSpecificNamed(expression.mgl_jsonExpressionObject, NSException, NSInvalidArgumentException); } } |