# Test Case Rules for FSP Modules

Ensure test cases, requirement tags, and usage note anchors are synchronized when adding or modifying a test in an FSP module, such as rm_tinycrypt_port.

**Canonical URL:** https://skillshunter.net/skills/discovered-a79614c42e683c39fc7c42deb2cb0bf698dd953edc712f26

**JSON URL:** https://skillshunter.net/api/public/v1/skills/discovered-a79614c42e683c39fc7c42deb2cb0bf698dd953edc712f26

**Markdown URL:** https://skillshunter.net/skills/discovered-a79614c42e683c39fc7c42deb2cb0bf698dd953edc712f26.md

**Instructions download URL:** https://skillshunter.net/skills/discovered-a79614c42e683c39fc7c42deb2cb0bf698dd953edc712f26/download

**Category:** Software & Development

**Source URL:** https://github.com/minhnguyenyf/skills/blob/7213d81500a27f3a96028144f5342ccfe4efbe4a/common/test-case-rules/SKILL.md

**Source commit:** 7213d81500a27f3a96028144f5342ccfe4efbe4a

**Listing approved at:** 2026-11-30

**Created at:** 2026-11-29T11:12:08.000000Z

**Updated at:** 2026-11-30T06:52:26.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

Before making changes, ensure that the requirement ID is consistent across the @req, @verify, and @anchor tags. The requirement ID must match exactly between the test tags and the anchor in the usage note file.

### When to use it

- Adding a new test case with @req and @verify tags
- Updating an existing test case to include requirement and verification tags
- Creating or updating a usage note anchor in a module's usage_notes.md file

## Skill instructions

---
name: test-case-rules
description: Rule for adding or changing a test case in an FSP module (for example rm_tinycrypt_port). Use when adding a TEST(), a @req or @verify tag, or a usage-note anchor, so the requirement, test, and usage note stay in sync.
---

# Test case and usage note rule

When you add a test case, do all of these in the same change:

1. **Test:** add `@req{<id>,<ticket>,<doc_ref>}` and `@verify{<id>}` in the test's comment block. Use the same `<id>` in both tags. The build checker reports `missing @verify` when the tag is absent.
2. **Usage note:** in the module's `!dsn/<module>_usage_notes.md`, add `@anchor um_<id>` where the feature is described. The anchor name is `um_` plus the requirement ID, lowercase, exactly.
3. **Check:** the requirement ID must match between the test tags and the anchor. Each anchor must sit in a section a user can read.
4. **Correct:** if the usage note already describes the behaviour, fix any out-of-date text in the same change. Do not leave a note that contradicts the test.
5. **Line endings:** keep CRLF in peaks files. Check with `grep -c $'\r$' <file>` against `wc -l`.

Example (rm_tinycrypt_port): test `TC_API_TestDeprecatedNames` uses `@req{tc_deprecated_names,FSPRA-6430,...}` and `@verify{tc_deprecated_names}`. The usage note has `@anchor um_tc_deprecated_names` in "Deprecated API Names".

