Skip to content

Commit

Permalink
A few more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pshriwise committed Jan 8, 2024
1 parent 460181b commit 8111077
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_measure.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <memory>
#include <vector>

// for testing
#include <catch2/catch_test_macros.hpp>
Expand All @@ -25,4 +26,11 @@ TEST_CASE("Test Mesh Mock")
double area = xdg.measure_volume_area(mm->volumes()[0]);
REQUIRE_THAT(area, Catch::Matchers::WithinAbs(478., 1e-6));

std::vector<double> surface_areas = {63., 63., 99., 99., 77., 77.};

for (int i = 0; i < mm->surfaces().size(); ++i) {
double area = xdg.measure_surface_area(mm->surfaces()[i]);
REQUIRE_THAT(area, Catch::Matchers::WithinAbs(surface_areas[i], 1e-6));
}

}

0 comments on commit 8111077

Please sign in to comment.