OLD | NEW |
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 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'dart:collection'; | 6 import 'dart:collection'; |
7 | 7 |
8 import 'package:unittest/unittest.dart'; | 8 import 'package:unittest/unittest.dart'; |
9 | 9 |
10 import 'test_utils.dart'; | 10 import 'test_utils.dart'; |
(...skipping 463 matching lines...) Loading... |
474 "Expected: equals [1] unordered " | 474 "Expected: equals [1] unordered " |
475 "Actual: [1, 2] " | 475 "Actual: [1, 2] " |
476 "Which: has too many elements (2 > 1)"); | 476 "Which: has too many elements (2 > 1)"); |
477 shouldFail(d, unorderedEquals([3, 2, 1]), | 477 shouldFail(d, unorderedEquals([3, 2, 1]), |
478 "Expected: equals [3, 2, 1] unordered " | 478 "Expected: equals [3, 2, 1] unordered " |
479 "Actual: [1, 2] " | 479 "Actual: [1, 2] " |
480 "Which: has too few elements (2 < 3)"); | 480 "Which: has too few elements (2 < 3)"); |
481 shouldFail(d, unorderedEquals([3, 1]), | 481 shouldFail(d, unorderedEquals([3, 1]), |
482 "Expected: equals [3, 1] unordered " | 482 "Expected: equals [3, 1] unordered " |
483 "Actual: [1, 2] " | 483 "Actual: [1, 2] " |
484 "Which: has no match for element <3> at index 0"); | 484 "Which: has no match for <3> at index 0"); |
485 }); | 485 }); |
486 | 486 |
487 test('unorderedMatchess', () { | 487 test('unorderedMatchess', () { |
488 var d = [1, 2]; | 488 var d = [1, 2]; |
489 shouldPass(d, unorderedMatches([2, 1])); | 489 shouldPass(d, unorderedMatches([2, 1])); |
490 shouldPass(d, unorderedMatches([greaterThan(1), greaterThan(0)])); | 490 shouldPass(d, unorderedMatches([greaterThan(1), greaterThan(0)])); |
491 shouldFail(d, unorderedMatches([greaterThan(0)]), | 491 shouldFail(d, unorderedMatches([greaterThan(0)]), |
492 "Expected: matches [a value greater than <0>] unordered " | 492 "Expected: matches [a value greater than <0>] unordered " |
493 "Actual: [1, 2] " | 493 "Actual: [1, 2] " |
494 "Which: has too many elements (2 > 1)"); | 494 "Which: has too many elements (2 > 1)"); |
(...skipping 284 matching lines...) Loading... |
779 | 779 |
780 X() { | 780 X() { |
781 print(foo); | 781 print(foo); |
782 } | 782 } |
783 } | 783 } |
784 | 784 |
785 abstract class Abstraction { | 785 abstract class Abstraction { |
786 void norealization(); | 786 void norealization(); |
787 } | 787 } |
788 | 788 |
OLD | NEW |