{"id":18404547,"url":"https://github.com/avakar/mutest","last_synced_at":"2025-09-16T17:40:13.360Z","repository":{"id":45999843,"uuid":"402408269","full_name":"avakar/mutest","owner":"avakar","description":"Ridiculously simple C++ unit test library with excellent CMake integration","archived":false,"fork":false,"pushed_at":"2024-07-04T15:07:27.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T20:34:18.589Z","etag":null,"topics":["cpp11","unit-tests"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avakar.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-09-02T12:14:57.000Z","updated_at":"2024-08-19T06:03:48.000Z","dependencies_parsed_at":"2025-02-16T04:33:17.391Z","dependency_job_id":null,"html_url":"https://github.com/avakar/mutest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/avakar/mutest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avakar%2Fmutest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avakar%2Fmutest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avakar%2Fmutest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avakar%2Fmutest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avakar","download_url":"https://codeload.github.com/avakar/mutest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avakar%2Fmutest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275457688,"owners_count":25468239,"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-16T02:00:10.229Z","response_time":65,"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":["cpp11","unit-tests"],"created_at":"2024-11-06T02:53:12.636Z","updated_at":"2025-09-16T17:40:13.339Z","avatar_url":"https://github.com/avakar.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mutest\n\nRidiculously simple C++ unit test library with excellent CMake integration.\n\n## Getting Started\n\nAdd mutest as a submodule to your project and include it via FetchContent.\n\n    include(FetchContent)\n    FetchContent_Declare(avakar.mutest SOURCE_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/deps/mutest\")\n    FetchContent_MakeAvailable(avakar.mutest)\n\nUsing FetchContent ensures that when multiple projects depend on mutest,\nonly one instance -- the one declared first -- gets used.\nIt will also let the parent of your project decide which version to use.\nGenerally, dependencies should always be pulled via FetchContent.\n\nIf you're lazy, however, you can directly use `add_subdirectory`.\n\n    add_subdirectory(deps/mutest)\n\nHere, `mutest` will automatically integrate itself via FetchContent.\nIn this case, however, your subrepo must be checked out even if it ultimately\ndoesn't get used.\n\nOnce included, call `add_mutest` from your `CMakeLists.txt` to add both\nsource files and link dependencies.\n\n    add_mutest(test/test.cpp my::library)\n\nOnly projects enumerated in `-DMUTEST_PROJECTS` will have their tests included.\nRegular expressions are allowed;\nyou can set `-DMUTEST_PROJECTS=.*` to run tests for your project and all\nits direct and indirect dependencies.\nWhen unset, it defaults to your top-most project.\n\nAt the end of CMake configuration,\nregardless of how many times you've called `add_mutest`,\na single new executable called `mutests` will be created.\nIf your tests are failing, this is the target to debug.\n\nIf you've enabled testing (or included CTest), a test case will\nbe registered that runs the `mutests` executable.\nOtherwise, to make your testing simpler, a custom target named `RUN_MUTESTS`\nwill be added and included in ALL.\nIt will be run automatically if you build everything.\n\n## Writing test cases\n\nUse `mutest_case` macro to define a new unit test.\nAdd test assertions with `chk`.\n\n    #include \u003cavakar/mutest.h\u003e\n    mutest_case(\"it should honk\")\n    {\n        goose untitled;\n        untitled.press('Y');\n        chk untitled.honked();\n    }\n\nThe name of the test need not be unique.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favakar%2Fmutest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favakar%2Fmutest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favakar%2Fmutest/lists"}