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

Unified Diff: lib/src/descriptor/file_descriptor.dart

Issue 1152453009: pkg/scheduled_test: fix analyzer hints (Closed) Base URL: https://github.com/dart-lang/scheduled_test.git@master
Patch Set: nits Created 5 years, 6 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 | « lib/src/descriptor/directory_descriptor.dart ('k') | lib/src/descriptor/nothing_descriptor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/descriptor/file_descriptor.dart
diff --git a/lib/src/descriptor/file_descriptor.dart b/lib/src/descriptor/file_descriptor.dart
index ca7704f4cf68713c00a9b0ad5efcb982bb017904..26bb71a91c208fbf7468e6ad18d66732c174a0bb 100644
--- a/lib/src/descriptor/file_descriptor.dart
+++ b/lib/src/descriptor/file_descriptor.dart
@@ -10,7 +10,6 @@ import 'dart:io';
import 'dart:math' as math;
import 'package:path/path.dart' as path;
-import 'package:stack_trace/stack_trace.dart';
import '../../descriptor.dart';
import '../../scheduled_test.dart';
@@ -85,7 +84,8 @@ class _BinaryFileDescriptor extends FileDescriptor {
Future _validateNow(List<int> actualContents) {
if (orderedIterableEquals(contents, actualContents)) return null;
// TODO(nweiz): show a hex dump here if the data is small enough.
- fail("File '$name' didn't contain the expected binary data.");
+ throw new TestFailure(
+ "File '$name' didn't contain the expected binary data.");
}
}
@@ -95,8 +95,8 @@ class _StringFileDescriptor extends FileDescriptor {
Future _validateNow(List<int> actualContents) {
if (orderedIterableEquals(contents, actualContents)) return null;
- throw _textMismatchMessage(textContents,
- new String.fromCharCodes(actualContents));
+ throw new TestFailure(_textMismatchMessage(
+ textContents, new String.fromCharCodes(actualContents)));
}
String _textMismatchMessage(String expected, String actual) {
« no previous file with comments | « lib/src/descriptor/directory_descriptor.dart ('k') | lib/src/descriptor/nothing_descriptor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698