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

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

Issue 12321091: Fix some dumb test-breaking errors. (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 | « pkg/scheduled_test/lib/src/descriptor/entry.dart ('k') | 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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 expectTestsPass("directory().load() fails to load a nested directory", () { 725 expectTestsPass("directory().load() fails to load a nested directory", () {
726 test('test', () { 726 test('test', () {
727 var dir = d.dir('dir', [ 727 var dir = d.dir('dir', [
728 d.dir('subdir', [ 728 d.dir('subdir', [
729 d.file('name.txt', 'subcontents') 729 d.file('name.txt', 'subcontents')
730 ]), 730 ]),
731 d.file('name.txt', 'contents') 731 d.file('name.txt', 'contents')
732 ]); 732 ]);
733 733
734 expect(dir.load('subdir').toList(), 734 expect(dir.load('subdir').toList(),
735 throwsA(equals("Can't load the contents of 'subdir': is a " 735 throwsA(equals("Can't read the contents of 'subdir': is a "
736 "directory."))); 736 "directory.")));
737 }); 737 });
738 }); 738 });
739 739
740 expectTestsPass("directory().load() fails to load an absolute path", () { 740 expectTestsPass("directory().load() fails to load an absolute path", () {
741 test('test', () { 741 test('test', () {
742 var dir = d.dir('dir', [d.file('name.txt', 'contents')]); 742 var dir = d.dir('dir', [d.file('name.txt', 'contents')]);
743 743
744 expect(dir.load('/name.txt').toList(), 744 expect(dir.load('/name.txt').toList(),
745 throwsA(equals("Can't load absolute path '/name.txt'."))); 745 throwsA(equals("Can't load absolute path '/name.txt'.")));
(...skipping 136 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 | « pkg/scheduled_test/lib/src/descriptor/entry.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698