Skip to content

Commit 3ebcc6d

Browse files
committed
fix: mismatch in array/vec sizes let test pass
1 parent 3e29175 commit 3ebcc6d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/assert_mod.F90

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,8 @@ subroutine assert_equal_integer1_array(x, y, file_name, line_number, suite)
398398
end if
399399
end do
400400
end do
401+
else
402+
passed = .false.
401403
end if
402404

403405
call test_case_append_assert('==', passed, to_string(x(loc_i, loc_j)), to_string(y(loc_i, loc_j)), file_name, line_number, suite)
@@ -430,6 +432,8 @@ subroutine assert_equal_integer2_array(x, y, file_name, line_number, suite)
430432
end if
431433
end do
432434
end do
435+
else
436+
passed = .false.
433437
end if
434438

435439
call test_case_append_assert('==', passed, to_string(x(loc_i, loc_j)), to_string(y(loc_i, loc_j)), file_name, line_number, suite)
@@ -462,6 +466,8 @@ subroutine assert_equal_integer4_array(x, y, file_name, line_number, suite)
462466
end if
463467
end do
464468
end do
469+
else
470+
passed = .false.
465471
end if
466472

467473
call test_case_append_assert('==', passed, to_string(x(loc_i, loc_j)), to_string(y(loc_i, loc_j)), file_name, line_number, suite)
@@ -494,6 +500,8 @@ subroutine assert_equal_integer8_array(x, y, file_name, line_number, suite)
494500
end if
495501
end do
496502
end do
503+
else
504+
passed = .false.
497505
end if
498506

499507
call test_case_append_assert('==', passed, to_string(x(loc_i, loc_j)), to_string(y(loc_i, loc_j)), file_name, line_number, suite)
@@ -526,6 +534,8 @@ subroutine assert_equal_real4_array(x, y, file_name, line_number, suite)
526534
end if
527535
end do
528536
end do
537+
else
538+
passed = .false.
529539
end if
530540

531541
call test_case_append_assert('==', passed, to_string(x(loc_i, loc_j)), to_string(y(loc_i, loc_j)), file_name, line_number, suite)
@@ -558,6 +568,8 @@ subroutine assert_equal_real8_array(x, y, file_name, line_number, suite)
558568
end if
559569
end do
560570
end do
571+
else
572+
passed = .false.
561573
end if
562574

563575
call test_case_append_assert('==', passed, to_string(x(loc_i, loc_j)), to_string(y(loc_i, loc_j)), file_name, line_number, suite)
@@ -590,6 +602,8 @@ subroutine assert_equal_string_array(x, y, file_name, line_number, suite)
590602
end if
591603
end do
592604
end do
605+
else
606+
passed = .false.
593607
end if
594608

595609
call test_case_append_assert('==', passed, x(loc_i, loc_j), y(loc_i, loc_j), file_name, line_number, suite)
@@ -688,6 +702,8 @@ subroutine assert_approximate_real4_vec(x, y, z, file_name, line_number, eps, su
688702
end if
689703
end if
690704
end do
705+
else
706+
passed = .false.
691707
end if
692708

693709
call test_case_append_assert('=~', passed, to_string(x(loc)), to_string(y(loc)), file_name, line_number, suite)
@@ -754,6 +770,8 @@ subroutine assert_approximate_real8_vec(x, y, z, file_name, line_number, eps, su
754770
end if
755771
end if
756772
end do
773+
else
774+
passed = .false.
757775
end if
758776

759777
call test_case_append_assert('=~', passed, to_string(x(loc)), to_string(y(loc)), file_name, line_number, suite)
@@ -826,6 +844,8 @@ subroutine assert_approximate_real4_array(x, y, z, file_name, line_number, eps,
826844
end if
827845
end do
828846
end do
847+
else
848+
passed = .false.
829849
end if
830850

831851
call test_case_append_assert('=~', passed, to_string(x(loc_i, loc_j)), to_string(y(loc_i, loc_j)), file_name, line_number, suite)
@@ -898,6 +918,8 @@ subroutine assert_approximate_real8_array(x, y, z, file_name, line_number, eps,
898918
end if
899919
end do
900920
end do
921+
else
922+
passed = .false.
901923
end if
902924

903925
call test_case_append_assert('=~', passed, to_string(x(loc_i, loc_j)), to_string(y(loc_i, loc_j)), file_name, line_number, suite)

0 commit comments

Comments
 (0)