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

Unified Diff: tests/language/compound_assignment_operator_test.dart

Issue 10283003: - Fix another side effect issue: never add AstNode to sequence unless they are a statement. Added t… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/compound_assignment_operator_test.dart
===================================================================
--- tests/language/compound_assignment_operator_test.dart (revision 7205)
+++ tests/language/compound_assignment_operator_test.dart (working copy)
@@ -22,6 +22,9 @@
class A {
get field() { result.add(1); return 1; }
set field(value) {}
+
+ static get static_field() { result.add(0); return 1; }
+ static set static_field(value) { result.add(1); }
}
@@ -66,13 +69,19 @@
sequence(obj().field += 1, middle(), obj().field += 1);
Expect.listEquals([0, 1, 2, 0, 1, 3], result);
+
+ result = [];
+ sequence(A.static_field++, middle(), A.static_field++);
+ Expect.listEquals([0, 1, 2, 0, 1, 3], result);
}
static void testMain() {
- testIndexed();
- testIndexedMore();
- testIndexedMoreMore();
+ for (int i = 0; i < 1000; i++) {
+ testIndexed();
+ testIndexedMore();
+ testIndexedMoreMore();
+ }
}
}
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698