{"id":19514629,"url":"https://github.com/epatrizio/ctestfmk","last_synced_at":"2026-06-13T03:01:37.823Z","repository":{"id":142915630,"uuid":"362479768","full_name":"epatrizio/ctestfmk","owner":"epatrizio","description":"Minimalist and naive unit testing framework in C language","archived":false,"fork":false,"pushed_at":"2021-07-02T13:58:57.000Z","size":18,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-20T03:14:56.051Z","etag":null,"topics":["c","testing","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epatrizio.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-28T13:36:03.000Z","updated_at":"2021-07-02T13:59:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6c4d9a3-8a8c-475d-8b45-a6f3f3267a6b","html_url":"https://github.com/epatrizio/ctestfmk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/epatrizio/ctestfmk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epatrizio%2Fctestfmk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epatrizio%2Fctestfmk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epatrizio%2Fctestfmk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epatrizio%2Fctestfmk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epatrizio","download_url":"https://codeload.github.com/epatrizio/ctestfmk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epatrizio%2Fctestfmk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34270417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["c","testing","unit-testing"],"created_at":"2024-11-10T23:37:10.327Z","updated_at":"2026-06-13T03:01:37.806Z","avatar_url":"https://github.com/epatrizio.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ctestfmk - Minimalist and naive unit testing framework for C programs\n\nI'm learning the C language! (Mieux vaut tard que jamais :)\n\nI read the reference book (Kernighan / Ritchie). And i decided to experiment with some concepts through a concrete projet.\nSo, ctestfmk was born! inspired by this online [tutorial](https://koor.fr/C/Tutorial/FunctionPointers.wp).\n\nThis framework provides an environment to perform functions and get quick feedbacks on results.\nThis project is experimental, only to learn. I hope it can help, even evolve with real use cases.\n\n## Installation\n\nHere is how to integrate ctestfmk into your C program :\n\n* In your program tree structure, create a \"tests\" directory\n  * tests/ will contain all your test source code\n  * create a \"lib\" subdirectory\n    * \"lib\" will contain the ctestfmk static library and the .h file for #import\n\nAfter that, your environment is ready!\nIn the following sections, you will see how to write your tests and then compile them.\n\n## Use (writing tests)\n\n* In tests/ directory\n  * create a tests.h file (ctestfmk #import and test functions declarations)\n  * create *.c files for implement all your test functions respecting some framework rules\n    * A test function have to respect a specific signature -\u003e void test_fct_name(const void *function_node)\n    * A test function have to integrate assert specific macros (to automatically have the file and the call line)\n  * create main.c file for create tests suites (Remember, manual creation)\n\n*In the project, you can see a full commented example offering fake test suites.*\n\n## Compilation\n\nLast step : compile to execute the tests!\n\nYour program already has a compilation process. With tests, your program will have another independent compilation process.\nIn practice, this is another full program with:\n\n* Your files containing the functions to test\n* Your specific test files\n* A link on the ctestfmk library\n\nHere is the gcc command with ctestfmk static library :\ngcc -g -o myPrg_test -Wall -Wextra myFile1.c myFile2.c ... tests/myTestFile1.c tests/myTestFile2.c ... -lm -L./tests/lib -lctestfmk\n\n*In the project, the Makefile contains static and dynamic library compilation process.*\n\n## Run tests\n\nmain.c arguments :\n\n* No argument : Run all test suites\n* First argument (= Test suite name) : To execute a specific test suite\n* Second argument (= Function test name) : To execute a specific test suite function\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepatrizio%2Fctestfmk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepatrizio%2Fctestfmk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepatrizio%2Fctestfmk/lists"}