| <!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> |