-
Notifications
You must be signed in to change notification settings - Fork 154
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
[FEA]: Write tests for multipolygon_{range/ref}
, polygon_{range/ref}
, linestring_{range/ref}
, etc.
#991
Labels
Comments
thomcom
added
feature request
New feature or request
Needs Triage
Need team to review and classify
labels
Mar 13, 2023
thomcom
changed the title
[FEA]: Write tests for
[FEA]: Write tests for Mar 13, 2023
multipolygon_ref
, polygon_ref
, linestring_ref
, etc.multipolygon_{range/ref}
, polygon_{range/ref}
, linestring_{range/ref}
, etc.
100%. Because the infrastructure used in all st_distance APIs, they are "semi-tested" in the integration tests with distance tests. But unit testing would definitely make developer's life easier. |
3 tasks
rapids-bot bot
pushed a commit
that referenced
this issue
Apr 5, 2023
…tor additions (#1026) closes #1025 This PR adds RAI segment iterators to `multilinestring_range` and `multipolygon_range`. **Caveats: this iterator currently will fail if the range contains empty geometries (such as an empty linestring or an empty polygon)**. Usage example: ``` multilinestring_range: geometry: {0, 1, 2} part: {0, 3, 6} coordinates: {{0, 0}, {1, 1}, {2, 2}, {10, 10}, {11, 11}, {12, 12}} range.segment_begin()[0] == {0, 0}, {1, 1} range.segment_begin()[1] == {1, 1}, {2, 2} range.segment_begin()[2] == {10, 10}, {11, 11} range.segment_begin()[3] == {11, 11}, {12, 12} range.num_segments() == 4 ``` This PR also adds a few helper methods that will be used in `pairwise_linestring_polygon_distance` API. All of them are tested. Contributes to #991 Authors: - Michael Wang (https://github.com/isVoid) Approvers: - Paul Taylor (https://github.com/trxcllnt) - Mark Harris (https://github.com/harrism) URL: #1026
3 tasks
rapids-bot bot
pushed a commit
that referenced
this issue
Jul 31, 2023
closes #991 This PR adds comprehensive tests for `multi*_range` class. The basic goal is to make sure every API in service is at least covered by 3 tests: a range with 0, 1 and 1000 elements. The tests are structured as below: for each range, a base fixture class is created. The base class defines virtual functions that its subclass should implement. These virtual functions include a `make_test_multi*` function that constructs the geometry array of that specific test case, as well as each sub test function that defines the expected value of that test case. The base class defines a `SetUp` function that calls the `make_test_multi*` to generate the array at test start up time. Then, a `run_test` function is defined to subsequently call every sub routine that test every API of that geometry range. In addition, this PR fixes several small bug in `point_begin` accessor in `linestring_ref` and `multipolygon_ref` class. Also, a few unused functions in `multipolygon_range` have been removed. Authors: - Michael Wang (https://github.com/isVoid) Approvers: - Robert Maynard (https://github.com/robertmaynard) - Mark Harris (https://github.com/harrism) - H. Thomson Comer (https://github.com/thomcom) URL: #1197
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Is this a new feature, an improvement, or a change to existing functionality?
Improvement
How would you describe the priority of this feature request
Medium
Please provide a clear description of problem you would like to solve.
I love the new C++ object references you've designed to be used with thrust @isVoid, they seem like they'll really improve development of libcuspatial.
Because they are such fundamental elements of the libcuspatial API, I think that you should write unit tests for them that exercise the functionalities they are expected to have.
Describe any alternatives you have considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: