test(tests): added test suite
The test suite is extensive. Note that LLMs were used to aid in the development of the test suite. All LLM generated code was manually reviewed.
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
#include <string_view>
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <mfem.hpp>
|
||||
#include "mfem/mesh/mesh.hpp"
|
||||
#include <stroid/stroid.h>
|
||||
|
||||
#include "serif/discretization/domain/schema/schemas.hpp"
|
||||
#include "serif/discretization/domain/schema/validation/all.hpp"
|
||||
#include "serif/backend/mfem/discretization/schema.hpp"
|
||||
|
||||
#include "serif/tests/test_tags.hpp"
|
||||
#include "serif/tests/discritization/domain/domain_test_utils.hpp"
|
||||
@@ -23,7 +23,7 @@ TEST_CASE(
|
||||
const mfem::Mesh mesh = domain_test_utils::make_layered_mesh();
|
||||
|
||||
const auto validation =
|
||||
schema_validation::validate_schema<schema::CoreEnvelopeVacuumDomainSchema>(mesh);
|
||||
serif::backend::mfem::discretization::validate_schema<schema::CoreEnvelopeVacuumDomainSchema>(mesh);
|
||||
|
||||
REQUIRE(validation.valid());
|
||||
REQUIRE(validation.relationResults.size() == 7);
|
||||
@@ -53,7 +53,7 @@ TEST_CASE(
|
||||
*/
|
||||
const mfem::Mesh mesh = domain_test_utils::make_layered_mesh(false, true);
|
||||
const auto validation =
|
||||
schema_validation::validate_schema<schema::CoreEnvelopeVacuumDomainSchema>(mesh);
|
||||
serif::backend::mfem::discretization::validate_schema<schema::CoreEnvelopeVacuumDomainSchema>(mesh);
|
||||
CHECK_FALSE(validation.valid());
|
||||
REQUIRE(validation.relationResults.size() == 7);
|
||||
CHECK(validation.failed_relation_count() == 1);
|
||||
@@ -145,7 +145,7 @@ TEST_CASE(
|
||||
* accept a mesh generated under another numbering convention.
|
||||
*/
|
||||
const auto productionValidation =
|
||||
schema_validation::validate_schema<schema::CoreEnvelopeVacuumDomainSchema>(*stroidMesh.mesh);
|
||||
serif::backend::mfem::discretization::validate_schema<schema::CoreEnvelopeVacuumDomainSchema>(*stroidMesh.mesh);
|
||||
|
||||
CHECK_FALSE(productionValidation.valid());
|
||||
CHECK(productionValidation.failed_relation_count() > 0);
|
||||
@@ -157,7 +157,7 @@ TEST_CASE(
|
||||
) {
|
||||
const mfem::Mesh mesh = domain_test_utils::make_grid_mesh(3, 3, {2, 2, 2, 2, 1, 2, 2, 2, 2}, {});
|
||||
|
||||
const auto validation = schema_validation::validate_schema<schema::CoreEnvelopeVacuumDomainSchema>(mesh);
|
||||
const auto validation = serif::backend::mfem::discretization::validate_schema<schema::CoreEnvelopeVacuumDomainSchema>(mesh);
|
||||
|
||||
CHECK_FALSE(validation.valid());
|
||||
REQUIRE(validation.relationResults.size() == 7);
|
||||
|
||||
Reference in New Issue
Block a user