Add a runtime-disabled dialog element skeleton
[WebKit-https.git] / LayoutTests / webgpu / whlsl / copy.html
1 <!DOCTYPE html>
2 <html>
3 <meta charset=utf-8>
4 <meta name="timeout" content="long">
5 <title>Copying.</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.copyArray = async () =>
14 {
15     let program = `
16         int foo()
17         {
18             int[10] xs;
19             for (uint i = 0; i < xs.length; i++)
20                 xs[i] = int(i) + 1;
21             int[10] ys = xs;
22             for (uint i = 0; i < xs.length; i++)
23                 xs[i] = 0;
24             int sum = 0;
25             for (uint i = 0; i < ys.length; i++)
26                 sum = sum + ys[i];
27             return sum;
28         }
29     `;
30     assert_equals(await callIntFunction(program, "foo", []), 55);
31 }
32
33 runTests(whlslTests);
34 </script>
35 </html>