sbarati@apple.com | 2f75cb7 | 2019-07-11 00:59:10 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <meta charset=utf-8> |
| 4 | <meta name="timeout" content="long"> |
| 5 | <title>Copying.</title> |
mmaxfield@apple.com | 87064d8 | 2019-07-17 19:37:56 +0000 | [diff] [blame] | 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> |
sbarati@apple.com | 2f75cb7 | 2019-07-11 00:59:10 +0000 | [diff] [blame] | 10 | <script> |
| 11 | const whlslTests = {}; |
| 12 | |
| 13 | whlslTests.doubleNot = async () => |
| 14 | { |
| 15 | let program = ` |
| 16 | bool foo(bool x) |
| 17 | { |
| 18 | return !!x; |
| 19 | } |
| 20 | `; |
| 21 | assert_equals(await callBoolFunction(program, "foo", [makeBool(true)]), true); |
| 22 | assert_equals(await callBoolFunction(program, "foo", [makeBool(false)]), false); |
| 23 | } |
| 24 | |
| 25 | runTests(whlslTests); |
| 26 | </script> |
| 27 | </html> |