From e93bf2052d40c297ec97a11f2ef28020ae8c1147 Mon Sep 17 00:00:00 2001 From: thk123 Date: Wed, 30 May 2018 09:42:56 +0100 Subject: [PATCH] Use !shouldfail rather than !mayfail on unit tests May fail runs the test and if it fails prints the output. Should fail runs the test and only prints the output if it actually passes. This makes it easier when looking at build output to determine which unit test has actually failed. --- .../java_bytecode/ci_lazy_methods/lazy_load_lambdas.cpp | 4 ++-- .../java_bytecode_convert_method/convert_invoke_dynamic.cpp | 6 +++--- .../instantiate_not_contains.cpp | 4 ++-- unit/util/irep_sharing.cpp | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/jbmc/unit/java_bytecode/ci_lazy_methods/lazy_load_lambdas.cpp b/jbmc/unit/java_bytecode/ci_lazy_methods/lazy_load_lambdas.cpp index a96f50fc7b0..f42367592cf 100644 --- a/jbmc/unit/java_bytecode/ci_lazy_methods/lazy_load_lambdas.cpp +++ b/jbmc/unit/java_bytecode/ci_lazy_methods/lazy_load_lambdas.cpp @@ -12,7 +12,7 @@ SCENARIO( "Lazy load lambda methods", - "[core][java_bytecode][ci_lazy_methods][lambdas][!mayfail]") + "[core][java_bytecode][ci_lazy_methods][lambdas][!shouldfail]") { GIVEN("A class with some locally declared lambdas") { @@ -192,7 +192,7 @@ SCENARIO( SCENARIO( "Lazy load lambda methods in seperate class", - "[core][java_bytecode][ci_lazy_methods][lambdas][!mayfail]") + "[core][java_bytecode][ci_lazy_methods][lambdas][!shouldfail]") { const symbol_tablet symbol_table = load_java_class_lazy( "ExternalLambdaAccessor", diff --git a/jbmc/unit/java_bytecode/java_bytecode_convert_method/convert_invoke_dynamic.cpp b/jbmc/unit/java_bytecode/java_bytecode_convert_method/convert_invoke_dynamic.cpp index 3a5d42918d0..a5be417f2bb 100644 --- a/jbmc/unit/java_bytecode/java_bytecode_convert_method/convert_invoke_dynamic.cpp +++ b/jbmc/unit/java_bytecode/java_bytecode_convert_method/convert_invoke_dynamic.cpp @@ -195,7 +195,7 @@ void validate_local_variable_lambda_assignment( SCENARIO( "Converting invokedynamic with a local lambda", "[core]" - "[lambdas][java_bytecode][java_bytecode_convert_method][!mayfail]") + "[lambdas][java_bytecode][java_bytecode_convert_method][!shouldfail]") { // NOLINTNEXTLINE(whitespace/braces) run_test_with_compilers([](const std::string &compiler) { @@ -387,7 +387,7 @@ void validate_member_variable_lambda_assignment( SCENARIO( "Converting invokedynamic with a member lambda", "[core]" - "[lamdba][java_bytecode][java_bytecode_convert_method][!mayfail]") + "[lamdba][java_bytecode][java_bytecode_convert_method][!shouldfail]") { // NOLINTNEXTLINE(whitespace/braces) run_test_with_compilers([](const std::string &compiler) { @@ -555,7 +555,7 @@ void validate_static_member_variable_lambda_assignment( SCENARIO( "Converting invokedynamic with a static member lambda", "[core]" - "[lamdba][java_bytecode][java_bytecode_convert_method][!mayfail]") + "[lamdba][java_bytecode][java_bytecode_convert_method][!shouldfail]") { // NOLINTNEXTLINE(whitespace/braces) run_test_with_compilers([](const std::string &compiler) { diff --git a/jbmc/unit/solvers/refinement/string_constraint_instantiation/instantiate_not_contains.cpp b/jbmc/unit/solvers/refinement/string_constraint_instantiation/instantiate_not_contains.cpp index c4aa4736b42..85d825ac72d 100644 --- a/jbmc/unit/solvers/refinement/string_constraint_instantiation/instantiate_not_contains.cpp +++ b/jbmc/unit/solvers/refinement/string_constraint_instantiation/instantiate_not_contains.cpp @@ -159,9 +159,9 @@ decision_proceduret::resultt check_sat(const exprt &expr, const namespacet &ns) return solver(); } -// The [!mayfail] tag allows tests to fail while reporting the failure +// The [!shouldfail] tag checks the tests fail SCENARIO("instantiate_not_contains", - "[!mayfail][core][solvers][refinement][string_constraint_instantiation]") + "[!shouldfail][core][solvers][refinement][string_constraint_instantiation]") { // For printing expression register_language(new_java_bytecode_language); diff --git a/unit/util/irep_sharing.cpp b/unit/util/irep_sharing.cpp index 3d79cd5590a..c14f681f726 100644 --- a/unit/util/irep_sharing.cpp +++ b/unit/util/irep_sharing.cpp @@ -7,7 +7,7 @@ #ifdef SHARING -SCENARIO("irept_sharing_trade_offs", "[!mayfail][core][utils][irept]") +SCENARIO("irept_sharing_trade_offs", "[!shouldfail][core][utils][irept]") { GIVEN("An irept created with move_to_sub") { @@ -114,7 +114,7 @@ SCENARIO("irept_sharing", "[core][utils][irept]") #include -SCENARIO("exprt_sharing_trade_offs", "[!mayfail][core][utils][exprt]") +SCENARIO("exprt_sharing_trade_offs", "[!shouldfail][core][utils][exprt]") { GIVEN("An expression created with move_to_operands") {