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

Side by Side Diff: pkg/unittest/test/matchers_test.dart

Issue 14173003: Remove Collection, Collections and clean up List/Set/Queue implementations of retain/remove. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « pkg/unittest/lib/src/iterable_matchers.dart ('k') | pkg/yaml/lib/parser.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library unittestTests; 5 library unittestTests;
6 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 part 'test_utils.dart'; 9 part 'test_utils.dart';
10 10
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 shouldFail(e, isEmpty, "Expected: empty but: was <[1]>."); 454 shouldFail(e, isEmpty, "Expected: empty but: was <[1]>.");
455 }); 455 });
456 456
457 test('contains', () { 457 test('contains', () {
458 var d = new SimpleIterable(3); 458 var d = new SimpleIterable(3);
459 shouldPass(d, contains(2)); 459 shouldPass(d, contains(2));
460 shouldFail(d, contains(5), "Expected: contains <5> but: was <[3]>."); 460 shouldFail(d, contains(5), "Expected: contains <5> but: was <[3]>.");
461 }); 461 });
462 }); 462 });
463 463
464 group('Collection Matchers', () { 464 group('Iterable Matchers', () {
465 465
466 test('isEmpty', () { 466 test('isEmpty', () {
467 shouldPass([], isEmpty); 467 shouldPass([], isEmpty);
468 shouldFail([1], isEmpty, "Expected: empty but: was <[1]>."); 468 shouldFail([1], isEmpty, "Expected: empty but: was <[1]>.");
469 }); 469 });
470 470
471 test('contains', () { 471 test('contains', () {
472 var d = [1, 2]; 472 var d = [1, 2];
473 shouldPass(d, contains(1)); 473 shouldPass(d, contains(1));
474 shouldFail(d, contains(0), "Expected: contains <0> but: was <[1, 2]>."); 474 shouldFail(d, contains(0), "Expected: contains <0> but: was <[1, 2]>.");
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 var w = new Widget(); 703 var w = new Widget();
704 w.price = 10; 704 w.price = 10;
705 shouldPass(w, new HasPrice(greaterThan(0))); 705 shouldPass(w, new HasPrice(greaterThan(0)));
706 shouldFail(w, new HasPrice(greaterThan(10)), 706 shouldFail(w, new HasPrice(greaterThan(10)),
707 'Expected: Widget with a price that is a value greater than <10> ' 707 'Expected: Widget with a price that is a value greater than <10> '
708 'but: price was <10>.'); 708 'but: price was <10>.');
709 }); 709 });
710 }); 710 });
711 } 711 }
712 712
OLDNEW
« no previous file with comments | « pkg/unittest/lib/src/iterable_matchers.dart ('k') | pkg/yaml/lib/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698