diff --git a/test/main.f90 b/test/main.f90 index 34d6b48..8bde31a 100644 --- a/test/main.f90 +++ b/test/main.f90 @@ -14,6 +14,7 @@ !> Driver for unit testing program tester use, intrinsic :: iso_fortran_env, only : error_unit + use, intrinsic :: ieee_arithmetic, only: ieee_quiet_nan use testdrive, only : run_testsuite, new_testsuite, testsuite_type, & & select_suite, run_selected, get_argument, junit_output, junit_header, & & init_color_output @@ -29,6 +30,7 @@ program tester stat = 0 call junit_header(junit, "testdrive") + allocate(testsuites(2)) testsuites = [ & new_testsuite("check", collect_check), & new_testsuite("select", collect_select) & diff --git a/test/test_check.F90 b/test/test_check.F90 index fcf8245..47efdb7 100644 --- a/test/test_check.F90 +++ b/test/test_check.F90 @@ -22,7 +22,7 @@ #endif module test_check - use, intrinsic :: ieee_arithmetic, only : ieee_value, ieee_quiet_nan + use, intrinsic :: ieee_arithmetic, only : ieee_value, ieee_quiet_nan use testdrive, only : new_unittest, unittest_type, error_type, check, skip_test, to_string implicit none private @@ -67,6 +67,7 @@ subroutine collect_check(testsuite) !> Collection of tests type(unittest_type), allocatable, intent(out) :: testsuite(:) + allocate(testsuite(95)) testsuite = [ & new_unittest("success", test_success), & new_unittest("failure", test_failure, should_fail=.true.), & diff --git a/test/test_select.F90 b/test/test_select.F90 index c6c5377..6f20d2a 100644 --- a/test/test_select.F90 +++ b/test/test_select.F90 @@ -29,6 +29,7 @@ subroutine collect_select(testsuite) !> Collection of tests type(unittest_type), allocatable, intent(out) :: testsuite(:) + allocate(testsuite(6)) testsuite = [ & new_unittest("always-pass", always_pass), & @@ -68,6 +69,8 @@ subroutine stub_collect(testsuite) !> Collection of tests type(unittest_type), allocatable, intent(out) :: testsuite(:) + allocate(testsuite(2)) + testsuite = [ & new_unittest("always-pass", always_pass), & new_unittest("always-fail", always_fail, should_fail=.true.) & @@ -81,6 +84,7 @@ subroutine stub_collect_bad(testsuite) !> Collection of tests type(unittest_type), allocatable, intent(out) :: testsuite(:) + allocate(testsuite(2)) testsuite = [ & new_unittest("always-pass", always_pass, should_fail=.true.), &