diff --git a/tests/hole/hole.cpp b/tests/hole/hole.cpp index 3e455bce..f399e56c 100644 --- a/tests/hole/hole.cpp +++ b/tests/hole/hole.cpp @@ -7,10 +7,36 @@ namespace viennacore { using namespace viennaps; -template void RunTest() { +template +void RunTest() { auto domain = SmartPointer>::New(); - MakeHole(domain, 1., 10., 10., 2.5, 5., 10., 1., false, true, + // Test with HoleShape::Full + MakeHole(domain, 1., 10., 10., 2.5, 5., 10., 1., HoleShape::Full, false, true, + Material::Si) + .apply(); + + VC_TEST_ASSERT(domain->getLevelSets().size() == 2); + VC_TEST_ASSERT(domain->getMaterialMap()); + VC_TEST_ASSERT(domain->getMaterialMap()->size() == 2); + + LSTEST_ASSERT_VALID_LS(domain->getLevelSets().back(), NumericType, D); + + // Test with HoleShape::Quarter + domain->clear(); // Reset the domain for a new test + MakeHole(domain, 1., 10., 10., 2.5, 5., 10., 1., HoleShape::Quarter, false, true, + Material::Si) + .apply(); + + VC_TEST_ASSERT(domain->getLevelSets().size() == 2); + VC_TEST_ASSERT(domain->getMaterialMap()); + VC_TEST_ASSERT(domain->getMaterialMap()->size() == 2); + + LSTEST_ASSERT_VALID_LS(domain->getLevelSets().back(), NumericType, D); + + // Test with HoleShape::Half + domain->clear(); // Reset the domain for a new test + MakeHole(domain, 1., 10., 10., 2.5, 5., 10., 1., HoleShape::Half, false, true, Material::Si) .apply(); @@ -24,3 +50,4 @@ template void RunTest() { } // namespace viennacore int main() { VC_RUN_ALL_TESTS } +