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

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

Issue 13724021: Remove deprecated Expect from the libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Rebase. 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Test efficient and correct implementation of !identical(a, b). 4 // Test efficient and correct implementation of !identical(a, b).
5 5
6 import 'package:expect/expect.dart';
7
6 notIdenticalTest1(a) { 8 notIdenticalTest1(a) {
7 if (!identical("ho", a)) { 9 if (!identical("ho", a)) {
8 return 2; 10 return 2;
9 } else { 11 } else {
10 return 1; 12 return 1;
11 } 13 }
12 } 14 }
13 15
14 notIdenticalTest2(a) { 16 notIdenticalTest2(a) {
15 var x = identical("ho", a); 17 var x = identical("ho", a);
(...skipping 11 matching lines...) Expand all
27 return !x; 29 return !x;
28 } 30 }
29 31
30 main() { 32 main() {
31 for (int i = 0; i < 10000; i++) { 33 for (int i = 0; i < 10000; i++) {
32 Expect.equals(1, notIdenticalTest1("ho")); 34 Expect.equals(1, notIdenticalTest1("ho"));
33 Expect.equals(1, notIdenticalTest2("ho")); 35 Expect.equals(1, notIdenticalTest2("ho"));
34 Expect.equals(false, notIdenticalTest3("ho")); 36 Expect.equals(false, notIdenticalTest3("ho"));
35 } 37 }
36 } 38 }
OLDNEW
« no previous file with comments | « tests/language/getter_setter_order_test.dart ('k') | tests/language/inline_super_field_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698