11module test_result_test_m
22 ! ! Verify test_result_t object behavior
33 use sourcery_string_m, only : string_t
4- use sourcery_test_m , only : test_t, test_result_t
4+ use sourcery_test_result_m , only : test_result_t
55 use sourcery_test_description_m, only : test_description_t
6+ use sourcery_test_m, only : test_t, test_description_substring
67#ifdef __GFORTRAN__
78 use sourcery_test_description_m, only : test_function_i
89#endif
@@ -27,6 +28,7 @@ pure function subject() result(specimen)
2728 function results () result(test_results)
2829 type (test_result_t), allocatable :: test_results(:)
2930 type (test_description_t), allocatable :: test_descriptions(:)
31+
3032#ifndef __GFORTRAN__
3133 test_descriptions = [ &
3234 test_description_t(string_t(" constructing an array of test_result_t objects elementally" ), check_array_result_construction) &
@@ -35,16 +37,15 @@ function results() result(test_results)
3537#else
3638 ! Work around missing Fortran 2008 feature: associating a procedure actual argument with a procedure pointer dummy argument:
3739 procedure (test_function_i), pointer :: check_array_ptr, check_single_ptr
38-
3940 check_array_ptr = > check_array_result_construction
4041 check_single_ptr = > check_single_image_failure
41-
4242 test_descriptions = [ &
4343 test_description_t(string_t(" constructing an array of test_result_t objects elementally" ), check_array_ptr), &
4444 test_description_t(string_t(" reporting failure if the test fails on one image" ), check_single_ptr) &
4545 ]
4646#endif
47- test_results = test_descriptions% run()
47+ test_descriptions = pack (test_descriptions, test_descriptions% contains_text(string_t(test_description_substring)))
48+ test_results = test_descriptions% run()
4849 end function
4950
5051 function check_array_result_construction () result(passed)
0 commit comments