whitebox-controlflow-basic

Design test cases for statement, branch, condition, and decision/condition coverage criteria.

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/Hakkadaikon/hymme --skill whitebox-controlflow-basic-hakkadaikon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: whitebox-controlflow-basic
Source: https://github.com/Hakkadaikon/hymme/tree/main/skills/whitebox-controlflow-basic
Command: npx skills add https://github.com/Hakkadaikon/hymme --skill whitebox-controlflow-basic-hakkadaikon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It explains how to apply basic white-box structural coverage criteria (C0 statement, C1 branch, condition, and decision/condition coverage) so you can systematically build test cases that actually exercise code paths instead of trusting a single coverage number. ## Core Features & Use Cases - Coverage criteria definitions: Precise completion criteria, case-construction procedures, and achievement checks for C0, C1, condition coverage, and decision/condition coverage, ordered by strength. - TypeScript examples: Runnable vitest examples showing which cases satisfy each criterion and which gaps remain. - Pitfall guidance: Explains why C0 100% misses untested false branches, why condition coverage can miss decision outcomes, and how short-circuit evaluation hides untested conditions. - Use Case: When reviewing a function with compound conditions like admin || active, use this Skill to derive the minimal case set that covers both decision outcomes and every atomic condition's true/false values. ## Quick Start Ask the AI to design branch and condition coverage test cases for a given TypeScript function using the whitebox-controlflow-basic criteria.

Frequently Asked Questions about whitebox-controlflow-basic

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

FAQPage Schema
How do I design branch coverage test cases?

Branch (C1) coverage requires exercising both the true and false outcomes of every decision (if, while, switch, ternary) at least once. Enumerate all decisions, assign true/false slots to each, pick inputs that hit each slot, and verify with a branch coverage report.

What is the difference between condition coverage and decision coverage?

Decision coverage (C1) only checks that each whole decision evaluates both true and false, while condition coverage checks that each atomic condition inside a compound expression takes both values. Condition coverage alone can miss one decision outcome, so decision/condition coverage combines both.

Is 100% statement coverage enough for testing?

No. C0 100% only means every executable line ran once; the false side of branches can remain completely untested. Treat statement coverage as a minimum floor in CI, not a quality target, and add branch and condition criteria.

Why does short-circuit evaluation affect condition coverage?

With operators like && and ||, later conditions may never be evaluated for some inputs, so their true/false slots stay unfilled even when coverage looks complete. Choose inputs that force evaluation of every atomic condition.

When should I use MC/DC instead of decision/condition coverage?

Use MC/DC when you must show each condition independently affects the decision outcome, such as in safety-critical code. Decision/condition coverage is a cheaper intermediate level that does not prove independent influence.