Commit 78faff6
Zheng Te
test(cgc): cover the hardware-free half of
72 tests over the parts of the command that need no GPU: the MLIR pattern
parser and its five-kind classifier, the PE export reader and redist
acceptance including the SDK 720 floor, candidate generation and ordering,
adapter selection, the flag rules, and the metadata writer.
Expectations are computed from generated inputs rather than transcribed from a
run. MLIR sources are assembled from a chosen number of patterns and `any_of`
branches and the expected counts fall out of those parameters, so the test
states the relationship (rules == sum of branches) rather than a number someone
observed once. Redists are synthesized PE32+ images built around a chosen
`D3D12SDKVersion`, which the parser then reads back -- that makes the SDK floor,
the architecture check, the missing-export path and the not-a-PE path all
testable on any machine, with no Agility SDK present.
Two properties worth calling out because they are what the command is for:
- The classifier is exercised with every pattern named after a *different* kind
than its body declares, proving the kind is read from the body and not the
name.
- `apply_native_constraint "cgc_is_any_of"` is injected into an otherwise
unchanged pattern and asserted not to change the rule count, pinning the
distinction between an op-family whitelist and a real `any_of` multiplier.
The DXCore and D3D12 exchange paths still need real hardware and remain covered
only by manual runs.
Claude-Session: https://claude.ai/code/session_01AUbPTmiBrAd6G1MFudgbknwinml cgc adapter
1 parent 28c485a commit 78faff6
1 file changed
Lines changed: 578 additions & 0 deletions
0 commit comments