Ben Murdoch | 014dc51 | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 1 | // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // Flags: --expose-wasm |
| 6 | |
| 7 | function Foo() { } |
| 8 | |
| 9 | assertThrows(function() { _WASMEXP_.verifyFunction(); }) |
| 10 | assertThrows(function() { _WASMEXP_.verifyFunction(0); }) |
| 11 | assertThrows(function() { _WASMEXP_.verifyFunction("s"); }) |
| 12 | assertThrows(function() { _WASMEXP_.verifyFunction(undefined); }) |
| 13 | assertThrows(function() { _WASMEXP_.verifyFunction(1.1); }) |
| 14 | assertThrows(function() { _WASMEXP_.verifyFunction(1/0); }) |
| 15 | assertThrows(function() { _WASMEXP_.verifyFunction(null); }) |
| 16 | assertThrows(function() { _WASMEXP_.verifyFunction(new Foo()); }) |
| 17 | assertThrows(function() { _WASMEXP_.verifyFunction(new ArrayBuffer(0)); }) |
| 18 | assertThrows(function() { _WASMEXP_.verifyFunction(new ArrayBuffer(140000)); }) |