> CMake Testing & CTest
C++ unit testing with CMake, Google Test, and Catch2.
fetch
$
curl "https://skillshub.wtf/skillshub-team/catalog-batch5/cmake-testing?format=md"SKILL.md•CMake Testing & CTest
CMake Testing
Google Test
FetchContent_Declare(googletest GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG v1.14.0)
FetchContent_MakeAvailable(googletest)
enable_testing()
add_executable(tests test/test_main.cpp)
target_link_libraries(tests PRIVATE mylib GTest::gtest_main)
gtest_discover_tests(tests)
TEST(MathTest, Add) { EXPECT_EQ(add(2, 3), 5); }
TEST(MathTest, Throws) { EXPECT_THROW(divide(1, 0), std::runtime_error); }
Run: ctest --test-dir build --output-on-failure -j$(nproc)
> related_skills --same-repo
> Nix Dev Shells with direnv
Auto-activate reproducible dev environments with Nix flakes and direnv.
> Dagger with GitHub Actions
Run Dagger CI/CD pipelines in GitHub Actions for portable, testable builds.
> Bun + Hono API
Build fast APIs with Bun runtime and Hono framework.
> Deno Fresh Framework
Build full-stack web apps with Fresh on Deno. Islands, routes, and zero runtime overhead.
┌ stats
installs/wk0
░░░░░░░░░░first seenMar 18, 2026
└────────────