blob: 2109b7243cae42d9ee6534fc88d21b92b9b10891 [file] [log] [blame]
<!DOCTYPE html>
<html>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Test override subscripts.</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.plusEquals = async () =>
{
let program = `
int foo(int x)
{
x += 42;
return x;
}
`;
assert_equals(await callIntFunction(program, "foo", [makeInt(385)]), 385 + 42);
}
whlslTests.plusEqualsResult = async () =>
{
let program = `
int foo(int x)
{
return x += 42;
}
`;
assert_equals(await callIntFunction(program, "foo", [makeInt(385)]), 385 + 42);
}
runTests(whlslTests);
</script>
</html>