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

Side by Side Diff: test/priority_queue_test.dart

Issue 1831103004: Fix strong mode warnings. (Closed) Base URL: git@github.com:dart-lang/collection@master
Patch Set: pubspec/changelog Created 4 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) 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 4
5 /// Tests priority queue implementations utilities. 5 /// Tests priority queue implementations utilities.
6 6
7 import "package:test/test.dart"; 7 import "package:test/test.dart";
8 8
9 import "package:collection/priority_queue.dart"; 9 import "package:collection/src/priority_queue.dart";
10 10
11 void main() { 11 void main() {
12 testDefault(); 12 testDefault();
13 testInt(() => new HeapPriorityQueue<int>()); 13 testInt(() => new HeapPriorityQueue<int>());
14 testCustom((comparator) => new HeapPriorityQueue<C>(comparator)); 14 testCustom((comparator) => new HeapPriorityQueue<C>(comparator));
15 } 15 }
16 16
17 void testDefault() { 17 void testDefault() {
18 test('new PriorityQueue() returns a HeapPriorityQueue', () { 18 test('new PriorityQueue() returns a HeapPriorityQueue', () {
19 expect(new PriorityQueue<int>(), 19 expect(new PriorityQueue<int>(),
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 int compareNeg(C c1, C c2) => c2.value - c1.value; 166 int compareNeg(C c1, C c2) => c2.value - c1.value;
167 167
168 class C implements Comparable { 168 class C implements Comparable {
169 final int value; 169 final int value;
170 const C(this.value); 170 const C(this.value);
171 int get hashCode => value; 171 int get hashCode => value;
172 bool operator==(Object other) => other is C && value == other.value; 172 bool operator==(Object other) => other is C && value == other.value;
173 int compareTo(C other) => value - other.value; 173 int compareTo(C other) => value - other.value;
174 String toString() => "C($value)"; 174 String toString() => "C($value)";
175 } 175 }
OLDNEW
« lib/src/algorithms.dart ('K') | « pubspec.yaml ('k') | test/wrapper_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698