summaryrefslogtreecommitdiffstats
path: root/dom/webgpu/tests/cts/checkout/src/unittests/basic.spec.ts
blob: f80444f03b38c655d5c550d91c6755cdb9bd4890 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
export const description = `
Basic unit tests for test framework.
`;

import { makeTestGroup } from '../common/framework/test_group.js';

import { UnitTest } from './unit_test.js';

export const g = makeTestGroup(UnitTest);

g.test('test,sync').fn(t => {});

g.test('test,async').fn(async t => {});

g.test('test_with_params,sync')
  .paramsSimple([{}])
  .fn(t => {
    t.debug(JSON.stringify(t.params));
  });

g.test('test_with_params,async')
  .paramsSimple([{}])
  .fn(async t => {
    t.debug(JSON.stringify(t.params));
  });

g.test('test_with_params,private_params')
  .paramsSimple([
    { a: 1, b: 2, _result: 3 }, //
    { a: 4, b: -3, _result: 1 },
  ])
  .fn(t => {
    const { a, b, _result } = t.params;
    t.expect(a + b === _result);
  });