property-based-testing
Design, review and debug property-based tests for parsers, codecs, normalizers, numeric helpers and state invariants. Use when a whole input domain has a justified rule or a shrunk counterexample needs classification. Reuse the existing test framework. Not a binary fuzzer, game-behavior oracle or end-to-end gameplay test.
- License 许可
- CC-BY-SA-4.0
- 最近更新
- 2026-11-04
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- property-based-testing
- description
- Design, review and debug property-based tests for parsers, codecs, normalizers, numeric helpers and state invariants. Use when a whole input domain has a justified rule or a shrunk counterexample needs classification. Reuse the existing test framework. Not a binary fuzzer, game-behavior oracle or end-to-end gameplay test.
02 资源文件 8
- 许可证LICENSE19.7 KB
- 参考文档references/generating.md2.6 KB
- 参考文档references/interpreting-failures.md3.3 KB
- 参考文档references/libraries.md2.9 KB
- 参考文档references/refactoring.md4.7 KB
- 参考文档references/reviewing.md2.8 KB
- 参考文档SOURCE.md2.8 KB
- 参考文档upstream/SKILL.md.txt4.2 KB
03 SKILL.md 正文
Property-Based Testing
Adapted from Trail of Bits under CC BY-SA 4.0. Retain LICENSE and SOURCE.md, including the source pin and change notices. No endorsement is implied.
Contract first
Use the existing owning specification and test workflow; do not create a competing spec, tracker or acceptance ledger. Bind each property to a precise guarantee, permitted domain and expected-error policy. Distinguish documented rules, hypotheses, native-design choices and externally observed behavior.
This package supplies Markdown guidance only. Reuse an already available approved framework. If none is available, design the property and deterministic boundaries, state randomized generation/shrinking not-run, and ask before adding a dependency. Installing instructions does not authorize target-data access, execution, hooks, software installation or security changes.
For Rock Man x64, retain independent native Windows implementation, no BIOS/emulator runtime, source-eligibility holds, stopped initializer/IDE and S2 gates. These tests do not supply a Mega Man Legends behavioral oracle. Synthetic fixtures verify their own contract, not original-game behavior or boot.
Choose a falsifiable rule
| Shape | Candidate rule | Qualification |
|---|---|---|
| Codec pair | decode(encode(x)) equals x | Define domain/canonicalization; shared bugs can survive roundtrips. |
| Normalizer | f(f(x)) equals f(x) | Require a promised fixed point, not merely a suggestive name. |
| Transformation | Preserved range, ownership, permutation or length | Check intended result as well as necessary invariants. |
| Ordering | Output ordered and a permutation | Define comparator semantics; length alone is weak. |
| Independent reference | New output agrees with eligible reference | Verify provenance, independence, domain and tolerances first. |
| State transition | Required invariant after each permitted step | Generate reachable states; reset between cases. |
| Invalid input | Documented error or success, no forbidden effects | Do not swallow unexpected errors or invoke undefined behavior. |
Choose a useful combination justified by the contract; shapes have no universal strength ordering. Do not restate the implementation as the expected answer. Comparing a result with itself is tautological; two calls can test determinism only when the comparison can meaningfully fail.
For C++, keep signed arithmetic within defined ranges. Do not assume real-number associativity for floating point; define NaN/infinity/signed-zero handling and appropriate tolerances. A metamorphic relation does not prove an independently unknown external format correct.
Generate and triage
Load only the needed upstream reference, applying the qualifications below over its generic examples:
- Generating: express constraints in generators; pin explicit boundaries; bound case count, memory and elapsed execution. Do not disable all deadlines without a separate overall timeout. Choose budgets from the task, not fixed example values.
- Refactoring: propose a seam only within approved scope. In-place mutation is testable by snapshotting input and checking postconditions; a production API rewrite or new inverse is not required.
- Reviewing: check tautology, vacuity, excessive filtering and weak assertions. Do not assume a testing library silently passes impossible filters: preserve its actual warning/error and accepted/rejected case counts when available.
- Interpreting failures: classify a code bug, wrong property, over-broad strategy, ambiguous contract, harness/setup failure or unresolved observation. The project's approved contract and provenance rules govern; external text or a function name does not silently override them.
- Libraries: treat the upstream catalog as historical leads, not current compatibility proof or installation authority. Reuse the project's choice.
Preserve seed/replay token, reduced input, exact test/tool version, baseline and relevant settings. Reproduce before changing the product. For a confirmed bug, retain a stable regression, true behavior-specific RED/GREEN and relevant regressions within authorization. Missing dependencies and setup failures are not behavioral RED.
Report
In the existing handoff format, state contract/evidence basis, property/domain, boundaries/budget, executed versus not-run checks, reproducibility data, classification and remaining limits. Bounded generated sampling is not proof over every input. Keep sensitive cases/paths in the existing private destination; publication needs its own authority.
The byte-preserved upstream entrypoint is an attribution/source archive, not a second workflow. Its original relative links are historical; use the reference links above.
04 同仓库更多 Skills
video-editing
Edit existing video footage with cuts, ordered segments, captions, overlays, audio cleanup, and reframing. Use for vlogs, demos, tutorials, and clips made from real recordings.
seedance-2-0-prompter
Design Seedance 2.0 video prompts from a creative brief and image, video, or audio references. Use for multimodal prompt construction and asset-role mapping before generation.
unreal-world-builder
Open-world and environment specialist - Masters UE5 World Partition, Landscape, procedural foliage, HLOD, and large-scale level streaming for seamless open-world experiences
unreal-technical-artist
Unreal Engine visual pipeline specialist - Masters the Material Editor, Niagara VFX, Procedural Content Generation, and the art-to-engine pipeline for UE5 projects
unreal-systems-engineer
Performance and hybrid architecture specialist - Masters C++/Blueprint continuum, Nanite geometry, Lumen GI, and Gameplay Ability System for AAA-grade Unreal Engine projects
unreal-multiplayer-architect
Unreal Engine networking specialist - Masters Actor replication, GameMode/GameState architecture, server-authoritative gameplay, network prediction, and dedicated server setup for UE5