-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Adds support for running Mapbox-gl-js expressions tests against the Objective-C expressions interface #11435
Conversation
I think it would be helpful for @mapbox/maps-ios to start collecting a list of tests which fail, whether they crash, raise unexpected exceptions or fail expectations, so that we can catalog the list of differences between gl-js for the 4.0 release and beyond and prioritize any additional work we might not currently be aware of. As the team is working on tickets related to expressions, please consider merging this branch into your branches and running these tests for additional feedback. /cc @lilykaiser |
|
||
NSSet *testsToSkip = [NSSet setWithObjects: | ||
@"to-boolean", | ||
@"concat/arity-1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#11472 will make it possible to express a concatenation expression with an arity of 1 within an NSExpression. This is the case for concat
but not, say, +
, because concat
takes a series of arguments, whereas mgl_join:
would take a single argument containing all the string expressions to concatenate. By contrast, add:to:
takes two arguments.
On the subject of arity, it’s worth pointing out that built-in NSExpression functions like +
are strictly binary, such that 1 + 2 + 3
is interpreted as (1 + 2) + 3
. Currently, ["+", 1, 2, 3]
is converted to sum({1, 2, 3})
, which I think is reasonable but not a literal round trip.
5827be9
to
7e80a8a
Compare
I’ve rebased this and cleaned it up. Tests now complete successfully with 17 passing and 196 skipped... which is a lot and makes me question how useful these will be in the long run. I didn’t make an effort to fix any of these failures, some of which are intentional or don’t account for the design of the JS tests. Reasons for skipping tests (or families of tests) are included as comments. |
Thanks for doing this -- my original intention for the blacklist was to only contain crashers, and the rest we could catalog automatically somehow. I wonder if more effort should be spent scrutinizing the list of runtime failures. There's no rush to merge this, especially if it's not yet super useful. |
Definitely — hopefully this manual catalog will be useful in whittling down the list of failures, now that there’s a rough classification. |
#11472 introduced a catch-all |
This could be a lot better (WIP) A few crashing cases are blacklisted in the code. [#11014]
e2c7069
to
cc510e3
Compare
I've rebased this on release-boba and made some adjustments to the list of failures. This should make it easier for @mapbox/maps-ios to integrate these tests with other branches for ongoing evaluation. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This pull request has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
This branch enables running the expressions tests from Mapbox-gl-js against the equivalent cocoa API
Note that this is currently only set up to support iOS, but macOS support shouldn't require much add'l effort.
"Do not merge" is checked as we have quite a few test failures relating to tail work and missing functionality, as well as a few crashing tests which have been blacklisted in the code
/cc @1ec5 @anandthakker @fabian-guerra