Add a runtime-disabled dialog element skeleton
[WebKit-https.git] / LayoutTests / webgpu / whlsl-type-mismatch.html
1 <!DOCTYPE html>
2 <html>
3 <meta charset=utf-8>
4 <meta name="timeout" content="long">
5 <title>Test the WHLSL test harness.</title>
6 <script src="js/whlsl-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
12 const whlslTests = {};
13
14 whlslTests.typeMismatchReturn = async () =>
15 {
16     await checkFail(
17         `
18             int foo()
19             {
20                 return 10.5;
21             }
22         `);
23 }
24
25 whlslTests.typeMismatchVariableDecl = async () =>
26 {
27     await checkFail(
28         `
29             void foo(uint x)
30             {
31                 int y = x;
32             }
33         `);
34 }
35
36 whlslTests.typeMismatchAssignment = async () =>
37 {
38     await checkFail(
39         `
40             void foo(uint x)
41             {
42                 int y;
43                 y = x;
44             }
45         `);
46 }
47
48 whlslTests.typeMismatchReturnParam = async () =>
49 {
50     await checkFail(
51         `
52             int foo(uint x)
53             {
54                 return x;
55             }
56         `);
57 }
58
59 runTests(whlslTests);
60
61 </script>
62 </html>