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

Side by Side Diff: packages/csslib/test/samples_test.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 4 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 | « packages/csslib/test/examples/skeleton.css ('k') | packages/dart_style/._.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 @TestOn('vm')
2 library samples_test;
3
4 import 'dart:io';
5 import 'dart:mirrors';
6
7 import 'package:test/test.dart';
8 import 'package:csslib/parser.dart';
9
10 const testOptions = const PreprocessorOptions(
11 useColors: false,
12 checked: false,
13 warningsAsErrors: true,
14 inputFile: 'memory');
15
16 void testCSSFile(File cssFile) {
17 final errors = <Message>[];
18 final css = cssFile.readAsStringSync();
19 final stylesheet = parse(css, errors: errors, options: testOptions);
20
21 expect(stylesheet, isNotNull);
22 expect(errors, isEmpty, reason: errors.toString());
23 }
24
25 main() {
26 final libraryUri = currentMirrorSystem().findLibrary(#samples_test).uri;
27 final cssDir = new Directory.fromUri(libraryUri.resolve('examples'));
28 for (var element in cssDir.listSync())
29 if (element is File && element.uri.pathSegments.last.endsWith('.css')) {
30 test(element.uri.pathSegments.last, () => testCSSFile(element));
31 }
32 }
OLDNEW
« no previous file with comments | « packages/csslib/test/examples/skeleton.css ('k') | packages/dart_style/._.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698