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

Manage jazzy guide example code inside unit tests - #8910

Merged
1ec5 merged 2 commits into
masterfrom
1ec5-guide-tests-8461
May 8, 2017
Merged

1ec5 merged 2 commits into
masterfrom
1ec5-guide-tests-8461

Conversation

@1ec5

@1ec5 1ec5 commented May 5, 2017 •

Copy link
Copy Markdown
Contributor

This PR extracts the example code from the “Using Style Functions at Runtime” jazzy guide into unit tests run as part of the iOS and macOS unit test targets. Running make darwin-style-code inserts the code back into the guide as it generates the final Markdown.

Managing the example code this way helps us avoid syntax errors, as demonstrated by the syntax error this PR fixes. It also gives us an early warning system for when changes to the API break the most common coding patterns, which are enshrined in this guide and others like it.

Fixes #8461 and fixes #8902.

/cc @jmkiley @friedbunny

@1ec5 1ec5 added documentation iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS tests labels May 5, 2017
@1ec5 1ec5 added this to the ios-v3.6.0 milestone May 5, 2017
@1ec5 1ec5 self-assigned this May 5, 2017
@1ec5
1ec5 requested a review from jmkiley May 5, 2017 21:43
Moved example code from DDS guide to a unit test written in Swift. The code is inserted into the guide at codegen time.
@1ec5
1ec5 force-pushed the 1ec5-guide-tests-8461 branch from 50b791e to 1fbf0f4 Compare May 5, 2017 21:49

@jmkiley jmkiley 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.

🙇‍♀️

@1ec5
1ec5 merged commit 5cc641e into master May 8, 2017
@1ec5
1ec5 deleted the 1ec5-guide-tests-8461 branch May 8, 2017 21:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Syntax error in style functions guide [ios, macos] Add testing for code in guides

2 participants