Files
bible/rules/patterns/testing-policy/README.md
Michael Chus 0005f3e41a Compress always-on contracts and restore pagination fields
The always-on set is paid by every session, so it gets the tightest
form: git-sync-check shrinks to its procedural core, testing-policy
moves the table-test example to README.md and folds the agent
instructions into the rules, go-code-style inlines the error-wrapping
example. Per-session read cost drops from 403 to 336 lines.

Also restore the pagination response fields in table-management: the
previous dedup replaced them with a reference to go-api, which the
table router line does not load.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 10:05:00 +03:00

27 lines
607 B
Markdown

# Testing Policy Pattern Notes
This file keeps examples. The normative rules live in `contract.md`.
## Табличный тест
```go
func TestParseGPUSensor(t *testing.T) {
tests := []struct {
name string
xml string
want int
}{
{"normal", `<VALUE>290</VALUE>`, 29},
{"zero", `<VALUE>0</VALUE>`, 0},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := parseGPUTemp(tt.xml)
if got != tt.want {
t.Fatalf("got %d, want %d", got, tt.want)
}
})
}
}
```