blob: b94144e3c3e6967a72c6dffea00b50053a666602 [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.incrementSetter = async () =>
{
let program = `
struct Foo {
int z;
int w;
}
int bar() {
Foo foo;
foo.z = 3;
foo.w = 1;
int value = foo.w++;
return value*100 + foo.z*10 + foo.w;
}
`;
assert_equals(await callIntFunction(program, "bar", []), 100 + 30 + 2);
}
runTests(whlslTests);
</script>
</html>