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
|
const tests = [
() => evalStencil(1),
() => evalStencil({}),
() => evalStencil([]),
() => evalStencilXDR(1),
() => evalStencilXDR({}),
() => evalStencilXDR([]),
() => instantiateModuleStencil(1),
() => instantiateModuleStencil({}),
() => instantiateModuleStencil([]),
() => instantiateModuleStencilXDR(1),
() => instantiateModuleStencilXDR({}),
() => instantiateModuleStencilXDR([]),
];
for (const test of tests) {
let caught = false;
try {
test();
} catch (e) {
assertEq(/Stencil( XDR)? object expected/.test(e.message), true);
caught = true;
}
assertEq(caught, true);
}
|