fix(input): enforce strict Abaqus subset contract

This commit is contained in:
KOKO\Mimi
2026-08-01 03:48:29 +09:00
parent 9269847c83
commit af886f3f90
25 changed files with 722 additions and 34 deletions
@@ -130,6 +130,37 @@ TEST(ActiveInput, RejectsMixedFlatAndHierarchicalMeshAtTheFlatRecord) {
EXPECT_EQ(diagnostic.source->file, fixture_path("invalid/mixed_mesh.inp"));
}
TEST(ActiveInput, RejectsGlobalSetsInHierarchicalInput) {
const TemporaryDeck input{
"fesa-global-set-with-hierarchy.inp",
"*NSET, NSET=Ignored\n"
"*PART, NAME=BeamPart\n"
"*END PART\n"
"*ASSEMBLY, NAME=RootAssembly\n"
"*INSTANCE, NAME=Beam-1, PART=BeamPart\n"
"*END INSTANCE\n"
"*END ASSEMBLY\n"};
expect_failure(
parse(input.path()), "abaqus.semantic.mixed_mesh_organization", 1U);
}
TEST(ActiveInput, RejectsDuplicatePartNamesAtTheSecondDefinition) {
const TemporaryDeck input{
"fesa-duplicate-parts.inp",
"*PART, NAME=BeamPart\n"
"*END PART\n"
"*PART, NAME=BeamPart\n"
"*END PART\n"
"*ASSEMBLY, NAME=RootAssembly\n"
"*INSTANCE, NAME=Beam-1, PART=BeamPart\n"
"*END INSTANCE\n"
"*END ASSEMBLY\n"};
expect_failure(
parse(input.path()), "abaqus.semantic.duplicate_part", 3U);
}
TEST(ActiveInput, RejectsHierarchicalInputWithoutAnAssembly) {
const TemporaryDeck input{
"fesa-missing-assembly.inp",