blob: 837dfe8dc23b7bf65ccae89bb87ab8fef9f95f77 [file] [log] [blame]
<!DOCTYPE html>
<html>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Test loops.</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.mutuallyRecursiveStruct = async () =>
{
await checkFail(
`
struct Foo {
Bar bar;
}
struct Bar {
Foo foo;
}
`);
}
// FIXME https://bugs.webkit.org/show_bug.cgi?id=199766: This should compile.
// whlslTests.mutuallyRecursiveStructWithPointersBroken = async () =>
// {
// let program = `
// struct Foo {
// thread Bar* bar;
// int foo;
// }
// struct Bar {
// thread Foo* foo;
// int bar;
// }
// int foo()
// {
// Foo foo;
// Bar bar;
// foo.foo = 564;
// bar.bar = 53;
// return foo.bar->bar - bar.foo->foo;
// }
// `;
// assert_equals(await callIntFunction(program, "foo", []), 0);
// }
runTests(whlslTests);
</script>
</html>