[WHLSL] Move WHLSL tests to their own folder
[WebKit-https.git] / LayoutTests / webgpu / whlsl / recursive-structs.html
1 <!DOCTYPE html>
2 <html>
3 <meta charset=utf-8>
4 <meta name="timeout" content="long">
5 <title>Test loops.</title>
6 <script src="js/test-harness.js"></script>
7 <script src="../js/webgpu-functions.js"></script>
8 <script src="../../resources/testharness.js"></script>
9 <script src="../../resources/testharnessreport.js"></script>
10 <script>
11 const whlslTests = {};
12
13 whlslTests.mutuallyRecursiveStruct = async () =>
14 {
15     await checkFail(
16         `
17             struct Foo {
18                 Bar bar;
19             }
20             struct Bar {
21                 Foo foo;
22             }
23         `);
24         
25 }
26
27 // FIXME https://bugs.webkit.org/show_bug.cgi?id=199766: This should compile.
28 // whlslTests.mutuallyRecursiveStructWithPointersBroken = async () =>
29 // {
30 //     let program = `
31 //         struct Foo {
32 //             thread Bar* bar;
33 //             int foo;
34 //         }
35 //         struct Bar {
36 //             thread Foo* foo;
37 //             int bar;
38 //         }
39 //         int foo()
40 //         {
41 //             Foo foo;
42 //             Bar bar;
43 //             foo.foo = 564;
44 //             bar.bar = 53;
45 //             return foo.bar->bar - bar.foo->foo;
46 //         }
47 //     `;
48 //     assert_equals(await callIntFunction(program, "foo", []), 0);
49 // }
50
51 runTests(whlslTests);
52 </script>
53 </html>
54