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

Unified Diff: pkg/docgen/test/single_library_test.dart

Issue 19888005: removed docgen/test/single_library_test: Skip # Uses js_helper (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | « pkg/docgen/lib/docgen.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/test/single_library_test.dart
diff --git a/pkg/docgen/test/single_library_test.dart b/pkg/docgen/test/single_library_test.dart
index 6ff153985dd11b6f93fecf6594a9c88860c435a1..a35bad1d7018a2c679b674c5ffe9edf62fc84265 100644
--- a/pkg/docgen/test/single_library_test.dart
+++ b/pkg/docgen/test/single_library_test.dart
@@ -2,18 +2,17 @@ library single_library_test;
import 'dart:io';
+import 'package:path/path.dart' as path;
import 'package:unittest/unittest.dart';
import '../lib/docgen.dart';
-import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart';
main() {
group('Generate docs for', () {
test('one simple file.', () {
- // TODO(janicejl): Instead of creating a new file, should use an in-memory
- // file for creating the mirrorSystem. Example of the util function in
- // sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart.
- // Example of the test is in file mirrors_lookup_test.dart
+ var current = Directory.current;
+ var temporaryDir = new Directory('single_library').createTempSync();
+ Directory.current = temporaryDir;
Emily Fortuna 2013/07/22 23:09:10 how about instead of setting your current director
janicejl 2013/07/22 23:27:45 Done.
var file = new File('test.dart');
file.writeAsStringSync('''
library test;
@@ -47,11 +46,12 @@ main() {
}
''');
- getMirrorSystem(['test.dart'],'', parseSdk: false)
+ getMirrorSystem(['test.dart'])
.then(expectAsync1((mirrorSystem) {
- var testLibraryUri = currentDirectory.resolve('test.dart');
+ var testLibraryUri = new Uri(scheme: 'file',
+ path: path.absolute('test.dart'));
var library = generateLibrary(mirrorSystem.libraries[testLibraryUri],
- includePrivate: true);
+ includePrivate: false);
expect(library is Library, isTrue);
var classTypes = library.classes.values;
@@ -115,7 +115,8 @@ main() {
classMirror, methodMirror).children.first.text;
expect(libraryDocComment == 'foobar', isTrue);
- file.deleteSync();
+ Directory.current = current;
+ temporaryDir.deleteSync(recursive: true);
}));
});
});
« no previous file with comments | « pkg/docgen/lib/docgen.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698