Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: tests/language_strong/syncstar_yield_test.dart

Issue 2765693002: Update all tests (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // TODO(jmesserly): this is a copy of the language test of the same name, 5 // TODO(jmesserly): this is a copy of the language test of the same name,
6 // we can remove this copy when we're running against those tests. 6 // we can remove this copy when we're running against those tests.
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 8
9 Iterable<int> foo1() sync* { 9 Iterable<int> foo1() sync* {
10 yield 1; 10 yield 1;
(...skipping 24 matching lines...) Expand all
35 p++; 35 p++;
36 yield p + i; 36 yield p + i;
37 } 37 }
38 38
39 main() { 39 main() {
40 Expect.listEquals([1], foo1().toList()); 40 Expect.listEquals([1], foo1().toList());
41 Expect.listEquals([null, -1, 0, 1, 2, 3, 0, 1, 2, 3], 41 Expect.listEquals([null, -1, 0, 1, 2, 3, 0, 1, 2, 3],
42 foo2(4).take(10).toList()); 42 foo2(4).take(10).toList());
43 Iterable t = foo3(0); 43 Iterable t = foo3(0);
44 Iterator it1 = t.iterator; 44 Iterator it1 = t.iterator;
45 Iterator it2 = t.iterator; /// copyParameters: ok 45 Iterator it2 = t.iterator; //# copyParameters: ok
46 it1.moveNext(); 46 it1.moveNext();
47 it2.moveNext(); /// copyParameters: continued 47 it2.moveNext(); //# copyParameters: continued
48 Expect.equals(2, it1.current); 48 Expect.equals(2, it1.current);
49 // TODO(sigurdm): Check up on the spec here. 49 // TODO(sigurdm): Check up on the spec here.
50 Expect.equals(2, it2.current); /// copyParameters: continued 50 Expect.equals(2, it2.current); //# copyParameters: continued
51 Expect.isFalse(it1.moveNext()); 51 Expect.isFalse(it1.moveNext());
52 // Test that two `moveNext()` calls are fine. 52 // Test that two `moveNext()` calls are fine.
53 Expect.isFalse(it1.moveNext()); 53 Expect.isFalse(it1.moveNext());
54 Expect.isFalse(it2.moveNext()); /// copyParameters: continued 54 Expect.isFalse(it2.moveNext()); //# copyParameters: continued
55 Expect.isFalse(it2.moveNext()); /// copyParameters: continued 55 Expect.isFalse(it2.moveNext()); //# copyParameters: continued
56 } 56 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698