Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[ios, macos] Fix MGLLight.anchor to accept style functions - #9089

Merged
fabian-guerra merged 1 commit into
release-ios-v3.6.0-android-v5.1.0from
fabian-mgllight-spec-fix
May 24, 2017
Merged

fabian-guerra merged 1 commit into
release-ios-v3.6.0-android-v5.1.0from
fabian-mgllight-spec-fix

Conversation

@fabian-guerra

@fabian-guerra fabian-guerra commented May 23, 2017 •

Copy link
Copy Markdown
Contributor

Fixes #9085

@fabian-guerra fabian-guerra changed the title [ios, macos [ios, macos] Fix MGLLight.anchor to accept style functions May 23, 2017
@fabian-guerra
fabian-guerra requested review from 1ec5 and jfirebaugh May 23, 2017 19:31
@fabian-guerra fabian-guerra added this to the ios-v3.6.0 milestone May 23, 2017
@jfirebaugh

Copy link
Copy Markdown
Contributor

This is intended to be targeted at the release branch, right?

@1ec5 1ec5 added crash iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS runtime styling labels May 23, 2017
@fabian-guerra
fabian-guerra changed the base branch from master to release-ios-v3.6.0-android-v5.1.0 May 24, 2017 16:22
@fabian-guerra

Copy link
Copy Markdown
Contributor Author

@jfirebaugh yesterday I pushed this branch thinking that it contained the fix I made, for an unknown reason my commit got lost. You are right this branch should be merged into release-ios-v3.6.0-android-v5.1.0

@jfirebaugh jfirebaugh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

MGLLight *mglLight = [[MGLLight alloc] initWithMBGLLight:&light];
XCTAssertEqual(mglLight.anchor, MGLLightAnchorViewport);

NSAssert([mglLight.anchor isKindOfClass:[MGLConstantStyleValue class]], @"mglLight.anchor isn’t a MGLConstantStyleValue.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a test, would it make more sense to use an XCT assertion instead of NSAssert?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That’s a good point. A failed assertion would crash the test harness instead of outputting an error.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boundsj @1ec5 sorry I didn't see this until recently. I will fix this in a separate branch.

@fabian-guerra
fabian-guerra merged commit e1431f9 into release-ios-v3.6.0-android-v5.1.0 May 24, 2017
@fabian-guerra
fabian-guerra deleted the fabian-mgllight-spec-fix branch May 24, 2017 18:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

crash iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS runtime styling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants