blob: 67b37467a027000d0a2e12fea02585b8bbb5c470 [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 = {};
const epsilon = 0.0001;
whlslTests.vectorIndexLoad = async () => {
const program = `
int foo() {
int2 x;
x.x = 20;
x.y = 10;
x[5000] = 40;
return x[0] / x[1] + x[5000];
}
`;
assert_equals(await callIntFunction(program, "foo", []), 40/10 + 40);
};
runTests(whlslTests);
</script>
</html>