{"id":20225023,"url":"https://github.com/adwaith-rajesh/qd_tools","last_synced_at":"2025-08-28T02:43:07.820Z","repository":{"id":184872026,"uuid":"672469635","full_name":"Adwaith-Rajesh/qd_tools","owner":"Adwaith-Rajesh","description":"some Quick and Dirty tools for developing in C","archived":false,"fork":false,"pushed_at":"2023-07-31T13:01:54.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-17T18:30:25.259Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Adwaith-Rajesh.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":"2023-07-30T07:33:45.000Z","updated_at":"2023-07-30T15:58:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"831543c7-8f9c-4285-b397-931efea041fb","html_url":"https://github.com/Adwaith-Rajesh/qd_tools","commit_stats":null,"previous_names":["adwaith-rajesh/qd_tools"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Adwaith-Rajesh/qd_tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adwaith-Rajesh%2Fqd_tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adwaith-Rajesh%2Fqd_tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adwaith-Rajesh%2Fqd_tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adwaith-Rajesh%2Fqd_tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adwaith-Rajesh","download_url":"https://codeload.github.com/Adwaith-Rajesh/qd_tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adwaith-Rajesh%2Fqd_tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272424365,"owners_count":24932893,"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-08-28T02:00:10.768Z","response_time":74,"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":[],"created_at":"2024-11-14T07:10:27.346Z","updated_at":"2025-08-28T02:43:07.785Z","avatar_url":"https://github.com/Adwaith-Rajesh.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QD Tools\n\n## Quick and Dirty tools for developing in C\n\n---\n\n#### WARNING\n\nTHE TOOLS PROVIDED HAVE NO GUARANTEE OF WORKING AND ARE MEANT TO BE USED WITH CAUTION. THE TOOLS ITSELF MAY BREAK.\n\nEg. YOUR TEST MAY FAIL BECAUSE THE TESTING TOOL IS NOT WORKING PROPERLY.\n\n\u003cp style=\"color: red\"\u003eUSE IT WITH CAUTION\u003c/p\u003e\n\n## test.h\n\nA simple testing \"framework\" for C\n\n- Without fail reason\n\n```c\n// main_test.c\n#include \"test.h\"\n\nint main(void) {\n    TEST(\"A simple test block\", {\n        ASSERT(1 == 1);\n    });\n\n    TEST(\"A failing block\", {\n        ASSERT(2 == 3);\n    });\n\n    return 0;\n}\n```\n\n- Compile and run\n\n```console\n$ gcc main_test.c -o main_test \u0026\u0026 ./main_test\n\n[ PASS ]: A simple test block\n[FAILED]: main_test.c:8 A failing block\n```\n\n\u003e It prints the filename and the line no. of the failed TEST.\n\n- With fail reasons and test statistics\n\n```c\n// main_test.c\n#define SHOW_FAIL_REASON\n#define SHOW_TEST_STATISTICS\n#include \"test.h\"\n\n\nint main(void) {\n    TEST(\"A simple test block\", {\n        ASSERT(1 == 1);\n    });\n\n    TEST(\"A failing block\", {\n        ASSERT(2 == 3);\n    });\n\n    TEST(\"Explicit Fail\", {\n        ASSERT_FAIL();\n    });\n\n    TEST(\"Explicit Fail with Reason\", {  // requires SHOW_FAIL_REASON\n        ASSERT_FAIL_W_REASON(\"Because it was wrong\")\n    });\n\n    // test_end_call() requires SHOW_TEST_STATISTICS and\n    // sets the exit code to EXIT_FAILURE if failed test exists\n    return test_end_call();\n}\n```\n\n- Compile and run\n\n```console\n$ gcc main_test.c -o main_test \u0026\u0026 ./main_test\n\n[ PASS ]: A simple test block\n[FAILED]: main_test.c:10 A failing block -- 2 == 3\n[FAILED]: main_test.c:14 Explicit Fail --\n[FAILED]: main_test.c:18 Explicit Fail with Reason -- Because it was wrong\nTotal: 4 -- Passed: 1 -- Failed: 3\n\n$ echo $?\n1\n```\n\n---\n\n## debug.h\n\nDocs on the way\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadwaith-rajesh%2Fqd_tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadwaith-rajesh%2Fqd_tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadwaith-rajesh%2Fqd_tools/lists"}