blob: c1728943c158675bcbd157e05a7c8c044c4aee02 [file] [log] [blame]
<!DOCTYPE html>
<html>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Test prefix/postfix.</title>
<script src="js/test-harness.js"></script>
<script src="../js/webgpu-functions.js"></script>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
const whlslTests = {};
whlslTests.switchBreak = async () =>
{
let program = `
struct Foo { int x; }
enum Bar { x = 42, y = 0 }
int f() {
Foo Bar;
return int(Bar.x);
}
`;
assert_equals(await callIntFunction(program, "f", []), 0);
}
whlslTests.unknownVariableInDotExpression = async () => {
await checkFail(
`
void foo() {
int a = variable.x;
}
`);
}
runTests(whlslTests);
</script>
</html>