From c4aeb748a60d827659f0bf68963ebf5571fdd5f2 Mon Sep 17 00:00:00 2001 From: Guillaume Giudicelli Date: Thu, 6 Jul 2023 17:45:16 -0600 Subject: [PATCH] Re-organize exception checking for refinement mesh generators Add test for new exception refs #18913 #18686 --- .../refine_block_generator/tests | 23 ++++++++++++----- .../refine_sideset_generator/tests | 25 +++++++++++++------ 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/test/tests/meshgenerators/refine_block_generator/tests b/test/tests/meshgenerators/refine_block_generator/tests index 67b9e032142c..6df409b3b5ce 100644 --- a/test/tests/meshgenerators/refine_block_generator/tests +++ b/test/tests/meshgenerators/refine_block_generator/tests @@ -31,11 +31,22 @@ [] [] - [invalid_block] - type = RunException - input = test_single.i - cli_args = 'Mesh/refine/block="missing"' - expect_err = "The block 'missing' was not found within the mesh" - requirement = "The system shall error if attempting to refine a block that does not exist in the mesh." + [errors] + requirement = "The system shall error if " + [invalid_block] + type = RunException + input = test_single.i + cli_args = 'Mesh/refine/block="missing"' + expect_err = "The block 'missing' was not found within the mesh" + detail = "attempting to refine a block that does not exist in the mesh, and " + [] + [wrong_size_inputs] + type = RunException + input = test_single.i + cli_args = 'Mesh/refine/refinement="1 2"' + expect_err = "The blocks and refinement vectors should be the same size" + detail = "specifying a vector of refinement levels that does not match the vector of " + "subdomains to refine." + [] [] [] diff --git a/test/tests/meshgenerators/refine_sideset_generator/tests b/test/tests/meshgenerators/refine_sideset_generator/tests index fc81432f63d9..f2c032c4821b 100644 --- a/test/tests/meshgenerators/refine_sideset_generator/tests +++ b/test/tests/meshgenerators/refine_sideset_generator/tests @@ -29,12 +29,23 @@ detail = 'both the neighboring elements of, and the elements along, a specified boundary' [] [] - [failureBoundary] - type = 'RunException' - input = 'test_multi.i' - recover = false - cli_args = "Mesh/refine/boundaries='foo' --mesh-only" - expect_err = "The boundary *" - requirement = 'The system shall error if the specified boundary to be refined does not exist' + [errors] + requirement = "The system shall error if " + [missing_boundary] + type = 'RunException' + input = 'test_multi.i' + recover = false + cli_args = "Mesh/refine/boundaries='foo' --mesh-only" + expect_err = "The boundary *" + requirement = 'the specified boundary to be refined does not exist and' + [] + [wrong_size_inputs] + type = RunException + input = test_left.i + cli_args = 'Mesh/refine/refinement="1 2"' + expect_err = "The blocks and refinement vectors should be the same size" + detail = "specifying a vector of refinement levels that does not match the vector of " + "boundaries to refine." + [] [] []