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

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

Issue 170783009: pkg/docgen: updated min dependencies of args and unittest (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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
Index: pkg/docgen/test/multi_library_test.dart
diff --git a/pkg/docgen/test/multi_library_test.dart b/pkg/docgen/test/multi_library_test.dart
index 79a14310a881e0ca77dfec31c2a42a96f5614fea..8a841a0a729a5522c1ee31c0c6b0fd02e717ef26 100644
--- a/pkg/docgen/test/multi_library_test.dart
+++ b/pkg/docgen/test/multi_library_test.dart
@@ -91,19 +91,19 @@ const String DART_LIBRARY_3 = '''
}
''';
-Directory TEMP_DIRNAME;
+Directory _tempDir;
Alan Knight 2014/02/19 19:00:46 What's the point of making things private in a tes
-List writeLibFiles() {
- TEMP_DIRNAME = Directory.systemTemp.createTempSync('single_library_');
- var fileName = path.join(TEMP_DIRNAME.path, 'temp.dart');
+List<Uri> _writeLibFiles() {
+ _tempDir = Directory.systemTemp.createTempSync('single_library_');
+ var fileName = path.join(_tempDir.path, 'temp.dart');
var file = new File(fileName);
file.writeAsStringSync(DART_LIBRARY_1);
- var fileName2 = path.join(TEMP_DIRNAME.path, 'temp2.dart');
+ var fileName2 = path.join(_tempDir.path, 'temp2.dart');
file = new File(fileName2);
file.writeAsStringSync(DART_LIBRARY_2);
- var fileName3 = path.join(TEMP_DIRNAME.path, 'temp3.dart');
+ var fileName3 = path.join(_tempDir.path, 'temp3.dart');
file = new File(fileName3);
file.writeAsStringSync(DART_LIBRARY_3);
return [new Uri.file(fileName, windows: Platform.isWindows),
@@ -111,12 +111,12 @@ List writeLibFiles() {
new Uri.file(fileName3, windows: Platform.isWindows)];
}
-main() {
+void main() {
group('Generate docs for', () {
test('multiple libraries.', () {
- var files = writeLibFiles();
- getMirrorSystem(files)
- .then(expectAsync1((mirrorSystem) {
+ var files = _writeLibFiles();
+ return getMirrorSystem(files)
Alan Knight 2014/02/19 19:00:46 Is the return value actually used? An explicit ret
+ .then((mirrorSystem) {
var testLibraryUri = files[0];
var library = new Library(mirrorSystem.libraries[testLibraryUri]);

Powered by Google App Engine
This is Rietveld 408576698