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

Unified Diff: test/codegen_test.dart

Issue 1956513004: Switch to actual unittest, stack trace, and path packages. Tag tests as failing that were ignored d… (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/codegen/unittest.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen_test.dart
diff --git a/test/codegen_test.dart b/test/codegen_test.dart
index 805d4453bf8cff0cfe1cf691311ea996e3782be2..6b12f2eb7d7a625fca036e7704415f51030dab84 100644
--- a/test/codegen_test.dart
+++ b/test/codegen_test.dart
@@ -55,7 +55,19 @@ main(arguments) {
_buildPackages(compiler, expectDir);
test('matcher', () {
- _buildMatcher(compiler, expectDir);
+ _buildPackage(compiler, expectDir, "matcher");
+ });
+
+ test('unittest', () {
+ _buildPackage(compiler, expectDir, "unittest");
+ });
+
+ test('stack_trace', () {
+ _buildPackage(compiler, expectDir, "stack_trace");
+ });
+
+ test('path', () {
+ _buildPackage(compiler, expectDir, "path");
});
});
@@ -171,23 +183,18 @@ void _buildPackages(ModuleCompiler compiler, String expectDir) {
}
}
-void _buildMatcher(ModuleCompiler compiler, String expectDir) {
+void _buildPackage(ModuleCompiler compiler, String expectDir, packageName) {
var options = new CompilerOptions(sourceMap: false, summarizeApi: false);
var packageRoot = path.join(inputDir, 'packages');
- var filePath = path.join(packageRoot, 'matcher', 'matcher.dart');
- var contents = new File(filePath).readAsStringSync();
-
- // Collect any other files we've imported.
- var files = new Set<String>();
- _collectTransitiveImports(contents, files,
- packageRoot: packageRoot, from: filePath);
+ var packageInputDir = path.join(packageRoot, packageName);
+ var files = new Directory(packageInputDir).listSync(recursive: true);
var unit =
- new BuildUnit('matcher', inputDir, files.toList(), _moduleForLibrary);
+ new BuildUnit(packageName, packageInputDir, files.where((entry) => entry.path.endsWith('dart')).map((entry) => entry.path).toList(), _moduleForLibrary);
var module = compiler.compile(unit, options);
- var outPath = path.join(expectDir, 'matcher', 'matcher');
+ var outPath = path.join(expectDir, packageName, packageName);
_writeModule(outPath, module);
}
@@ -237,8 +244,6 @@ final packageUrlMappings = {
'package:expect/expect.dart': path.join(inputDir, 'expect.dart'),
'package:async_helper/async_helper.dart':
path.join(inputDir, 'async_helper.dart'),
- 'package:unittest/unittest.dart': path.join(inputDir, 'unittest.dart'),
- 'package:unittest/html_config.dart': path.join(inputDir, 'html_config.dart'),
'package:js/js.dart': path.join(inputDir, 'packages', 'js', 'js.dart')
};
« no previous file with comments | « test/codegen/unittest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698