@@ -71,6 +71,7 @@ function results() result(test_results)
7171 ,test_description_t(" construction from string_t/character expressions 'a .equalsExpected. b'" , usher(check_equals_character_vs_string)) &
7272 ,test_description_t(" construction from the character expression 'a .equalsExpected. b'" , usher(check_equals_character)) &
7373 ,test_description_t(" construction from the type(c_ptr) expression 'p .equalsExpected. q'" , usher(check_equals_c_ptr)) &
74+ ,test_description_t(" construction from the logical expression 't .equalsExpected. t'" , usher(check_equals_logical)) &
7475 ,test_description_t(" construction from the string_t expression 'a .equalsExpected. b'" , usher(check_equals_string)) &
7576 ,test_description_t(" construction from the integer expression 'i .equalsExpected. j'" , usher(check_equals_integer)) &
7677 ,test_description_t(" construction from integer(int64) relational operators" , usher(check_int64_comparisons)) &
@@ -85,6 +86,7 @@ function results() result(test_results)
8586 ,test_description_t(" construction from (.expects. logical-expression) // 'user-defined message'" , usher(check_expects_logical)) &
8687 ,test_description_t(" construction from (.expects. logical-expression) // 'user-defined message'" , usher(check_expects_logical)) &
8788 ,test_description_t(" defining a test_diagnosis_t object by assigning a logical value" , usher(check_assigns_logical)) &
89+ ,test_description_t(" aggregating a test_diagnosis_t object using .also. with a logical value" , usher(check_also_logical)) &
8890 ,test_description_t(" hardwiring a test to pass via the passing_test() function" , usher(check_passing_test_function)) &
8991 ]
9092 test_results = test_diagnosis_test% run(test_descriptions)
@@ -157,6 +159,12 @@ function check_equals_c_ptr() result(test_diagnosis)
157159 test_diagnosis = t_ptr .equalsExpected. c_loc(t)
158160 end function
159161
162+ function check_equals_logical () result(test_diagnosis)
163+ type (test_diagnosis_t) test_diagnosis
164+ logical , parameter :: t = .true. , f = .false.
165+ test_diagnosis = (t .equalsExpected. t) .also. (f .equalsExpected. f)
166+ end function
167+
160168 function check_equals_string () result(test_diagnosis)
161169 type (test_diagnosis_t) test_diagnosis
162170 type (string_t) expected_value
@@ -303,6 +311,13 @@ function check_assigns_logical() result(test_diagnosis)
303311 test_diagnosis = .true.
304312 end function
305313
314+ function check_also_logical () result(test_diagnosis)
315+ type (test_diagnosis_t) test_diagnosis
316+ test_diagnosis = .true.
317+ test_diagnosis = test_diagnosis .also. .true.
318+ test_diagnosis = .true. .also. test_diagnosis
319+ end function
320+
306321 function check_passing_test_function () result(test_diagnosis)
307322 type (test_diagnosis_t) test_diagnosis
308323 test_diagnosis = passing_test()
0 commit comments