cpp-testing
C++ testing workflow for unit and integration tests: GoogleTest/GoogleMock, CMake/CTest integration, diagnosing flaky tests, and running sanitizers and coverage for correctness signal. Use when writing or fixing C++ tests and test infrastructure.
v2026.11.13-21cd5683 instalações+3 em 7 dias39 EstrelasMITsincronizado há 10 horas
Instalar
Ainda não tem a CLI da NotHoly? Instale primeiro.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install aeondave/cpp-testingGrava em ~/.notholy/skills depois de conferir a assinatura e o SHA-256.
AssinaturaAssinado, ed25519
Pacote80499e86…c2b6fc26
80499e863041…5131c2b6fc265 arquivos · 5.5 KBVarreduraMédio2 achados
- injection.no_confirmationreferences/test-design.md:8
- Links para domínios externos
Fontegithub.com/AeonDave/malskill/tree/main/coding/cpp-testing@21cd568
Este item ainda não foi escrito no seu idioma, então aparece em English.
Nesta página
High-signal workflow for writing and maintaining reliable C++ tests.
When to activate
- Adding new unit tests, regression tests, or integration tests
- Fixing failing or flaky C++ tests
- Wiring GoogleTest with CMake/CTest
- Enabling sanitizers for memory/UB/race diagnostics
Outcome expectations
- Fast deterministic unit tests with clear failure messages.
- Integration tests separated and labeled by cost/risk.
- Flake triage follows reproducible, root-cause-first workflow.
- Sanitizers/coverage are integrated as recurring quality signal.
Core rules
- Tests must be deterministic: no sleeping for synchronization.
- Prefer fakes for state, mocks for interactions.
- Use
ASSERT_*for preconditions,EXPECT_*for additional checks. - Keep unit tests fast; label integration tests separately.
- Keep one source of truth for test configuration in CMake targets.
- Avoid production-only test hooks unless they expose a real design seam.
- Pair with
test-driven-developmentwhen implementing persistent code or bug fixes test-first. - Pair with
testing-reliabilityfor mock/timing anti-patterns andsystematic-debuggingwhen symptoms are far from the defect.
Recommended workflow
- Define the behavior and test scope (unit vs integration) first.
- Add/adjust tests with clear Arrange-Act-Assert structure.
- Run focused test selection (
ctest -R/ gtest filter). - Run sanitizers for memory/UB/races where applicable.
- If flaky/failing, minimize reproducer and fix root cause before broad reruns.
Triage loop for failing tests
- Reproduce deterministically on one test binary.
- Capture failure class: assertion mismatch, crash, timeout, data race, UB.
- Narrow input/state until minimal failing case is obtained.
- Fix production code first (or fixture isolation), then harden test.
- Re-run focused + full suite + sanitizer build.
Resources
Load on demand:
references/googletest-cmake.md— FetchContent + CTest discovery (gtest_discover_tests)references/test-design.md— unit vs integration, fixtures, parameterized testsreferences/sanitizers-coverage.md— ASan/UBSan/TSan + coverage recipesreferences/flakes-debugging.md— anti-flake rules, gdb/lldb, Valgrind, MinGW objdump/nm, MSVC dumpbin/WinDbg, sanitizer env vars
Arquivos desta versão
references/49.2 KB
- flakes-debugging.md3.0 KB
- googletest-cmake.md2.1 KB
- sanitizers-coverage.md1.8 KB
- test-design.md2.3 KB
- SKILL.md2.9 KB
Permissões
| Permissão | Declarada | Encontrada na varredura |
|---|---|---|
| Lê arquivos | Não | Não |
| Grava arquivos | Sim | Sim |
| Roda comandos no shell | Sim | Sim |
| Usa a rede | Sim | Sim |
| Usa conectores | Não | Não |
| Controla um navegador | Não | Não |
Achados da varredura
Revisado em 13 de nov. de 2026
- MédiaPrompt injection · injection.no_confirmationreferences/test-design.md:8
- InfoLink · Links para domínios externos
Uma varredura limpa reduz o risco, mas não prova que o pacote é seguro. Leia o que você instala.
| Versão | Publicada em | Commit | SHA-256 | Assinatura | Mudança de permissão |
|---|---|---|---|---|---|
| v2026.11.13-21cd568 | 13 de nov. de 2026 | 21cd568 | 80499e86 | Assinada | – |
Mais de AeonDave
Tudo deste publicadorMais em Relatórios e compliance
Ver a categoria- skillduty1g/skill5
- rea-ci-tests-auditmorluto/rea-ci-tests-audit4
- tracking-threat-actor-infrastructuremukul975/tracking-threat-actor-infrastructure4
- performing-authenticated-scan-with-openvasmukul975/performing-authenticated-scan-with-openvas4
- slicing-code-contexttrailofbits/slicing-code-context4
- 1337aeondave/13374
Pergunte tudo o que o seu escopo permite.
Crie a conta, adicione créditos e faça a primeira pergunta no chat ou no terminal.
- 1/3
Crie a conta
Individual ou empresa. Dá para virar empresa depois sem perder saldo nem chaves.
Pessoa físicaEmpresa - 2/3
Adicione créditos
No cartão. Você paga por token, sem assinatura.
$5.00recarga mínima - 3/3
Pergunte
No chat, ou instale o CLI e rode notholy login no terminal.
$ notholy login