Mike Pennisi 025b44f38c Refactor AssignmentExpression tests for parsers
A number of tests for the parsing of the AssignmentExpression production
were expressed using `eval`. This made the tests more complex than
necessary, and also prevented the tests from providing value to
ECMAScript parsers.

Remove the use of `eval` in the relevant tests and instead express the
expectations with literal source text. Remove superfluous "onlyStrict"
restriction from tests by declaring the probe binding prior to
assignment.
2017-12-10 15:59:11 -05:00

19 lines
376 B
JavaScript

// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
White Space between LeftHandSideExpression and "=" or between "=" and
AssignmentExpression is allowed
es5id: 11.13.1_A1
---*/
var x;
x
=
true;
if (x !== true) {
$ERROR('#6: (x\\u000A=\\u000Atrue) === true');
}