more tests
3 unresolved threads
3 unresolved threads
plenty of tests and two helper files.
Merge request reports
Activity
- tests/geometry/functions/inverse.cc 0 → 100644
2 #include "matrix_helper.hh" 3 4 5 TG_FUZZ_TEST(TypedGeometry, Inverse) 6 { 7 // random mat1 inverse test 8 { 9 auto box1 = tg::aabb1(tg::pos1(-1), tg::pos1(1)); 10 11 auto m = tg::mat1(); 12 auto r = 0.0f; 13 while (r == 0) 14 r = uniform(rng, box1).x * 10.0f; 15 m.col(0) = r; 16 17 CHECK(helper::isIdentity<1, tg::f32>({tg::inverse(m) * m}, tg::f32(1e-2))); changed this line in version 2 of the diff
- tests/geometry/functions/length.cc 0 → 100644
1 #include "test.hh" 2 3 TG_FUZZ_TEST(TypedGeometry, Length) 4 { 5 auto box1 = tg::aabb1(tg::pos1(-1.0f), tg::pos1(1.0f)); 6 auto box2 = tg::aabb2(tg::pos2(-1.0f), tg::pos2(1.0f)); 7 auto box3 = tg::aabb3(tg::pos3(-1.0f), tg::pos3(1.0f)); 8 auto box4 = tg::aabb4(tg::pos4(-1.0f), tg::pos4(1.0f)); 9 10 // length and length2 tests 11 12 // check consistency of length and length2 13 // vecs 14 { 15 auto v = tg::vec1(uniform(rng, box1)); 16 CHECK(tg::length(v) == doctest::Approx(tg::sqrt(tg::length2(v))).epsilon(1e-5)); changed this line in version 2 of the diff
- tests/geometry/functions/vector_helper.hh 0 → 100644
1 #pragma once 2 3 #include <typed-geometry/tg.hh> 4 5 namespace helper 6 { 7 // checks if two vectors are identical 8 template <int D, class ScalarT> 9 inline bool isIdentical(tg::vec<D, ScalarT> u, tg::vec<D, ScalarT> v, ScalarT eps = 0) changed this line in version 2 of the diff
added 2 commits
enabled an automatic merge when the pipeline for 00863f52 succeeds
mentioned in commit e85c943c
Please register or sign in to reply