svenstaro / bvh

A fast BVH using SAH in rust
https://docs.rs/bvh
MIT License
225 stars 37 forks source link

Switch from quickcheck to proptest #64

Closed mdesmedt closed 3 years ago

mdesmedt commented 3 years ago

Switch the property testing tests to proptest. Surprisingly, a lot of fp32-related errors weren't caught by quickcheck. 8 tests initially failed:

    aabb::tests::test_points_relative_to_center_and_size
    aabb::tests::test_surface_area_cube
    aabb::tests::test_volume_always_positive
    aabb::tests::test_volume_by_hand
    ray::tests::test_ray_hits_triangle
    ray::tests::test_ray_points_at_aabb_center
    ray::tests::test_ray_points_at_aabb_center_branchless
    ray::tests::test_ray_points_at_aabb_center_naive

Fixed the above tests by selectively:

codecov-commenter commented 3 years ago

Codecov Report

Merging #64 (c2815c6) into master (05fb0a0) will increase coverage by 0.53%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #64      +/-   ##
==========================================
+ Coverage   79.92%   80.45%   +0.53%     
==========================================
  Files           9        9              
  Lines        1529     1566      +37     
==========================================
+ Hits         1222     1260      +38     
+ Misses        307      306       -1     
Impacted Files Coverage Δ
src/aabb.rs 93.29% <100.00%> (+0.21%) :arrow_up:
src/axis.rs 43.58% <100.00%> (+1.48%) :arrow_up:
src/ray.rs 94.73% <100.00%> (+1.71%) :arrow_up:
src/testbase.rs 89.50% <100.00%> (+0.43%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 05fb0a0...c2815c6. Read the comment docs.