{"id":25980561,"url":"https://github.com/lainq/cctest","last_synced_at":"2025-09-16T13:22:41.284Z","repository":{"id":205819888,"uuid":"714739491","full_name":"lainq/cctest","owner":"lainq","description":"A simple goofy header-only testing library made for testing in C++","archived":false,"fork":false,"pushed_at":"2023-11-07T16:17:02.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T07:43:17.036Z","etag":null,"topics":["cpp","cxx17","testing","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lainq.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-11-05T18:15:10.000Z","updated_at":"2023-11-05T18:41:28.000Z","dependencies_parsed_at":"2025-03-05T07:37:26.519Z","dependency_job_id":"42298992-2c00-4a63-8cb1-9d527a105b51","html_url":"https://github.com/lainq/cctest","commit_stats":null,"previous_names":["lainq/cctest"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lainq/cctest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lainq%2Fcctest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lainq%2Fcctest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lainq%2Fcctest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lainq%2Fcctest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lainq","download_url":"https://codeload.github.com/lainq/cctest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lainq%2Fcctest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275424687,"owners_count":25462331,"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":["cpp","cxx17","testing","unit-testing"],"created_at":"2025-03-05T07:36:56.632Z","updated_at":"2025-09-16T13:22:41.235Z","avatar_url":"https://github.com/lainq.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"### cctest (refactor required)\ncctest is a very simple library made for testing in c++\n\nThe library is a header-only library which contains a single header file which can be copied into your projects includes.\n\n#### Usage\nHere's an example\n```cc\n#include \"../include/cctest.hpp\"\n#include ...\n// ... \nTEST_CASE(test_case_check_eq) {\n  EXPECT_THAT(9, cctest::utils::is_divisible_by(3));\n  EXPECT_THAT(std::string(\"Hello World\"), cctest::utils::starts_with(\"Not Hello\"));\n\n  std::string initial = \"Hello World\";\n  initial.append(\"world2\");\n  ASSERT_EQ(initial, \"Hello Worldworld2\");\n  ASSERT_EQ(initial.at(0), 'H');\n  auto count = std::count_if(initial.begin(), initial.end(),\n                             [](char pred) { return std::isdigit(pred); });\n  ASSERT_EQ(count, 1);\n}\n\nTEST_CASE(yet_another_test) {\n  std::vector\u003cint\u003e v{1, 2, 3, 4, 5};\n  ASSERT(std::binary_search(v.begin(), v.end(), 3));\n  FATAL_ASSERT(1 == 1);\n  ASSERT_EQ(1, 4);\n}\n\nTEST_CASE(another_test) {\n  std::vector\u003cint\u003e vec(10);\n  std::iota(vec.begin(), vec.end(), 1);\n  ASSERT_EQ(std::accumulate(vec.begin(), vec.end(), 0), 55);\n\n  FATAL_ASSERT(1 == 3);\n  ASSERT_NEQ(2 * 2, 4);\n}\n\nint main() { RUN_TESTS(); }\n```\n\nThe following will be the output\n```sh\nRunning 3 tests\ntest test_case_check_eq ... PASSED\ntest yet_another_test ... FAILED\ntest another_test ... FAILED\nEncountered a fatal error, aborted the remaining 0 tests\n\nfailures:\n-----run----\nrun panicked at ./examples/example.cc:10\nExpected \"Hello World\" to start with \"Not Hello\"\n\nrun panicked at ./examples/example.cc:22\nAssertion failed\nExpected: 4\nActual: 1\n\nFATAL ERROR\n-----run----\nrun panicked at ./examples/example.cc:30\nassertion 1 == 3 failed\n\ntest result:FAILED. 1 passed; 2 failed;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flainq%2Fcctest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flainq%2Fcctest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flainq%2Fcctest/lists"}