{"id":42298316,"url":"https://github.com/jurgen-kluft/cunittest","last_synced_at":"2026-01-27T10:17:06.850Z","repository":{"id":57541363,"uuid":"52663945","full_name":"jurgen-kluft/cunittest","owner":"jurgen-kluft","description":"Unittest library, C++","archived":false,"fork":false,"pushed_at":"2026-01-12T00:39:36.000Z","size":1943,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-12T04:50:21.654Z","etag":null,"topics":["fixture","memory-leaks","unittest"],"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/jurgen-kluft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"buy_me_a_coffee":"Jur93n"}},"created_at":"2016-02-27T11:39:12.000Z","updated_at":"2026-01-12T00:39:40.000Z","dependencies_parsed_at":"2024-10-20T08:06:11.363Z","dependency_job_id":"b3676838-4566-4db0-80f2-d83c241927eb","html_url":"https://github.com/jurgen-kluft/cunittest","commit_stats":{"total_commits":192,"total_committers":13,"mean_commits":14.76923076923077,"dds":0.578125,"last_synced_commit":"5a58745c744f25bbcc0714f05c61c9b41cb2df5d"},"previous_names":["jurgen-kluft/xunittest"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jurgen-kluft/cunittest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fcunittest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fcunittest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fcunittest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fcunittest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jurgen-kluft","download_url":"https://codeload.github.com/jurgen-kluft/cunittest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fcunittest/sbom","scorecard":{"id":543290,"data":{"date":"2025-08-11","repo":{"name":"github.com/jurgen-kluft/cunittest","commit":"1290a129c088eb90ab5004c79a99a8bc3c15c6c9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":4,"reason":"5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T08:46:48.468Z","repository_id":57541363,"created_at":"2025-08-20T08:46:48.469Z","updated_at":"2025-08-20T08:46:48.469Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28811584,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["fixture","memory-leaks","unittest"],"created_at":"2026-01-27T10:17:05.322Z","updated_at":"2026-01-27T10:17:06.843Z","avatar_url":"https://github.com/jurgen-kluft.png","language":"C++","funding_links":["https://buymeacoffee.com/Jur93n"],"categories":[],"sub_categories":[],"readme":"# cunittest\n\nCross platform unittest library\n\n- Windows\n- Mac OS\n\n## Memory Leaks\n\nEach fixture and test in a fixture is guarded against memory leaks and the user will be informed if a test or a fixture is leaking memory.\nA memory leak is defined as an allocation that is not freed before the test or fixture ends.\n\n## Memory Guards\n\nEach test and fixture is adding header and footer guards on allocations to be able to identify out-of-bounds memory writes. If a test or fixture corrupts memory, the unittest framework will report it. It is not covering all possible memory corruption cases, but it will catch those that are writing after or before allocated memory.\n\n## Assert Handler\n\nIf your library has the ability to internally handle asserts you can let the UnitTest library be aware of this.\nThis allows you to have a test fail if asserts are triggered within the code you are testing.\n\n## Extending to other platforms\n\nTo extend for an additional platform, e.g. Linux, add:\n\n- `source/main/cpp/entry/ut_Entry_Linux.cpp`\n- `source/main/cpp/ut_Stdout_Linux.cpp`\n- `source/main/cpp/ut_Test_Linux.cpp`\n- `source/main/cpp/ut_TimeHelpers_Linux.cpp`\n- `source/main/cpp/ut_Utils_Linux.cpp`\n\n## Unittest MACROs\n\n  - CHECK_EQUAL(expected, actual)\n  - CHECK_NOT_EQUAL(expected, actual)\n  - CHECK_TRUE(actual)\n  - CHECK_FALSE(actual)\n  - CHECK_NULL\n  - CHECK_NOT_NULL\n\nThis library also detects memory leaks on a UNITTEST_TEST() scope as well as a FIXTURE_SETUP/FIXTURE_TEARDOWN scope.\n\n## Test Registration\n\nYou do need to register your suite to be part of the list of unittests to run.\n\n```c++\nUNITTEST_SUITE_LIST(cUnitTest);\n\nUNITTEST_SUITE_DECLARE(cUnitTest, doubly_linked_list);\n\n```\n\n## Main Entry\n\nThis is an example of a test application main entry where you can see 2 main points that need to be initialized by the user:\n\n- context_t::set_assert_handler    (to make sure that asserts are catched by the unittest framework)\n- UnitTest::SetAllocator           (the unittest framework needs an allocator to allocate memory)\n\nAfter that you need to call ``UNITTEST_SUITE_RUN(context, reporter, cYourUnitTest);``\n\n```c++\nbool gRunUnitTest(UnitTest::TestReporter\u0026 reporter, UnitTest::TestContext\u0026 context)\n{\n    cbase::init();\n\n#ifdef TARGET_DEBUG\n    ncore::UnitTestAssertHandler assertHandler;\n    ncore::context_t::set_assert_handler(\u0026assertHandler);\n#endif\n    ncore::console-\u003ewrite(\"Configuration: \");\n    ncore::console-\u003esetColor(ncore::console_t::YELLOW);\n    ncore::console-\u003ewriteLine(TARGET_FULL_DESCR_STR);\n    ncore::console-\u003esetColor(ncore::console_t::NORMAL);\n\n    ncore::alloc_t*          systemAllocator = ncore::context_t::system_alloc();\n    ncore::UnitTestAllocator unittestAllocator(systemAllocator);\n    context.mAllocator = \u0026unittestAllocator;\n\n    ncore::TestAllocator testAllocator(\u0026unittestAllocator);\n    ncore::context_t::set_system_alloc(\u0026testAllocator);\n\n    int r = UNITTEST_SUITE_RUN(context, reporter, cUnitTest);\n    if (unittestAllocator.mNumAllocations != 0)\n    {\n        reporter.reportFailure(__FILE__, __LINE__, \"cunittest\", \"memory leaks detected!\");\n        r = -1;\n    }\n\n    ncore::context_t::set_system_alloc(systemAllocator);\n\n    cbase::exit();\n    return r == 0;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjurgen-kluft%2Fcunittest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjurgen-kluft%2Fcunittest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjurgen-kluft%2Fcunittest/lists"}