| 1 |
// Copyright 2009 the Sputnik authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
info: | |
| 6 |
Only Function objects implement [[HasInstance]] and can be proper |
| 7 |
ShiftExpression for the "instanceof" operator consequently |
| 8 |
es5id: 11.8.6_A6_T2 |
| 9 |
description: Checking Math case |
| 10 |
---*/ |
| 11 |
|
| 12 |
//CHECK#1 |
| 13 |
try{ |
| 14 |
1 instanceof Math; |
| 15 |
$ERROR('#1: 1 instanceof Math throw TypeError'); |
| 16 |
} |
| 17 |
catch(e){ |
| 18 |
if (e instanceof TypeError !== true) { |
| 19 |
$ERROR('#1: 1 instanceof Math throw TypeError'); |
| 20 |
} |
| 21 |
} |