-
Notifications
You must be signed in to change notification settings - Fork 102
Description
The limits tests under webgpu:api,validation,capability_checks,limits,* generally pass in kMaximumLimitBaseParams or kMinimumLimitBaseParams as test case parameter. These parameters test the limit itself as "atDefault", "underDefault", "betweenDefaultAndMaximum", "atMaximum", "overMaximum"
The tests should be split.
-
1 test that tests the limit itself at:
"atDefault", "underDefault", "betweenDefaultAndMaximum", "atMaximum", "overMaximum"underDefaultshould get the defaultatDefaultshould get the defaultbetweenDefaultAndMaximumshould get what's requested, not more, not lessatMaximumshould get the maximumoverMaximumshould fail device creation
these cases are automatically tested by
LimitTest. But we should separate out that case
into its own test. Exampleg.test(`${limit}`) .desc(`Test ${limit} at various values`) .params('limitTest', kMaximumLimitValueTests) .fn(async t => { const { limitTest } = t.params; const { defaultLimit, adapterLimit: maximumLimit } = t; await t.testDeviceWithRequestedMaximumLimits( limitTest, 'atLimit', async () => {} ); );
or something along those lines. A bigger refactor could simplify this test.
-
Other tests that test that the limit is correctly applied (validation) and supported (operation).
These other tests, there's no reason to test
overMaximumin these cases as that should always fail device creation which would be tested by the first test above.underDefaultalso irrelevant as it would be the same asatDefault, so remove those fromkMaximumLimitBaseParamsandkMinimumLimitValueTests