OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2015, 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 library test.src.util.asserts; | |
6 | |
7 import 'package:analyzer/src/util/asserts.dart'; | |
8 import 'package:unittest/unittest.dart'; | |
9 | |
10 import '../../reflective_tests.dart'; | |
11 | |
12 | |
13 main() { | |
14 groupSep = ' | '; | |
15 runReflectiveTests(AnalysisTaskTest); | |
16 } | |
17 | |
18 | |
19 @reflectiveTest | |
20 class AnalysisTaskTest { | |
21 void test_notNull_notNull() { | |
22 notNull(this); | |
23 } | |
24 | |
25 void test_notNull_null_hasDescription() { | |
26 notNull(this); | |
27 expect( | |
28 () => notNull(null, 'desc'), | |
29 throwsA(new isInstanceOf<ArgumentError>())); | |
Brian Wilkerson
2015/02/03 14:54:42
I can't check, but is there a throwsArgumentError?
scheglov
2015/02/03 16:06:12
Done.
| |
30 } | |
31 | |
32 void test_notNull_null_noDescription() { | |
33 notNull(this); | |
34 expect(() => notNull(null), throwsA(new isInstanceOf<ArgumentError>())); | |
35 } | |
36 } | |
OLD | NEW |