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

Side by Side Diff: pkg/scheduled_test/test/descriptor_test.dart

Issue 12330090: One final fix to the descriptor test on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library descriptor_test; 5 library descriptor_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:pathos/path.dart' as path; 10 import 'package:pathos/path.dart' as path;
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 702
703 expectTestsPass("directory().load() loads a deeply-nested file", () { 703 expectTestsPass("directory().load() loads a deeply-nested file", () {
704 test('test', () { 704 test('test', () {
705 var dir = d.dir('dir', [ 705 var dir = d.dir('dir', [
706 d.dir('subdir', [ 706 d.dir('subdir', [
707 d.file('name.txt', 'subcontents') 707 d.file('name.txt', 'subcontents')
708 ]), 708 ]),
709 d.file('name.txt', 'contents') 709 d.file('name.txt', 'contents')
710 ]); 710 ]);
711 711
712 expect(byteStreamToString(dir.load(path.join('subdir', 'name.txt'))), 712 expect(byteStreamToString(dir.load('subdir/name.txt')),
713 completion(equals('subcontents'))); 713 completion(equals('subcontents')));
714 }); 714 });
715 }); 715 });
716 716
717 expectTestsPass("directory().read() fails", () { 717 expectTestsPass("directory().read() fails", () {
718 test('test', () { 718 test('test', () {
719 var dir = d.dir('dir', [d.file('name.txt', 'contents')]); 719 var dir = d.dir('dir', [d.file('name.txt', 'contents')]);
720 expect(dir.read().toList(), 720 expect(dir.read().toList(),
721 throwsA(equals("Can't read the contents of 'dir': is a directory."))); 721 throwsA(equals("Can't read the contents of 'dir': is a directory.")));
722 }); 722 });
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 882
883 Future<List<int>> byteStreamToList(Stream<List<int>> stream) { 883 Future<List<int>> byteStreamToList(Stream<List<int>> stream) {
884 return stream.reduce(<int>[], (buffer, chunk) { 884 return stream.reduce(<int>[], (buffer, chunk) {
885 buffer.addAll(chunk); 885 buffer.addAll(chunk);
886 return buffer; 886 return buffer;
887 }); 887 });
888 } 888 }
889 889
890 Future<String> byteStreamToString(Stream<List<int>> stream) => 890 Future<String> byteStreamToString(Stream<List<int>> stream) =>
891 byteStreamToList(stream).then((bytes) => new String.fromCharCodes(bytes)); 891 byteStreamToList(stream).then((bytes) => new String.fromCharCodes(bytes));
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698