Files
petfeed/.claude/rules/ecc/cpp/testing.md
T
adminandClaude Sonnet 5 f14be58c06 feat: engagement-counter denormalization, pagination fixes, dead-code cleanup
Bundles the 2026-07-12 code-audit session (Clusters A/B/C/D partial/E/F):
denormalized Post/Advertisement reaction/comment/repost counters synced
transactionally instead of live _count queries; real cursor-based pagination
for followers/following/blocks lists; assertPetOwnership + formatRelativeTime
centralized; dead r2.ts + AWS SDK deps removed; missing DB indexes added;
account-deletion flow, mention notifications, pull-to-refresh feed, and
mobile UI/i18n fixes from the surrounding sessions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 19:22:23 +02:00

843 B

paths
paths
**/*.cpp
**/*.hpp
**/*.cc
**/*.hh
**/*.cxx
**/*.h
**/CMakeLists.txt

C++ Testing

This file extends common/testing.md with C++ specific content.

Framework

Use GoogleTest (gtest/gmock) with CMake/CTest.

Running Tests

cmake --build build && ctest --test-dir build --output-on-failure

Coverage

cmake -DCMAKE_CXX_FLAGS="--coverage" -DCMAKE_EXE_LINKER_FLAGS="--coverage" ..
cmake --build .
ctest --output-on-failure
lcov --capture --directory . --output-file coverage.info

Sanitizers

Always run tests with sanitizers in CI:

cmake -DCMAKE_CXX_FLAGS="-fsanitize=address,undefined" ..

Reference

See skill: cpp-testing for detailed C++ testing patterns, TDD workflow, and GoogleTest/GMock usage.