{"id":19680914,"url":"https://github.com/codewars/fortran-test-framework","last_synced_at":"2026-02-04T17:31:30.824Z","repository":{"id":73890046,"uuid":"198745090","full_name":"codewars/fortran-test-framework","owner":"codewars","description":"Codewars test framework for Fortran","archived":false,"fork":false,"pushed_at":"2019-10-28T04:26:10.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-29T17:49:37.490Z","etag":null,"topics":["code-runner","test-framework"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codewars.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-25T02:50:39.000Z","updated_at":"2024-02-06T15:50:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"b9f284ee-020b-464a-add3-3c872f4fdabc","html_url":"https://github.com/codewars/fortran-test-framework","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/codewars/fortran-test-framework","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Ffortran-test-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Ffortran-test-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Ffortran-test-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Ffortran-test-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codewars","download_url":"https://codeload.github.com/codewars/fortran-test-framework/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Ffortran-test-framework/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29091819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-runner","test-framework"],"created_at":"2024-11-11T18:06:26.607Z","updated_at":"2026-02-04T17:31:30.809Z","avatar_url":"https://github.com/codewars.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Fortran Test Framework\n\nCodewars test framework for Fortran contributed by [@DonaldKellett](https://github.com/DonaldKellett).\n\n### Spec Subroutines\n\n```fortran\ncall describe(msg)\n```\n\nBegins a `describe` context using the message `msg` provided.  A `describe` context is useful in grouping all of the assertions used to test a particular function or module.  After all related assertions are executed, it is best practice to `call endContext()` to properly close the current `describe` context in order to avoid unintentional `describe` nesting.\n\n```fortran\ncall it(msg)\n```\n\nBegins an `it` context using the message `msg` provided.  An `it` context is useful in grouping closely related assertions which test for the same feature/aspect of a given function or module.  `it` contexts should generally reside within `describe` contexts.  After the related group of assertions are executed, it is best practice to `call endContext()` to properly close the current `it` context in order to avoid unintentional `it` (and `describe`) nesting.\n\n```fortran\ncall endContext()\n```\n\nA subroutine which does not accept any arguments and simply ends the most recently started context.  It should *never* be invoked *before* a `describe` and/or `it` context.\n\n### Assertion Subroutines\n\n```fortran\ncall assertEquals(expected, actual)\n```\n\nDirectly compares two values for equality.  A number of commonly used data types are supported, including:\n\n- `integer` (the default integer type)\n- `integer(kind=8)`\n- `integer(kind=16)`\n- `logical` (default type only)\n- `character` (default type only, supports both single characters and strings)\n\nNote that: (1) both `expected` and `actual` must be of the same type when performing the assertion and (2) `assertEquals` for strings does more than simple equality comparison `==` - it also checks for the lengths of both strings to prevent false positives where a shorter string is padded to the right with whitespace characters and then considered equal with the longer string containing trailing whitespace characters.\n\n```fortran\ncall assertEquals(expected, actual, msg)\n```\n\nDirectly compares two values for equality, with the custom message `msg` (a string) specified upon failure.  The data types supported are identical to `assertEquals`, i.e. `integer`, `integer(kind=8)`, `integer(kind=16)`, `logical` and `character`.\n\n```fortran\ncall assertNotEquals(unexpected, actual)\n```\n\nThe inverse assertion of `assertEquals`.  The data types supported are identical to `assertEquals`.\n\n```fortran\ncall assertNotEquals(unexpected, actual, msg)\n```\n\nThe inverse assertion of `assertEquals` with the custom message `msg` (a string) displayed upon failure.  The data types supported are identical to `assertEquals`.\n\n```fortran\ncall assertWithinTolerance(expected, actual, epsilon)\n```\n\nCompares two values for approximate equality within an absolute tolerance value `epsilon`.  This assertion method supports the following data types:\n\n- `real` (default, single-precision floating point values)\n- `real(kind=8)`\n- `complex` (default type only)\n\nThe data type for `epsilon` varies depending on what `expected` and `actual` are - for `real` and `complex`, `epsilon` should be `real` while for `real(kind=8)` (double-precision values), `epsilon` should also be a double-precision value.\n\n```fortran\ncall assertWithinTolerance(expected, actual, epsilon, msg)\n```\n\nSame as above except a custom message `msg` (a string) is shown upon failure.\n\n```fortran\ncall assertNotWithinTolerance(unexpected, actual, epsilon)\n```\n\nInverse assertion of `assertWithinTolerance`\n\n```fortran\ncall assertNotWithinTolerance(unexpected, actual, epsilon, msg)\n```\n\nInverse assertion of `assertWithinTolerance` with custom message `msg` displayed upon failure.\n\n\n## Acknowledgements\n\nFortran test framework for Codewars was contributed by [@DonaldKellett](https://github.com/DonaldKellett) ([@donaldsebleung](https://www.codewars.com/users/donaldsebleung) on Codewars).\nThe code and the documentation was copied from [DonaldKellett/fortran-kata](https://github.com/DonaldKellett/fortran-kata) which permits Codewars to use without restrictions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewars%2Ffortran-test-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewars%2Ffortran-test-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewars%2Ffortran-test-framework/lists"}