Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, I noticed the CI was failing, so I've attempted to fix that under commit f9ec13d.
Once I had the CI running again there were two unit tests failing (
test_in_operator
andsimple_in_operator_for_string
), which were both failing due to filtering by enums using the 'in' filter.These look like they had been failing for a while, I couldn't pinpoint exactly when they started failing though, I was getting xUnit errors when trying to run the tests on older commits, probably something I haven't set up on my machine though.
The problem seemed to be when you filtered by an array of enums, e.g.
birthmonth ^^ ["January", "March"]
, it recognised the type as an enum, but just tried to run the array string directly throughEnum.Parse
. I've updated the logic to detect if it is an array in the same way arrays of strings are detected in the FilterParser, and then individually parse each Enum entry. This looks like it fixes it, but still required the unit tests to be updated to reflect the new types. This was all done under commit 783b387.Finally I just wanted to make sure I hadn't broken any functionality with any of this, so I've added some integration tests to cover some
Enum
scenarios under commit 662ff59. The tests compare enums, but also against a faked title just to avoid getting a whole load of other entries with matching enums, not sure if this is the best way to do it, happy to change it if there's a better approach.These changes around Enums will probably cause conflicts with my other merge #28, so I'll have to update that if you accept this pull request.
Hope these changes all make sense!
Thanks.