mirror of
https://github.com/tc39/test262.git
synced 2025-09-27 12:08:43 +02:00
This change adds 'var' declarations for global variables to allow the tests to run in strict mode (see issue #35). Extra care was taken to ensure the changes do not alter the test behavior, for example when implicit creation of global variables are part of the test. Note: The change does not fix all strict mode errors due to missing 'var' declarations.
29 lines
896 B
JavaScript
29 lines
896 B
JavaScript
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
info: >
|
|
While evaluating "do Statement while ( Expression )", Statement is
|
|
evaluated first and only after it is done Expression is checked
|
|
es5id: 12.6.1_A2
|
|
description: Evaluating Statement with error Expression
|
|
includes: [Test262Error.js]
|
|
---*/
|
|
|
|
var __in__do;
|
|
|
|
try {
|
|
do __in__do = "reached"; while (abbracadabra);
|
|
$ERROR('#1: \'do __in__do = "reached"; while (abbracadabra)\' lead to throwing exception');
|
|
} catch (e) {
|
|
if (e instanceof Test262Error) throw e;
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//CHECK#1
|
|
if (__in__do !== "reached") {
|
|
$ERROR('#1.1: __in__do === "reached". Actual: __in__do ==='+ __in__do );
|
|
}
|
|
//
|
|
//////////////////////////////////////////////////////////////////////////////
|