11module string_test_m
2- use sourcery_m, only : &
3- test_t, test_result_t, string_t, operator (.cat.), test_description_t, test_function_i, test_description_substring
2+ use sourcery_m, only : test_t, test_result_t, string_t, operator (.cat.), test_description_t, test_description_substring
3+ #ifdef __GFORTRAN__
4+ use sourcery_m, only : test_function_i
5+ #endif
46 implicit none
57
68 private
@@ -25,30 +27,43 @@ function results() result(test_results)
2527
2628#ifndef __GFORTRAN__
2729 test_descriptions = [ &
28- test_description_t( &
29- string_t(" is_allocated() result .true. if & only if the string_t component(s) is/are allocated" ), check_allocation), &
30- test_description_t(string_t(' supporting operator(==) for string_t and character operands' ), supports_equivalence_operator), &
31- test_description_t( &
32- string_t(' supporting operator(/=) for string_t and character operands' ), supports_non_equivalence_operator), &
33- test_description_t( &
34- string_t(' supporting operator(//) for string_t and character operands' ), supports_concatenation_operator), &
35- test_description_t(string_t(' assigning a string_t object to a character variable' ), assigns_string_t_to_character), &
36- test_description_t(string_t(' assigning a character variable to a string_t object' ), assigns_character_to_string_t), &
37- test_description_t(string_t(' constructing from a default integer' ), constructs_from_default_integer), &
38- test_description_t(string_t(' constructing from a real value' ), constructs_from_real), &
39- test_description_t(string_t(' supporting unary operator(.cat.) for array arguments' ), concatenates_elements), &
40- test_description_t(string_t(" extracting a key string from a colon-separated key/value pair" ), extracts_key), &
41- test_description_t(string_t(" extracting a real value from a colon-separated key/value pair" ), extracts_real_value), &
42- test_description_t(string_t(" extracting a string value from a colon-separated key/value pair" ), extracts_string_value), &
43- test_description_t(string_t(" extracting a logical value from a colon-separated key/value pair" ), extracts_logical_value), &
44- test_description_t( &
45- string_t(" extracting an integer array value from a colon-separated key/value pair" ), extracts_integer_array_value), &
46- test_description_t( &
47- string_t(" extracting an real array value from a colon-separated key/value pair" ), extracts_real_array_value), &
48- test_description_t(string_t(" extracting an integer value from a colon-separated key/value pair" ), extracts_integer_value), &
49- test_description_t(string_t(' extracting a file base name' ), extracts_file_base_name()), &
50- test_description_t(string_t(' extracting a file name extension' ), extracts_file_name_extension()) &
51- ]
30+ test_description_t &
31+ (string_t(" is_allocated() result .true. if & only if the string_t component(s) is/are allocated" ), check_allocation), &
32+ test_description_t &
33+ (string_t(' supporting operator(==) for string_t and character operands' ), supports_equivalence_operator), &
34+ test_description_t &
35+ (string_t(' supporting operator(/=) for string_t and character operands' ), supports_non_equivalence_operator), &
36+ test_description_t &
37+ (string_t(' supporting operator(//) for string_t and character operands' ), supports_concatenation_operator), &
38+ test_description_t &
39+ (string_t(' assigning a string_t object to a character variable' ), assigns_string_t_to_character), &
40+ test_description_t &
41+ (string_t(' assigning a character variable to a string_t object' ), assigns_character_to_string_t), &
42+ test_description_t &
43+ (string_t(' constructing from a default integer' ), constructs_from_default_integer), &
44+ test_description_t &
45+ (string_t(' constructing from a real value' ), constructs_from_real), &
46+ test_description_t &
47+ (string_t(' supporting unary operator(.cat.) for array arguments' ), concatenates_elements), &
48+ test_description_t &
49+ (string_t(" extracting a key string from a colon-separated key/value pair" ), extracts_key), &
50+ test_description_t &
51+ (string_t(" extracting a real value from a colon-separated key/value pair" ), extracts_real_value), &
52+ test_description_t &
53+ (string_t(" extracting a string value from a colon-separated key/value pair" ), extracts_string_value), &
54+ test_description_t &
55+ (string_t(" extracting a logical value from a colon-separated key/value pair" ), extracts_logical_value), &
56+ test_description_t &
57+ (string_t(" extracting an integer array value from a colon-separated key/value pair" ), extracts_integer_array_value), &
58+ test_description_t &
59+ (string_t(" extracting an real array value from a colon-separated key/value pair" ), extracts_real_array_value), &
60+ test_description_t &
61+ (string_t(" extracting an integer value from a colon-separated key/value pair" ), extracts_integer_value), &
62+ test_description_t &
63+ (string_t(' extracting a file base name' ), extracts_file_base_name), &
64+ test_description_t &
65+ (string_t(' extracting a file name extension' ), extracts_file_name_extension) &
66+ ]
5267#else
5368 ! Work around missing Fortran 2008 feature: associating a procedure actual argument with a procedure pointer dummy argument:
5469 procedure (test_function_i), pointer :: &
0 commit comments