OLD | NEW |
1 library unittest; | 1 library fixed_unittest; |
2 | 2 |
3 import 'package:unittest/unittest.dart'; | 3 import 'package:unittest/unittest.dart'; |
4 import 'package:di/mirrors.dart'; | 4 import 'package:di/src/mirrors.dart'; |
5 import 'dart:async'; | 5 import 'dart:async'; |
6 | 6 |
7 export 'package:unittest/unittest.dart'; | 7 export 'package:unittest/unittest.dart'; |
8 | 8 |
9 // Jasmine-like syntax for unittest. | 9 // Jasmine-like syntax for unittest. |
10 void describe(String spec, TestFunction body) => group(spec, body); | 10 void describe(String spec, TestFunction body) => group(spec, body); |
11 void ddescribe(String spec, TestFunction body) => solo_group(spec, body); | 11 void ddescribe(String spec, TestFunction body) => solo_group(spec, body); |
12 void xdescribe(String spec, TestFunction body) {} | 12 void xdescribe(String spec, TestFunction body) {} |
13 void it(String spec, TestFunction body) => test(spec, body); | 13 void it(String spec, TestFunction body) => test(spec, body); |
14 void xit(String spec, TestFunction body) {} | 14 void xit(String spec, TestFunction body) {} |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 Type t; | 101 Type t; |
102 | 102 |
103 IsInstanceOfTypeMatcher(this.t); | 103 IsInstanceOfTypeMatcher(this.t); |
104 | 104 |
105 bool matches(obj, Map matchState) => | 105 bool matches(obj, Map matchState) => |
106 reflect(obj).type.qualifiedName == reflectClass(t).qualifiedName; | 106 reflect(obj).type.qualifiedName == reflectClass(t).qualifiedName; |
107 | 107 |
108 Description describe(Description description) => | 108 Description describe(Description description) => |
109 description.add('an instance of ${t.toString()}'); | 109 description.add('an instance of ${t.toString()}'); |
110 } | 110 } |
OLD | NEW |