A step-by-step redesign of a Fortran test framework, addressing issues with allocatable return values used to signal optionality. The author replaces allocatable types with a concrete test_result_t type containing a logical failed flag, introduces type-bound procedures (process, fail, has_failed, is_risky) to encapsulate state,

13m read timeFrom matthiasnoback.nl
Post cover image
Table of contents
A reusable type for “test result”Letting the test result handle assertion resultsEncapsulating data components of test_result_tPreventing “uncaught” errorsReporting “risky” tests

Sort: