{"id":16653928,"url":"https://github.com/mixih/cunitframework","last_synced_at":"2026-04-26T09:32:07.974Z","repository":{"id":183880926,"uuid":"244284000","full_name":"Mixih/CUnitFramework","owner":"Mixih","description":"Unit testing library implemented in pure C as an exercise","archived":false,"fork":false,"pushed_at":"2020-04-09T02:04:10.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T20:57:47.869Z","etag":null,"topics":["macro","test-runner","testing-framework"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mixih.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,"governance":null}},"created_at":"2020-03-02T04:59:14.000Z","updated_at":"2021-04-05T06:07:57.000Z","dependencies_parsed_at":"2023-07-26T07:38:52.566Z","dependency_job_id":"bbbbabf8-9c26-4c44-8988-b95dd6988dfe","html_url":"https://github.com/Mixih/CUnitFramework","commit_stats":null,"previous_names":["mixih/cunitframework"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mixih/CUnitFramework","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mixih%2FCUnitFramework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mixih%2FCUnitFramework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mixih%2FCUnitFramework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mixih%2FCUnitFramework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mixih","download_url":"https://codeload.github.com/Mixih/CUnitFramework/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mixih%2FCUnitFramework/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32292812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T08:29:33.829Z","status":"ssl_error","status_checked_at":"2026-04-26T08:29:18.366Z","response_time":129,"last_error":"SSL_read: 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":["macro","test-runner","testing-framework"],"created_at":"2024-10-12T09:48:03.007Z","updated_at":"2026-04-26T09:32:07.957Z","avatar_url":"https://github.com/Mixih.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CUnitFramework (CUF)\n\nA unit testing library written in pure C because I shouldn't have.\n\n## Usage\n\n1. Define a \"uut\" object \n2. Declare setup and teardown functions using the SETUPFUNC and TEARDOWNFUNC\n   macros respectively. Note that the name you provide as the argument will be\n   the name of the function\n3. Define testcases using the `TESTCASE(\u003cname\u003e)` macro.\n4. Define a testsuite that hold your testcases along with setup and teardown\n   function\n5. Register testcases to the testsuite\n6. Define a test runner that handles runnign testcases and reporting\n7. Register suite to test runner\n8. Put three lines (minimal) into `main()`, and run.\n\n## Example\n```C\n#include \"test.h\"\n\nSETUPFUNC(setup) {\n    // common setup commands to run\n}\n\nTEARDOWNFUNC(teardown) {\n    // common teardown commands to run (memory deallocation, etc)\n}\n\nTESTCASE(tc1) {\n    // first test case. will be passed a `uut` object and a `TestSuite` object\n    // asserts that the two arguments are equal, and trascks the results into\n    // the testcase object\n    ASSERT_EQUAL(1,1);\n}\n\nTestRunner *create_tests() {\n    TestRunner *runner = testrunner_create();\n    Args args = {true, \"ifile.temp\", \"ofile.temp\"};\n\n    TestSuite *suite_1 = testsuite_create(\u0026setup, \u0026teardown);\n    // register the suite we defined above with a dependency on file_dep.txt\n    REGISTER_TESTCASE(suite_1, \u0026tc1, \"file_dep.txt\", \u0026args);\n    testrunner_reg_suite(runner, \u0026suite_1, \"Test Suite Name\");\n\n    return runner;\n}\n\nint main() {\n    TestRunner *test = create_tests();\n    testrunner_run(test);\n    testrunner_destroy(test);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmixih%2Fcunitframework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmixih%2Fcunitframework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmixih%2Fcunitframework/lists"}