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

Side by Side Diff: test/visitor_test.dart

Issue 1022963002: pkg/csslib: fixes for args (Closed) Base URL: https://github.com/dart-lang/csslib@master
Patch Set: nits Created 5 years, 8 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
« no previous file with comments | « test/var_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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'; 7 import 'package:unittest/unittest.dart';
8 import 'package:csslib/visitor.dart'; 8 import 'package:csslib/visitor.dart';
9 import 'testing.dart'; 9 import 'testing.dart';
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 var clsVisits = new ClassVisitor(['foobar'])..visitTree(s); 43 var clsVisits = new ClassVisitor(['foobar'])..visitTree(s);
44 expect(clsVisits.matches, true); 44 expect(clsVisits.matches, true);
45 45
46 in1 = ''' 46 in1 = '''
47 .foobar1 { } 47 .foobar1 { }
48 .xyzzy .foo #my-div { color: red; } 48 .xyzzy .foo #my-div { color: red; }
49 div.hello { font: arial; } 49 div.hello { font: arial; }
50 '''; 50 ''';
51 51
52 s = parseCss(in1, errors: errors..clear(), opts: ['--no-colors', 'memory']); 52 s = parseCss(in1, errors: errors..clear(), opts: simpleOptions);
53 53
54 expect(s != null, true); 54 expect(s != null, true);
55 expect(errors.isEmpty, true, reason: errors.toString()); 55 expect(errors.isEmpty, true, reason: errors.toString());
56 56
57 clsVisits = new ClassVisitor(['foobar1', 'xyzzy', 'foo', 'hello']) 57 clsVisits = new ClassVisitor(['foobar1', 'xyzzy', 'foo', 'hello'])
58 ..visitTree(s); 58 ..visitTree(s);
59 expect(clsVisits.matches, true); 59 expect(clsVisits.matches, true);
60 60
61 expect(prettyPrint(s), r''' 61 expect(prettyPrint(s), r'''
62 .foobar1 { 62 .foobar1 {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 expect(errors.isEmpty, true, reason: errors.toString()); 103 expect(errors.isEmpty, true, reason: errors.toString());
104 104
105 final emitted = polyfillPrint('myComponent', s); 105 final emitted = polyfillPrint('myComponent', s);
106 expect(emitted, generated); 106 expect(emitted, generated);
107 } 107 }
108 108
109 main() { 109 main() {
110 test('Class Visitors', testClassVisitors); 110 test('Class Visitors', testClassVisitors);
111 test('Polyfill', testPolyFill); 111 test('Polyfill', testPolyFill);
112 } 112 }
OLDNEW
« no previous file with comments | « test/var_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698