Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| TestStatus | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Phpdftk\WptHarness; |
| 6 | |
| 7 | /** |
| 8 | * Per-test result status in the WPT harness ledger. |
| 9 | * |
| 10 | * Each WPT test runs through the harness and lands in exactly one of |
| 11 | * these buckets per harness run. Only `Pass` and `Fail` count toward |
| 12 | * the in-scope pass rate; `OutOfScope`, `PendingSubstrate`, and |
| 13 | * `Skipped` are excluded from the denominator (see |
| 14 | * `docs/spec/out-of-scope.md` for the contract). |
| 15 | * |
| 16 | * Phase 4A.4 wires this enum into the {@see Manifest} classifier. |
| 17 | */ |
| 18 | enum TestStatus: string |
| 19 | { |
| 20 | /** |
| 21 | * Visual diff against the WPT reference passed within tolerance. |
| 22 | * Counts toward the in-scope pass rate. |
| 23 | */ |
| 24 | case Pass = 'pass'; |
| 25 | |
| 26 | /** |
| 27 | * Visual diff exceeded tolerance, or the renderer crashed on the |
| 28 | * input. Counts as a failure in the in-scope rate. |
| 29 | */ |
| 30 | case Fail = 'fail'; |
| 31 | |
| 32 | /** |
| 33 | * Test exercises a surface listed in the out-of-scope ledger |
| 34 | * (`docs/spec/out-of-scope.md`). Skipped at runtime; excluded |
| 35 | * from both numerator and denominator of the pass rate. |
| 36 | */ |
| 37 | case OutOfScope = 'out-of-scope'; |
| 38 | |
| 39 | /** |
| 40 | * Test exercises a feature whose Phase 4 substrate (4C raster, |
| 41 | * 4D text shaping, 4E color engine, 4F resource loader, 4G paged |
| 42 | * media) hasn't landed yet. Excluded from the pass rate but |
| 43 | * reported separately so the dashboard can show "N tests blocked |
| 44 | * on 4C". |
| 45 | */ |
| 46 | case PendingSubstrate = 'pending-substrate'; |
| 47 | |
| 48 | /** |
| 49 | * Test is in-scope but the harness can't yet execute it |
| 50 | * (unsupported WPT test type, missing reference image, etc.). |
| 51 | * Excluded from the pass rate; tracked as a harness gap. |
| 52 | */ |
| 53 | case Skipped = 'skipped'; |
| 54 | |
| 55 | /** |
| 56 | * Test crashed the harness itself (not the renderer). Counts as |
| 57 | * a harness bug, not a renderer failure. |
| 58 | */ |
| 59 | case HarnessError = 'harness-error'; |
| 60 | } |