Skip to content

Commit 76907f8

Browse files
committed
Remove tests that check the ability to re-run a test case (as it is not a supported feature)
1 parent cf1ab91 commit 76907f8

2 files changed

Lines changed: 13 additions & 16 deletions

File tree

vunit/vhdl/run/src/run.vhd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ package body run_pkg is
246246
set_running_test_case(runner_state, name);
247247
return true;
248248
elsif get_test_case_name(runner_state, get_active_test_case_index(runner_state)) = name then
249-
error(runner_trace_logger, "Test case: " & name & " cannot be run more than once unless re-initialization.");
249+
error(runner_trace_logger, "Test case: " & name & " cannot be run more than once.");
250250
return false;
251251
end if;
252252
end if;

vunit/vhdl/run/test/run_tests.vhd

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -468,24 +468,21 @@ begin
468468
test_case_cleanup;
469469

470470
---------------------------------------------------------------------------
471-
banner("Should prevent from running a test from enabled_test_case more than once unless re-initialized.");
471+
banner("Should prevent from running a test from enabled_test_case more than once.");
472472
test_case_setup;
473473
test_runner_setup(runner, "enabled_test_cases : Should one");
474-
for i in 0 to 2 loop
475-
case i is
476-
when 0 =>
477-
check(c, run("Should one"), "Expected ""Should one"" to run.");
478-
when others =>
479-
mock(runner_trace_logger);
480-
check_false(c, run("Should one"), "Didn't expected ""Should one"" to run.");
481-
check_log(runner_trace_logger, "Test case: Should one cannot be run more than once unless re-initialization.", error);
482-
unmock(runner_trace_logger);
483-
end case;
484-
end loop;
485-
test_runner_setup(runner, "enabled_test_cases : Should one");
486474
while test_suite loop
487-
check(c, run("Should one"), "Expected ""Should one"" to run.");
488-
exit;
475+
for i in 0 to 2 loop
476+
case i is
477+
when 0 =>
478+
check(c, run("Should one"), "Expected ""Should one"" to run.");
479+
when others =>
480+
mock(runner_trace_logger);
481+
check_false(c, run("Should one"), "Didn't expected ""Should one"" to run.");
482+
check_log(runner_trace_logger, "Test case: Should one cannot be run more than once.", error);
483+
unmock(runner_trace_logger);
484+
end case;
485+
end loop;
489486
end loop;
490487

491488
test_case_cleanup;

0 commit comments

Comments
 (0)