tests/auto/qml/ecmascripttests/test262/test/language/expressions/await/syntax-await-has-UnaryExpression.js
raw| 1 | // Copyright 2016 Microsoft, Inc. All rights reserved. |
| 2 | // This code is governed by the BSD license found in the LICENSE file. |
| 3 | |
| 4 | /*--- |
| 5 | author: Brian Terlson <[email protected]> |
| 6 | esid: pending |
| 7 | description: > |
| 8 | Await's operand is a UnaryExpression |
| 9 | flags: [async] |
| 10 | ---*/ |
| 11 | |
| 12 | async function foo() { |
| 13 | let x = 1; |
| 14 | let y = await x++; |
| 15 | assert.sameValue(y, 1); |
| 16 | assert.sameValue(x, 2); |
| 17 | } |
| 18 | foo().then($DONE, $DONE); |