| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 import 'dart:async'; |
| 6 import 'dart:collection'; |
| 7 |
| 8 import 'package:unittest/unittest.dart'; |
| 9 import 'package:unittest/mirror_matchers.dart'; |
| 10 |
| 11 import 'test_common.dart'; |
| 12 import 'test_utils.dart'; |
| 13 |
| 14 void main() { |
| 15 |
| 16 initUtils(); |
| 17 |
| 18 test('hasProperty', () { |
| 19 var foo = [3]; |
| 20 shouldPass(foo, hasProperty('length', 1)); |
| 21 shouldFail(foo, hasProperty('foo'), 'Expected: has property "foo" ' |
| 22 'Actual: [3] ' |
| 23 'Which: has no property named "foo"'); |
| 24 shouldFail(foo, hasProperty('length', 2), |
| 25 'Expected: has property "length" which matches <2> ' |
| 26 'Actual: [3] ' |
| 27 'Which: has property "length" with value <1>'); |
| 28 }); |
| 29 } |
| OLD | NEW |