blob: 21b2eeab120fedb42c071f879a4e7a4076055fa3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Test structs.</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.passNullToPtrMonomorphic = async () =>
{
let program = `
int foo(thread int* ptr)
{
return *ptr;
}
int bar()
{
return foo(null);
}
`;
assert_equals(await callIntFunction(program, "bar", []), 0);
}
runTests(whlslTests);
</script>
</html>