| <!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.commentParsing = async () => { |
| let program = ` |
| /* this comment |
| runs over multiple lines */ |
| bool foo() { return true; } |
| `; |
| assert_equals(await callBoolFunction(program, "foo", []), true); |
| |
| await checkFail( |
| ` |
| /* this comment |
| runs over multiple lines |
| bool foo() { return true; } |
| `); |
| } |
| |
| runTests(whlslTests); |
| </script> |
| </html> |
| |