{"id":19787444,"url":"https://github.com/codeplea/minctest","last_synced_at":"2025-09-03T17:46:04.796Z","repository":{"id":54194669,"uuid":"43045161","full_name":"codeplea/minctest","owner":"codeplea","description":"tiny unit testing framework for ANSI C","archived":false,"fork":false,"pushed_at":"2021-03-03T22:51:32.000Z","size":11,"stargazers_count":55,"open_issues_count":0,"forks_count":10,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-22T11:18:02.381Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://codeplea.com/minctest","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeplea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-24T04:41:04.000Z","updated_at":"2025-02-05T17:24:05.000Z","dependencies_parsed_at":"2022-08-13T08:50:58.208Z","dependency_job_id":null,"html_url":"https://github.com/codeplea/minctest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeplea%2Fminctest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeplea%2Fminctest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeplea%2Fminctest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeplea%2Fminctest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeplea","download_url":"https://codeload.github.com/codeplea/minctest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251800761,"owners_count":21645964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-12T06:23:07.367Z","updated_at":"2025-04-30T23:33:32.949Z","avatar_url":"https://github.com/codeplea.png","language":"C","readme":"# Minctest\n\n\nMinctest is a very minimal unit-testing \"framework\" written in ANSI C and\nimplemented in a single header file. It's handy when you want some real simple\nunit tests for a small project.\n\nBasically, it implements assertion and equal functions. It'll track and time\nhow many tests pass and fail. Failed tests will also display which line the\nfailing test code was on.\n\nThere is a [Node.js port here](https://github.com/codeplea/minctest-node) and a [Lua port here.](https://github.com/codeplea/minctest-lua)\n\n## Features\n\n- **C99 with no dependencies**.\n- Single header file.\n- Reports file and line number for failed assertions.\n- Reports run time for each test.\n- Tests continue even after an assertion fails.\n- Has assertion for checking float equality.\n- Released under the zlib license - free for nearly any use.\n\n## Example\n\n    #include \"minctest.h\"\n\n    void test1() {\n        lok('a' == 'a');\n    }\n\n    void test2() {\n        lequal(5, 5);\n        lfequal(5.5, 5.5);\n        lsequal(\"abc\", \"abc\");\n    }\n\n    int main(int argc, char *argv[])\n    {\n        lrun(\"test1\", test1);\n        lrun(\"test2\", test2);\n        lresults();\n        return lfails != 0;\n    }\n\n\nThat produces the following output:\n\n            test1:\n             -- pass: 1                    fail: 0                    time: 12ms\n            test2:\n             -- pass: 3                    fail: 0                    time: 0ms\n    ALL TESTS PASSED (4/4)\n\n\n\n## Hints\n     All functions/variables start with the letter 'l'.\n\n## Users\n\nMinctest is used in almost all of my C projects, including:\n\n* [Tulip Indicators - Financial Technical Analysis Indicators](https://tulipindicators.org)\n* [TinyExpr - Math Expression Evaluation Library](https://codeplea.com/tinyexpr)\n* [Genann - Neural Network Library](https://codeplea.com/genann)\n\nYou can check those out to see how Minctest is used in practice.\n\nIf you're using Minctest in your project, let me know. I could add a link back.\n","funding_links":[],"categories":["Testing","测试"],"sub_categories":["YAML"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeplea%2Fminctest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeplea%2Fminctest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeplea%2Fminctest/lists"}