Repository navigation
Add symbol plugin - #642
Conversation
8561a7a to
c5ebce7
Compare
0cfc444 to
b86b471
Compare
|
Tests were added as part of b86b471 |
b86b471 to
d93b84c
Compare
LukasPaczos
left a comment
There was a problem hiding this comment.
This looks awesome, thanks for the idea and execution @tobrun!
Minor changes requested.
| try { | ||
| Timber.e("@Before test: register idle resource"); | ||
| idlingResource = new OnMapReadyIdlingResource(rule.getActivity()); | ||
| Espresso.registerIdlingResources(idlingResource); |
There was a problem hiding this comment.
I believe this is deprecated, we can use IdlingRegistry instead.
| @Before | ||
| public void beforeTest() { | ||
| try { | ||
| Timber.e("@Before test: register idle resource"); |
There was a problem hiding this comment.
How about adding the TestName rule, similarly to this in before and after?
| @@ -0,0 +1,367 @@ | |||
| // This file is generated. Edit android/platform/scripts/generate-style-code.js, then run `make android-style-code`. | |||
There was a problem hiding this comment.
This note needs to be updated.
| assertNotNull(symbolManager); | ||
|
|
||
| symbolManager.setSymbolAvoidEdges(true); | ||
| assertEquals((Boolean) symbolManager.getSymbolAvoidEdges(), (Boolean) true); |
There was a problem hiding this comment.
We can use asserTrue/assertFalse in this and similar test cases.
There was a problem hiding this comment.
this is generated code, same outcome
| @@ -0,0 +1,365 @@ | |||
| // This file is generated. Edit android/platform/scripts/generate-style-code.js, then run `make android-style-code`. | |||
There was a problem hiding this comment.
This note needs to be updated.
| @@ -0,0 +1,566 @@ | |||
| // This file is generated. Edit android/platform/scripts/generate-style-code.js, then run `make android-style-code`. | |||
There was a problem hiding this comment.
This note needs to be updated.
| @@ -0,0 +1,646 @@ | |||
| // This file is generated. Edit android/platform/scripts/generate-style-code.js, then run `make android-style-code`. | |||
There was a problem hiding this comment.
This note needs to be updated.
| */ | ||
| public void updateSource() { | ||
| // todo move feature creation to a background thread? | ||
| List<Feature> features = new ArrayList<>(); |
There was a problem hiding this comment.
Maybe we can reuse a single features list instead of creating a new one with each update?
| assertNotNull(symbolManager); | ||
|
|
||
| symbolManager.setSymbolSpacing(0.3f); | ||
| assertEquals((Float) symbolManager.getSymbolSpacing(), (Float) 0.3f); |
There was a problem hiding this comment.
This and other casts are redundant.
There was a problem hiding this comment.
this is not true, as removing the cast can lead to ambiguous assertEquals call, don't feel this should be fixed with this PR
There was a problem hiding this comment.
the solution here would be to add a message to the assert calls
d93b84c to
985881b
Compare
This PR adds integration of https://github.com/mapbox/mapbox-gl-native/tree/tvn-code-gen-symbols as separate plugion so we can kick the tires on it. Initially this annotation plugin only contains code for showing a symbol, next steps would be to include fill/circle/line support.