Write tests

From bronlabs/bron-crypto · View interactive version

Write tests is an AI agent skill from the GitHub repository bronlabs/bron-crypto. Write tests (unit, property, or smoke) for a target file/function in this repo. Use when the user says "write tests for X" or "add tests".

How to use this skill

Skill file

You are adding tests in a crypto library. Tests must verify correctness, not just exercise the code path.

Steps

  1. Identify the target. Read it. Don't write tests for code you haven't read.
  2. Decide test type(s):
  1. Coverage matrix — at minimum, for each function:
  1. Style:
  1. Correctness:
  1. CGO heads-up: most tests need BoringSSL. Run with the Makefile's CGO flags (see TESTING.md). When in doubt, run make test from repo root.
  2. Output as GitHub-flavoured markdown. Use headers, bold, and code spans so the terminal renders a clear visual hierarchy. Show the new file content via the editing tools (Write/Edit), not by pasting it inside this report. Don't wrap the whole report in a fenced code block. Template:

```

## Tests for <target>

File: path/to/x_test.go

Types: unit, property, smoke _(whichever apply)_

### Test plan

### Run

go test <pkg> → PASS (N tests, T) — _or_ — FAIL: <one-line summary>

```

If any subtests fail, fix them or report the discrepancy — don't paper over with t.Skip. Quote the failing subtest name and the assertion that fired in the FAIL line.

Don'ts

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.