{"id":50614562,"url":"https://github.com/algodesigner/tester","last_synced_at":"2026-06-06T07:02:34.486Z","repository":{"id":119188432,"uuid":"201860919","full_name":"algodesigner/tester","owner":"algodesigner","description":"A miniature unit testing framework for C","archived":false,"fork":false,"pushed_at":"2026-02-21T14:44:08.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-21T20:57:52.771Z","etag":null,"topics":["c","compact-framework","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/algodesigner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-08-12T05:02:05.000Z","updated_at":"2026-02-21T14:44:11.000Z","dependencies_parsed_at":"2023-12-27T11:49:14.175Z","dependency_job_id":null,"html_url":"https://github.com/algodesigner/tester","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/algodesigner/tester","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algodesigner%2Ftester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algodesigner%2Ftester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algodesigner%2Ftester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algodesigner%2Ftester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/algodesigner","download_url":"https://codeload.github.com/algodesigner/tester/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algodesigner%2Ftester/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33972398,"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-06T02:00:07.033Z","response_time":107,"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","compact-framework","unit-testing"],"created_at":"2026-06-06T07:02:32.598Z","updated_at":"2026-06-06T07:02:34.461Z","avatar_url":"https://github.com/algodesigner.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tester: A Miniature C Testing Framework\n\nTester is a lightweight, single-file unit testing framework for C. It is designed to be simple to integrate and easy to use for both small projects and embedded systems.\n\n## Key Features\n\n- **Minimalist**: Minimal dependencies and small footprint.\n- **Grouped Tests**: Organise your assertions into logical groups.\n- **Flexible Output**: Control output verbosity and redirect logs to any file stream.\n- **Easy Integration**: Just include `tester.h` and link with `tester.c`.\n\n## Getting Started\n\n### 1. Basic Example\n\nHere is a quick look at how to use Tester:\n\n```c\n#include \"tester.h\"\n\nint main() {\n    // Create a tester instance (outputs to stdout, logs all tests)\n    tester *t = tester_create(stdout, false);\n\n    tester_new_group(t, \"Arithmetic Tests\");\n    tester_assert(t, 1 + 1 == 2, \"1 + 1 equals 2\");\n    tester_assert(t, 5 * 2 == 10, \"5 * 2 equals 10\");\n\n    tester_new_group(t, \"Logic Tests\");\n    tester_assert(t, true, \"True is true\");\n\n    // Final result (returns true if all tests passed)\n    bool success = tester_result(t);\n\n    // Finalise and cleanup\n    tester_destroy(t);\n\n    return success ? 0 : 1;\n}\n```\n\n### 2. Compilation\n\nCompile your test file along with `tester.c`:\n\n```bash\ngcc -o my_tests main.c src/tester.c -Isrc\n./my_tests\n```\n\n## API Reference\n\n### Lifecycle Management\n\n- `tester *tester_create(FILE *fp, bool only_failures)`\n  Creates a new tester instance. `fp` is the output stream (e.g., `stdout` or a file). If `only_failures` is true, successful tests will not be logged.\n- `void tester_destroy(tester *obj)`\n  Finalises the report, flushes the output, and frees all memory associated with the tester.\n\n### Running Tests\n\n- `void tester_new_group(tester *obj, const char *name)`\n  Starts a new group of tests. All subsequent assertions will be reported under this group.\n- `tester_assert(obj, exp, name)`\n  The primary macro for testing. `exp` is the expression to evaluate, and `name` is a descriptive name for the test.\n\n### Results\n\n- `bool tester_result(tester *obj)`\n  Returns `true` if all tests performed so far have passed, `false` otherwise.\n\n## Documentation and Examples\n\n- [tester.h](file:///Users/vlad/.gemini/antigravity/scratch/tester/src/tester.h): Detailed interface definition.\n- [example.c](file:///Users/vlad/.gemini/antigravity/scratch/tester/src/example.c): A more complex sample application showing advanced usage.\n\nEnjoy! ☕\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgodesigner%2Ftester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falgodesigner%2Ftester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgodesigner%2Ftester/lists"}