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

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

Issue 22284003: pkg: analysis aided cleanup (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits Created 7 years, 4 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) 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';
6 import 'dart:collection';
7
8 import 'package:unittest/unittest.dart'; 5 import 'package:unittest/unittest.dart';
9 import 'package:unittest/mirror_matchers.dart'; 6 import 'package:unittest/mirror_matchers.dart';
10 7
11 import 'test_common.dart';
12 import 'test_utils.dart'; 8 import 'test_utils.dart';
13 9
14 void main() { 10 void main() {
15 11
16 initUtils(); 12 initUtils();
17 13
18 test('hasProperty', () { 14 test('hasProperty', () {
19 var foo = [3]; 15 var foo = [3];
20 shouldPass(foo, hasProperty('length', 1)); 16 shouldPass(foo, hasProperty('length', 1));
21 shouldFail(foo, hasProperty('foo'), 'Expected: has property "foo" ' 17 shouldFail(foo, hasProperty('foo'), 'Expected: has property "foo" '
22 'Actual: [3] ' 18 'Actual: [3] '
23 'Which: has no property named "foo"'); 19 'Which: has no property named "foo"');
24 shouldFail(foo, hasProperty('length', 2), 20 shouldFail(foo, hasProperty('length', 2),
25 'Expected: has property "length" which matches <2> ' 21 'Expected: has property "length" which matches <2> '
26 'Actual: [3] ' 22 'Actual: [3] '
27 'Which: has property "length" with value <1>'); 23 'Which: has property "length" with value <1>');
28 }); 24 });
29 } 25 }
OLDNEW
« no previous file with comments | « pkg/unittest/test/matchers_test.dart ('k') | pkg/unmodifiable_collection/test/unmodifiable_collection_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698