From ef0ad29c06c38718e9f43ea581e6b5613e0f5ab1 Mon Sep 17 00:00:00 2001 From: Prithivirajan Veerappan Date: Mon, 13 Feb 2023 17:07:43 -0700 Subject: [PATCH] included error_message_check in tests ref #184 --- test/tests/damage_plasticity_model/tests | 22 +++++++++++++++++++ .../damage_plasticity_model/uniaxial_test.i | 2 -- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/test/tests/damage_plasticity_model/tests b/test/tests/damage_plasticity_model/tests index 69315936f..5ac05b4a0 100644 --- a/test/tests/damage_plasticity_model/tests +++ b/test/tests/damage_plasticity_model/tests @@ -52,6 +52,28 @@ allow_test_objects = True cli_args = 'Outputs/file_base=shear_test_out' detail = ' in shear loading.' + [] + [error_message_check] + requirement = 'Blackbear shall produce an error message when input required for the inelastic_models are not properly set by user:' + [inelastic_models_name] + type = 'RunException' + input = 'uniaxial_test.i' + cli_args = "Materials/stress/inelastic_models='perfect_plasticity'" + expect_err = "Model perfect_plasticity is not a DamagePlasticityStressUpdate object" + allow_test_objects = True + detail = "When inelastic_models is not given as damage_plasticity_model" + [] + [] + + [inelastic_models_size] + type = 'RunException' + input = 'uniaxial_test.i' + cli_args = "Materials/stress/inelastic_models='damage_plasticity_model perfect_plasticity'" + expect_err = "ComputeMultipleInelasticDamageStress currently can only have one model specified in 'inelastic_models'" + allow_test_objects = True + detail = "When inelastic_models has more than one model as input" + [] + [] [] diff --git a/test/tests/damage_plasticity_model/uniaxial_test.i b/test/tests/damage_plasticity_model/uniaxial_test.i index 7540c93f2..ea502acc1 100644 --- a/test/tests/damage_plasticity_model/uniaxial_test.i +++ b/test/tests/damage_plasticity_model/uniaxial_test.i @@ -222,8 +222,6 @@ [] [stress] type = ComputeMultipleInelasticDamageStress -# The following line is for error testing -# inelastic_models = 'damage_plasticity_model perfect_plasticity' inelastic_models = 'damage_plasticity_model' perform_finite_strain_rotations = false []