blob: e2f5ecb41462958bd87599ccb85218c895e1f395 [file] [log] [blame]
<!DOCTYPE html>
<html>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Test override subscripts.</title>
<script src="js/whlsl-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>