[FEAT] Update code coverage

This commit is contained in:
NADAL Jean-Baptiste
2024-02-15 18:30:44 +01:00
parent d67f024711
commit f8b94c9d0b
4 changed files with 37 additions and 9 deletions

View File

@@ -379,6 +379,39 @@ SCENARIO("Aggregating intersections", "[features/intersections.feature]")
/* ------------------------------------------------------------------------- */
SCENARIO("Operations with intersections", "[features/intersections.feature]")
{
GIVEN("xs <- intersections({})")
{
Intersections xs1({});
AND_GIVEN("s <- sphere()")
{
Sphere s;
Intersection i1(1, s);
AND_GIVEN("xs2 <- intersections({i1})")
{
Intersections xs2({i1});
WHEN("xs1 <- xs2")
{
// xs2 = xs2;
xs1 = xs2;
THEN("xs1.count = 1")
{
REQUIRE(xs1.count() == 1);
}
Intersections xs3 = xs1;
THEN("xs3.count = 1")
{
REQUIRE(xs3.count() == 1);
}
}
}
}
}
}
/* ------------------------------------------------------------------------- */
SCENARIO("Intersect sets the object on the intersection", "[features/spheres.feature]")
{
GIVEN("r <- ray(point(0, 0, 5), vector(0, 0, 1))")