Closed
Description
openedon Sep 4, 2019
Describe the bug
unit tests should always assert that the results of the API they test are correct. This is not the case of the following:
- coordinate_transform_toy.cu
- trajectory_derive_toy.cu
- trajectory_distance_and_speed_toy.cu
- trajectory_spatial_bounds_toy.cu
- trajectory_subset_toy.cu
Expected behavior
Compute expected results and compare using GTEST / GMOCK assertions / expectations.
Note we should also remove the "_toy" suffix on these tests and rename them to test_<api name>.cpp
(or .cu as necessary).
There's also no reason to only have one test (TEST_F or TYPED_TEST) per API. There should be plenty of tests, exercising different situations, such as mal-formed inputs, inputs with/without nulls, empty inputs, empty results, etc.
See RAPIDS cuDF cpp/tests for lots of good examples.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment