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

Side by Side Diff: pkg/docgen/test/single_library_test.dart

Issue 25720002: Add Directory.systemTemp getter to replace createSystemTemp(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't add an extra / to a directory ending in // Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/builtin_natives.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library single_library_test; 1 library single_library_test;
2 2
3 import 'dart:io'; 3 import 'dart:io';
4 4
5 import 'package:path/path.dart' as path; 5 import 'package:path/path.dart' as path;
6 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
7 7
8 import '../lib/docgen.dart'; 8 import '../lib/docgen.dart';
9 9
10 main() { 10 main() {
11 group('Generate docs for', () { 11 group('Generate docs for', () {
12 test('one simple file.', () { 12 test('one simple file.', () {
13 var temporaryDir = Directory.createSystemTempSync('single_library_'); 13 var temporaryDir = Directory.systemTemp.createTempSync('single_library_');
14 var fileName = path.join(temporaryDir.path, 'temp.dart'); 14 var fileName = path.join(temporaryDir.path, 'temp.dart');
15 var file = new File(fileName); 15 var file = new File(fileName);
16 file.writeAsStringSync(''' 16 file.writeAsStringSync('''
17 library test; 17 library test;
18 /** 18 /**
19 * Doc comment for class [A]. 19 * Doc comment for class [A].
20 * 20 *
21 * Multiline Test 21 * Multiline Test
22 */ 22 */
23 /* 23 /*
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 expect(methodDocComment == 'test.A.doThis', isTrue); 125 expect(methodDocComment == 'test.A.doThis', isTrue);
126 126
127 // Testing something with no reference 127 // Testing something with no reference
128 var libraryDocComment = fixReference('foobar', libraryMirror, 128 var libraryDocComment = fixReference('foobar', libraryMirror,
129 classMirror, methodMirror).children.first.text; 129 classMirror, methodMirror).children.first.text;
130 expect(libraryDocComment == 'foobar', isTrue); 130 expect(libraryDocComment == 'foobar', isTrue);
131 })).whenComplete(() => temporaryDir.deleteSync(recursive: true)); 131 })).whenComplete(() => temporaryDir.deleteSync(recursive: true));
132 }); 132 });
133 }); 133 });
134 } 134 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/builtin_natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698