<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/fortran---testing---more-assertion-functions-cxmqx7aok" -->

---
title: Fortran - Testing - More assertion functions | daily.dev
description: Fortran's interface mechanism enables generic assertion functions that work across multiple types. By creating an interface for `assert_equals` and adding...
canonical: https://daily.dev/posts/fortran---testing---more-assertion-functions-cxmqx7aok
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Fortran - Testing - More assertion functions | daily.dev
og:description: Fortran's interface mechanism enables generic assertion functions that work across multiple types. By creating an interface for `assert_equals` and adding...
og:url: https://daily.dev/posts/fortran---testing---more-assertion-functions-cxmqx7aok
og:image: https://api.daily.dev/og/posts/cXmqX7aoK.png
og:image:alt: Fortran - Testing - More assertion functions
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Fortran - Testing - More assertion functions

**[Matthias Noback](https://daily.dev/sources/matthiasnoback)** · 11 min read · 0 upvotes · 0 comments

## Summary

Fortran's interface mechanism enables generic assertion functions that work across multiple types. By creating an interface for `assert_equals` and adding type-specific implementations like `assert_reals_equal` and `assert_strings_equal`, you can write cleaner tests without type names in function calls. The article covers handling different kind-types, comparing derived types by extending interfaces locally, and managing code duplication challenges when supporting multiple numeric precisions.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://matthiasnoback.nl/2026/02/fortran-testing-more-assertion-functions/>

## Similar posts on daily.dev

- [Fortran - Testing - Improving temporary test programs](https://daily.dev/posts/fortran---testing---improving-temporary-test-programs-6pcwovvdd) · Matthias Noback · 0 upvotes · 0 comments
- [Fortran - Testing - Returning test and assertion errors](https://daily.dev/posts/fortran---testing---returning-test-and-assertion-errors-otpskfuxh) · Matthias Noback · 0 upvotes · 0 comments
- [assert\(\): A modern How To](https://daily.dev/posts/assert-a-modern-how-to-mky6fdnmw) · Hacker News · 0 upvotes · 0 comments
- [Thinking about tests: assertions and matchers](https://daily.dev/posts/thinking-about-tests-assertions-and-matchers-cbfp1ttlt) · RUBYLAND · 1 upvotes · 1 comments
- [Fortran - Testing - Improving the design of the test framework - Part 1](https://daily.dev/posts/fortran---testing---improving-the-design-of-the-test-framework---part-1-m80zedwgr) · Matthias Noback · 0 upvotes · 0 comments

---

Tags: [#fortran](https://daily.dev/tags/fortran), [#testing](https://daily.dev/tags/testing), [#type-systems](https://daily.dev/tags/type-systems)

[View this post on daily.dev](https://daily.dev/posts/fortran---testing---more-assertion-functions-cxmqx7aok)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Fortran - Testing - More assertion functions","url":"https://daily.dev/posts/fortran---testing---more-assertion-functions-cxmqx7aok","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/fortran---testing---more-assertion-functions-cxmqx7aok"},"datePublished":"2026-02-13T09:14:45.905Z","dateModified":"2026-04-10T02:13:46.167Z","description":"Fortran's interface mechanism enables generic assertion functions that work across multiple types. By creating an interface for `assert_equals` and adding...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/205b31f2494237955875f092f2e651d3?_a=AQAEunF","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/205b31f2494237955875f092f2e651d3?_a=AQAEunF","isAccessibleForFree":true,"articleSection":"Matthias Noback","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Matthias Noback","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/362833f5f11a4feb859e90f12dc09fa8","url":"https://daily.dev/sources/matthiasnoback"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/fortran---testing---more-assertion-functions-cxmqx7aok","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"fortran,testing,type-systems","timeRequired":"PT11M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Matthias Noback","item":"https://daily.dev/sources/matthiasnoback"},{"@type":"ListItem","position":3,"name":"Fortran - Testing - More assertion functions"}]}
```

