| 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: "CallExpression : MemberExpression Arguments uses GetValue" |
| 6 |
es5id: 11.2.3_A2 |
| 7 |
description: If GetBase(MemberExpression) is null, throw ReferenceError |
| 8 |
---*/ |
| 9 |
|
| 10 |
//CHECK#1 |
| 11 |
try { |
| 12 |
x(); |
| 13 |
$ERROR('#1.1: x() throw ReferenceError. Actual: ' + (x())); |
| 14 |
} |
| 15 |
catch (e) { |
| 16 |
if ((e instanceof ReferenceError) !== true) { |
| 17 |
$ERROR('#1.2: x() throw ReferenceError. Actual: ' + (e)); |
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
//CHECK#2 |
| 22 |
try { |
| 23 |
x(1,2,3); |
| 24 |
$ERROR('#2.1: x(1,2,3) throw ReferenceError. Actual: ' + (x(1,2,3))); |
| 25 |
} |
| 26 |
catch (e) { |
| 27 |
if ((e instanceof ReferenceError) !== true) { |
| 28 |
$ERROR('#2.2: x(1,2,3) throw ReferenceError. Actual: ' + (e)); |
| 29 |
} |
| 30 |
} |