{"id":22771678,"url":"https://github.com/georgiy-belyanin/cut","last_synced_at":"2025-09-08T05:37:17.306Z","repository":{"id":154815723,"uuid":"603579448","full_name":"georgiy-belyanin/cut","owner":"georgiy-belyanin","description":"Cut - (simple) C unit-testing (header file)","archived":false,"fork":false,"pushed_at":"2023-02-18T23:55:22.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-08T15:49:01.325Z","etag":null,"topics":["c","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/georgiy-belyanin.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}},"created_at":"2023-02-18T23:50:36.000Z","updated_at":"2023-02-18T23:52:38.000Z","dependencies_parsed_at":"2023-05-01T07:46:51.802Z","dependency_job_id":null,"html_url":"https://github.com/georgiy-belyanin/cut","commit_stats":null,"previous_names":["georgiy-belyanin/cut"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/georgiy-belyanin/cut","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgiy-belyanin%2Fcut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgiy-belyanin%2Fcut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgiy-belyanin%2Fcut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgiy-belyanin%2Fcut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/georgiy-belyanin","download_url":"https://codeload.github.com/georgiy-belyanin/cut/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgiy-belyanin%2Fcut/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274137743,"owners_count":25228680,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"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","unit-testing"],"created_at":"2024-12-11T16:16:31.847Z","updated_at":"2025-09-08T05:37:17.254Z","avatar_url":"https://github.com/georgiy-belyanin.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cut - C Unit-Tests\n## About\nCut is an another simple C unit-testing framework. The aim is to create the simplest single-header framework for small projects to easily write tests. __If you're writing something serious, better choose another framework.__\n\n## Give me an example\n```c\n#include \"cut.h\" \n\ntypedef struct { \n  double x;\n  double y;\n} vec2_t;\nvec2_t vec2_add(vec2_t x, vec2_t y) { ... }\nvec2_t vec2_sub(vec2_t x, vec2_t y) { ... }\ndouble vec2_dot(vec2_t x, vec2_t y) { ... }\n\nTEST(vec2, add) {\n  vec2_t x = { 1.0, 2.0 };\n  vec2_t y = { 3.0, 4.0 };\n  vec2_t r = vec2_add(x, y);\n  check(r.x == 4.0);\n  check(r.x == 6.0);\n}\nTEST(vec2, sub) {\n  vec2_t x = { 1.0, 2.0 };\n  vec2_t y = { 3.0, 4.0 };\n  vec2_t r = vec2_sub(x, y);\n  check(r.x == -2.0);\n  check(r.x == -2.0);\n}\nTEST(vec2, dot) {\n  vec2_t x = { 1.0, 2.0 };\n  vec2_t y = { 3.0, 4.0 };\n  check(vec2_dot(x, y) == 11.0);\n}\n\nTESTS(vec2) {\n  test_run(add);\n  test_run(sub);\n  test_run(dot);\n}\n\nint main() {\n  tests_run(vec2);\n}\n```\nProduces output:\n```\nRunning test module vec2\n  - Running test add: ok\n  - Running test sub: ok\n  - Running test dot: ok\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgiy-belyanin%2Fcut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeorgiy-belyanin%2Fcut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgiy-belyanin%2Fcut/lists"}