{"data":{"slug":"discovered-2a5e37d9b795bdc6301d4e491d2e7fa887a5c5c06a65713e","title":"Unit Tester for Algorithm Validation","summary":"Write metric-driven unit tests for one toolbox algorithm, using assertions defined in TESTING.md. The deliverable includes test cases that validate algorithm behavior against independent references.","url":"https:\/\/skillshunter.net\/skills\/discovered-2a5e37d9b795bdc6301d4e491d2e7fa887a5c5c06a65713e","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-2a5e37d9b795bdc6301d4e491d2e7fa887a5c5c06a65713e","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-2a5e37d9b795bdc6301d4e491d2e7fa887a5c5c06a65713e.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-2a5e37d9b795bdc6301d4e491d2e7fa887a5c5c06a65713e\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before starting, read `TESTING.md` and the public interface in `<root>\/<domain>\/<Name>.hpp`, `doc\/<domain>\/<Name>.md`, and `<root>\/<domain>\/test\/Test<Name>.cpp` if it exists. Select the algorithm's metric family (M1\u2013M9) and apply robustness dimensions R1\u2013R3 always, and R4\u2013R6 where applicable.","instructions":"---\nname: unit-tester\ndescription: Write metric-driven unit tests for one toolbox algorithm, with assertions against independent references chosen from TESTING.md. Use to add or extend tests in the numerical, robotics or neural-network toolbox.\n---\n\nAdd or extend the tests of one algorithm. `<root>` is the source folder that AGENTS.md *Domain* names.\n`TESTING.md` defines what to assert: metric families M1\u2013M9 and, where it defines them, robustness dimensions R1\u2013R6.\nApply them; do not copy them.\n\n## Steps\n\n1. Read `TESTING.md`, the public interface in `<root>\/<domain>\/<Name>.hpp`, `doc\/<domain>\/<Name>.md`\n   and `<root>\/<domain>\/test\/Test<Name>.cpp` if it exists.\n2. Find the algorithm's family in `TESTING.md`. Select its M metrics. If `TESTING.md` defines R1\u2013R6, apply R1\u2013R3 always and R4\u2013R6 where the family needs them.\n3. Write one `TEST_F` on `float` per property. Assert each against an independent reference: closed form,\n   hand calculation, a cited golden vector or a different method. Use `EXPECT_NEAR` with `math::Tolerance<float>()`.\n4. Add a new test file to `<root>\/<domain>\/test\/CMakeLists.txt`.\n5. Run the *Build* commands. Fix until build and tests pass.\n6. Check the per-algorithm checklist in `TESTING.md`, if it has one. Coverage must be \u2265 90 %; an uncovered branch\n   usually means a missing unhappy-flow test.\n7. Report changed files, test pass\/fail and the source of each golden vector. Put the sources in the report, not in the test file.\n\n## Rules\n\n- Never assert the implementation against its own output.\n- One behaviour per test. No test per parameter permutation.\n- Seeded random generators only.\n","use_cases":["Add unit tests for a new algorithm in the numerical toolbox","Extend existing tests for a robotics algorithm","Validate a neural network algorithm against defined robustness dimensions"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/embedded-pro\/embedded-agent-kit\/blob\/25b3baf222edcd427aa6cfbbc1429151ddd5bb33\/skills\/unit-tester\/SKILL.md","source_commit":"25b3baf222edcd427aa6cfbbc1429151ddd5bb33","license":null,"version":null,"listing_approved_at":"2026-12-02","created_at":"2026-11-30T09:04:10.000000Z","updated_at":"2026-12-02T09:15:52.000000Z","seo_title":"Unit Tester for Algorithm Validation","seo_description":"Write unit tests for algorithms using metric families and robustness dimensions defined in TESTING.md. Ensure tests are behavior-focused and use seeded random generators.","seo_keywords":["unit testing","algorithm validation","metric-driven testing","software development","test automation"]}}