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

Side by Side Diff: packages/petitparser/test/dart_file_tests.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers 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/petitparser/test/core_benchmark.dart ('k') | packages/petitparser/test/dart_test.dart » ('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 /// This test-case automatically generates various tests from Dart source
2 /// code. Unfortunately the parser is currently unable to parse most of
3 /// these files.
4 library petitparser.test.dart_file_test;
5
6 import 'dart:io';
7
8 import 'package:test/test.dart';
9
10 import 'package:petitparser/dart.dart';
11 import 'package:petitparser/test.dart';
12
13 void generateTests(DartGrammar dart, String title, List<FileSystemEntity> files) {
14 group(title, () {
15 files
16 .where((file) => file is File && file.path.endsWith('.dart'))
17 .forEach((File file) {
18 test(file.path, () {
19 var source = new StringBuffer();
20 file
21 .openRead()
22 .transform(SYSTEM_ENCODING.decoder)
23 .listen((part) => source.write(part), onDone: expectAsync(() {
24 expect(source.toString(), accept(dart));
25 }), onError: fail);
26 });
27 });
28 });
29 }
30
31 void main() {
32 var dart = new DartGrammar();
33 generateTests(dart, 'Dart SDK', new Directory('packages')
34 .listSync(recursive: true, followLinks: false));
35 generateTests(dart, 'PetitParser', Directory.current
36 .listSync(recursive: true, followLinks: true));
37 }
OLDNEW
« no previous file with comments | « packages/petitparser/test/core_benchmark.dart ('k') | packages/petitparser/test/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698