| 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: If Type(x) is different from Type(y), return false |
| 6 |
es5id: 11.9.4_A8_T5 |
| 7 |
description: > |
| 8 |
Checking with such x and y that either x or y is primitive string |
| 9 |
and the other is primitive number |
| 10 |
---*/ |
| 11 |
|
| 12 |
//CHECK#1 |
| 13 |
try { |
| 14 |
throw 1; |
| 15 |
} catch(e) { |
| 16 |
if (e === "1") { |
| 17 |
$ERROR('#1: throw 1 !== "1"'); |
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
//CHECK#2 |
| 22 |
try { |
| 23 |
throw "1"; |
| 24 |
} catch(e) { |
| 25 |
if (1 === e) { |
| 26 |
$ERROR('#2: 1 !== throw "1"'); |
| 27 |
} |
| 28 |
} |