OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library visitor_test; | 5 library visitor_test; |
6 | 6 |
7 import 'package:unittest/unittest.dart'; | |
8 import 'package:csslib/visitor.dart'; | 7 import 'package:csslib/visitor.dart'; |
| 8 import 'package:test/test.dart'; |
| 9 |
9 import 'testing.dart'; | 10 import 'testing.dart'; |
10 | 11 |
11 class ClassVisitor extends Visitor { | 12 class ClassVisitor extends Visitor { |
12 final List expectedClasses; | 13 final List expectedClasses; |
13 final Set<String> foundClasses = new Set(); | 14 final Set<String> foundClasses = new Set(); |
14 | 15 |
15 ClassVisitor(this.expectedClasses); | 16 ClassVisitor(this.expectedClasses); |
16 | 17 |
17 void visitClassSelector(ClassSelector node) { | 18 void visitClassSelector(ClassSelector node) { |
18 foundClasses.add(node.name); | 19 foundClasses.add(node.name); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 expect(errors.isEmpty, true, reason: errors.toString()); | 104 expect(errors.isEmpty, true, reason: errors.toString()); |
104 | 105 |
105 final emitted = polyfillPrint('myComponent', s); | 106 final emitted = polyfillPrint('myComponent', s); |
106 expect(emitted, generated); | 107 expect(emitted, generated); |
107 } | 108 } |
108 | 109 |
109 main() { | 110 main() { |
110 test('Class Visitors', testClassVisitors); | 111 test('Class Visitors', testClassVisitors); |
111 test('Polyfill', testPolyFill); | 112 test('Polyfill', testPolyFill); |
112 } | 113 } |
OLD | NEW |