unittest-create

Generate C/C++ unit test files with CTP-compatible CMake and stdout conventions.

1|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/tw-kang/skills --skill unittest-create
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unittest-create
Source: https://github.com/tw-kang/skills/tree/main/unittest-create
Command: npx skills add https://github.com/tw-kang/skills --skill unittest-create

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generates well-formed C and C++ unit test source files and templates that integrate with the CTP unittest runner, removing ambiguity about binary naming, stdout pass/fail conventions, and CMake integration so developers can add unit tests reliably.

Core Features & Use Cases

  • Template generation: Produces minimal C and C++ unittest templates that include assertion patterns and pass/fail stdout messages required by CTP.
  • CTP conventions & build hints: Enforces binary naming (unittests_<module>), recommends install-to-bin behavior, and provides CMakeLists integration guidance.
  • Verification checklist: Reminds authors to avoid server dependencies, print OK/success on pass and fail on failures, and include a CMake target to ensure discovery by CTP.
  • Use Cases: Scaffolding a new low-level CUBRID unit test, converting a failing repro into a reproducible unittest, or adding a CMake entry for an existing test source file.

Quick Start

Generate a new C/C++ unittest source and CMake entry that produces stdout messages printing OK on success and fail on failures so CTP can judge pass/fail.

Frequently Asked Questions about unittest-create

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate C and C++ unit test source files for CUBRID that integrate with the CTP runner?

To generate C and C++ unit test source files for CUBRID, use a scaffolding utility that produces source templates with assertion patterns and stdout pass/fail messages required by the CTP runner. This ensures your tests are discovered and executed correctly by the CTP framework.

What stdout output does CTP expect from a CUBRID unit test to determine pass or fail?

CTP expects CUBRID unit tests to print "OK" or "success" on pass and "fail" on failure to stdout. Adhering to this convention allows the CTP runner to automatically judge whether the unit test passed or failed during execution.

How do I add CMake entries for low-level CUBRID unittests compiled into unittests_<module> binaries?

To add CMake entries for low-level CUBRID unittests, you need a build snippet that compiles source files into binaries named unittests_<module>, installs them to the bin/ directory, and ensures discovery by the CTP runner without requiring broker or server dependencies.

Can I use broker or server dependencies when scaffolding low-level CUBRID unit tests?

No, low-level CUBRID unit tests should avoid broker or server dependencies. Tests must run independently, compile into unittests_<module> binaries, and validate functionality in isolation to ensure reliable execution within the CTP runner environment.

What is the best way to convert a failing CUBRID repro case into a reproducible unit test?

The best way to convert a failing CUBRID repro case is to scaffold a new C or C++ unit test source file that encapsulates the repro logic, prints pass/fail messages to stdout, and includes a CMake target for integration into the CTP unittest runner.