blob: 0cf27a33eb7c62220e898e26a1b1e5b9e92f1b45 [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/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>