From d13a52a037243090fe907bee68184bc58082b17d Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Wed, 1 Nov 2023 22:50:56 -0700 Subject: [PATCH] Restore missing test path validation (#3129) * Restore missing test path validation This fixes tools/validate so it actually does all the validation it was supposed to do. Also deduplicates recently-introduced (benign) duplicate subcases that it would have caught. Accidentally regressed in #2770. * Fix duplicate in unittest --- src/common/tools/crawl.ts | 2 ++ src/unittests/floating_point.spec.ts | 8 -------- .../operation/vertex_state/correctness.spec.ts | 18 ++++++++---------- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/common/tools/crawl.ts b/src/common/tools/crawl.ts index cb1e5f6fc737..9e060f485903 100644 --- a/src/common/tools/crawl.ts +++ b/src/common/tools/crawl.ts @@ -83,6 +83,8 @@ export async function crawl(suiteDir: string, validate: boolean): Promise { + .expand('offsetVariant', function* (p) { const formatInfo = kVertexFormatInfo[p.format]; const formatSize = formatInfo.byteSize; - return [ - { mult: 0, add: 0 }, - { mult: 0, add: formatSize }, - { mult: 0, add: 4 }, - { mult: 0.5, add: 0 }, - { mult: 1, add: -formatSize * 2 }, - { mult: 1, add: -formatSize - 4 }, - { mult: 1, add: -formatSize }, - ]; + yield { mult: 0, add: 0 }; + yield { mult: 0, add: 4 }; + if (formatSize !== 4) yield { mult: 0, add: formatSize }; + yield { mult: 0.5, add: 0 }; + yield { mult: 1, add: -formatSize * 2 }; + if (formatSize !== 4) yield { mult: 1, add: -formatSize - 4 }; + yield { mult: 1, add: -formatSize }; }) ) .fn(t => {