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

Side by Side Diff: tests/language/cascade_precedence_test.dart

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add deprecation comment for ExpectException and revert one test. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/language/cascade_in_initializer_list_test.dart ('k') | tests/language/cascade_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 "package:expect/expect.dart";
6
5 7
6 class A { 8 class A {
7 int value; 9 int value;
8 A(this.value); 10 A(this.value);
9 void set(int value) { this.value = value; } 11 void set(int value) { this.value = value; }
10 int get() => value; 12 int get() => value;
11 int operator[](int index) => value + index; 13 int operator[](int index) => value + index;
12 void operator[]=(int index, int newValue) { value += -index + newValue; } 14 void operator[]=(int index, int newValue) { value += -index + newValue; }
13 void test(int expected) { 15 void test(int expected) {
14 Expect.equals(expected, value); 16 Expect.equals(expected, value);
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // Should parse as: 130 // Should parse as:
129 // box = (box..x = (a.value == 21 ? b : c)..x.test(117)); 131 // box = (box..x = (a.value == 21 ? b : c)..x.test(117));
130 box = box..x = a.value == 21 ? b : c..x.test(117); 132 box = box..x = a.value == 21 ? b : c..x.test(117);
131 Expect.equals(originalBox, box); 133 Expect.equals(originalBox, box);
132 Expect.equals(box.value, b); 134 Expect.equals(box.value, b);
133 135
134 // New cascades are allowed inside an expressionWithoutCascade if properly 136 // New cascades are allowed inside an expressionWithoutCascade if properly
135 // delimited. 137 // delimited.
136 box..x = (a..set(42)..test(42))..x.test(42); 138 box..x = (a..set(42)..test(42))..x.test(42);
137 } 139 }
OLDNEW
« no previous file with comments | « tests/language/cascade_in_initializer_list_test.dart ('k') | tests/language/cascade_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698