| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:async'; |
| 6 |
| 5 import "package:expect/expect.dart"; | 7 import "package:expect/expect.dart"; |
| 6 import "package:async_helper/async_helper.dart"; | 8 import "package:async_helper/async_helper.dart"; |
| 7 | 9 |
| 8 // Test that local variable reads and writes are sequenced correctly with | 10 // Test that local variable reads and writes are sequenced correctly with |
| 9 // respect to reads and writes in an awaited Future. See issue 26175. | 11 // respect to reads and writes in an awaited Future. See issue 26175. |
| 10 | 12 |
| 11 // Reads are sequenced correctly with respect to writes in a Future. | 13 // Reads are sequenced correctly with respect to writes in a Future. |
| 12 Future test1() async { | 14 Future test1() async { |
| 13 var x = 'a'; | 15 var x = 'a'; |
| 14 f() async => x = 'b'; | 16 f() async => x = 'b'; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 asyncStart(); | 65 asyncStart(); |
| 64 test1() | 66 test1() |
| 65 .then(test2) | 67 .then(test2) |
| 66 .then(test3) | 68 .then(test3) |
| 67 .then(test4) | 69 .then(test4) |
| 68 .then(test5) | 70 .then(test5) |
| 69 .then(test6) | 71 .then(test6) |
| 70 .then(test7) | 72 .then(test7) |
| 71 .then((_) => asyncEnd()); | 73 .then((_) => asyncEnd()); |
| 72 } | 74 } |
| OLD | NEW |