Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roads unittests #406

Merged
merged 17 commits into from
Mar 5, 2025
Merged

roads unittests #406

merged 17 commits into from
Mar 5, 2025

Conversation

wipfli
Copy link
Collaborator

@wipfli wipfli commented Mar 3, 2025

Adds some unit tests for the roads layer. Not covered is:

  • minZoomNames
  • minZoomShieldText
  • links
  • tunnels

With the current test infrastructure I don't know how to easily test attributes that have a min zoom like

.setAttrWithMinzoom("shield_text_length", shieldTextLength, minZoomShieldText)

One can supply a zoom to assertFeatures but then to check if the min zoom is correct one sort of needs to check the presence at minZoom and the absence at minZoom-1, but I don't know how to test for the absence of an attribute...

Anyway, this increases coverage already quite a bit.

Copy link

sonarqubecloud bot commented Mar 5, 2025

@wipfli
Copy link
Collaborator Author

wipfli commented Mar 5, 2025

CI passes now

@bdon bdon merged commit 46962f6 into protomaps:main Mar 5, 2025
5 checks passed
@wipfli wipfli deleted the roads-unittests branch March 7, 2025 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants