blob: 4a079fa57d185c5adf268ce5d2dcffb144be32fd [file] [log] [blame]
<!DOCTYPE html>
<html>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Test the WHLSL test harness.</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.pointerIndexGetter = async () => {
await checkFail(
`
int operator[](device int*, uint)
{
return 543;
}
`);
await checkFail(
`
int operator[](thread int*, uint)
{
return 543;
}
`);
await checkFail(
`
int operator[](threadgroup int*, uint)
{
return 543;
}
`);
await checkFail(
`
int operator[](constant int*, uint)
{
return 543;
}
`);
}
whlslTests.pointerGetter = async () => {
await checkFail(
`
int operator.foo(device int*)
{
return 543;
}
`);
await checkFail(
`
int operator.foo(thread int*)
{
return 543;
}
`);
await checkFail(
`
int operator.foo(threadgroup int*)
{
return 543;
}
`);
await checkFail(
`
int operator.foo(constant int*)
{
return 543;
}
`);
}
runTests(whlslTests);
</script>
</html>