{"data":{"slug":"discovered-a79614c42e683c39fc7c42deb2cb0bf698dd953edc712f26","title":"Test Case Rules for FSP Modules","summary":"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.","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","download_url":"https:\/\/skillshunter.net\/skills\/discovered-a79614c42e683c39fc7c42deb2cb0bf698dd953edc712f26\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_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.","instructions":"---\nname: test-case-rules\ndescription: 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.\n---\n\n# Test case and usage note rule\n\nWhen you add a test case, do all of these in the same change:\n\n1. **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.\n2. **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.\n3. **Check:** the requirement ID must match between the test tags and the anchor. Each anchor must sit in a section a user can read.\n4. **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.\n5. **Line endings:** keep CRLF in peaks files. Check with `grep -c $'\\r$' <file>` against `wc -l`.\n\nExample (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\".\n","use_cases":["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"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/minhnguyenyf\/skills\/blob\/7213d81500a27f3a96028144f5342ccfe4efbe4a\/common\/test-case-rules\/SKILL.md","source_commit":"7213d81500a27f3a96028144f5342ccfe4efbe4a","license":null,"version":null,"listing_approved_at":"2026-11-30","created_at":"2026-11-29T11:12:08.000000Z","updated_at":"2026-11-30T06:52:26.000000Z","seo_title":"Test Case Rules for FSP Module Development","seo_description":"A rule for maintaining synchronization between test cases, requirement tags, and usage note anchors in FSP modules.","seo_keywords":["test case rules","FSP module development","requirement tags","usage note anchors","test verification"]}}