blob: 58a5d03352d8e350b3c69417eac33cab9b1ff7fb [file] [log] [blame]
<!DOCTYPE html>
<html>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>null.</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.nullIsError = async () =>
{
await checkFail(`
int foo(thread int* ptr)
{
return *ptr;
}
int bar()
{
return foo(null);
}
`);
await checkFail(`
void bar()
{
thread int* x;
}
`);
await checkFail(`
void bar()
{
thread int[] x;
}
`);
}
runTests(whlslTests);
</script>
</html>