Skip to content

Commit e93bf20

Browse files
author
thk123
committed
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.
1 parent c6d0427 commit e93bf20

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

jbmc/unit/java_bytecode/ci_lazy_methods/lazy_load_lambdas.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
SCENARIO(
1414
"Lazy load lambda methods",
15-
"[core][java_bytecode][ci_lazy_methods][lambdas][!mayfail]")
15+
"[core][java_bytecode][ci_lazy_methods][lambdas][!shouldfail]")
1616
{
1717
GIVEN("A class with some locally declared lambdas")
1818
{
@@ -192,7 +192,7 @@ SCENARIO(
192192

193193
SCENARIO(
194194
"Lazy load lambda methods in seperate class",
195-
"[core][java_bytecode][ci_lazy_methods][lambdas][!mayfail]")
195+
"[core][java_bytecode][ci_lazy_methods][lambdas][!shouldfail]")
196196
{
197197
const symbol_tablet symbol_table = load_java_class_lazy(
198198
"ExternalLambdaAccessor",

jbmc/unit/java_bytecode/java_bytecode_convert_method/convert_invoke_dynamic.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ void validate_local_variable_lambda_assignment(
195195
SCENARIO(
196196
"Converting invokedynamic with a local lambda",
197197
"[core]"
198-
"[lambdas][java_bytecode][java_bytecode_convert_method][!mayfail]")
198+
"[lambdas][java_bytecode][java_bytecode_convert_method][!shouldfail]")
199199
{
200200
// NOLINTNEXTLINE(whitespace/braces)
201201
run_test_with_compilers([](const std::string &compiler) {
@@ -387,7 +387,7 @@ void validate_member_variable_lambda_assignment(
387387
SCENARIO(
388388
"Converting invokedynamic with a member lambda",
389389
"[core]"
390-
"[lamdba][java_bytecode][java_bytecode_convert_method][!mayfail]")
390+
"[lamdba][java_bytecode][java_bytecode_convert_method][!shouldfail]")
391391
{
392392
// NOLINTNEXTLINE(whitespace/braces)
393393
run_test_with_compilers([](const std::string &compiler) {
@@ -555,7 +555,7 @@ void validate_static_member_variable_lambda_assignment(
555555
SCENARIO(
556556
"Converting invokedynamic with a static member lambda",
557557
"[core]"
558-
"[lamdba][java_bytecode][java_bytecode_convert_method][!mayfail]")
558+
"[lamdba][java_bytecode][java_bytecode_convert_method][!shouldfail]")
559559
{
560560
// NOLINTNEXTLINE(whitespace/braces)
561561
run_test_with_compilers([](const std::string &compiler) {

jbmc/unit/solvers/refinement/string_constraint_instantiation/instantiate_not_contains.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ decision_proceduret::resultt check_sat(const exprt &expr, const namespacet &ns)
159159
return solver();
160160
}
161161

162-
// The [!mayfail] tag allows tests to fail while reporting the failure
162+
// The [!shouldfail] tag checks the tests fail
163163
SCENARIO("instantiate_not_contains",
164-
"[!mayfail][core][solvers][refinement][string_constraint_instantiation]")
164+
"[!shouldfail][core][solvers][refinement][string_constraint_instantiation]")
165165
{
166166
// For printing expression
167167
register_language(new_java_bytecode_language);

unit/util/irep_sharing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#ifdef SHARING
99

10-
SCENARIO("irept_sharing_trade_offs", "[!mayfail][core][utils][irept]")
10+
SCENARIO("irept_sharing_trade_offs", "[!shouldfail][core][utils][irept]")
1111
{
1212
GIVEN("An irept created with move_to_sub")
1313
{
@@ -114,7 +114,7 @@ SCENARIO("irept_sharing", "[core][utils][irept]")
114114

115115
#include <util/expr.h>
116116

117-
SCENARIO("exprt_sharing_trade_offs", "[!mayfail][core][utils][exprt]")
117+
SCENARIO("exprt_sharing_trade_offs", "[!shouldfail][core][utils][exprt]")
118118
{
119119
GIVEN("An expression created with move_to_operands")
120120
{

0 commit comments

Comments
 (0)