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

Unified Diff: lib/tests.dart

Issue 897453003: add whitespace/newline stripping options to TestHelper (Closed) Base URL: git@github.com:dart-lang/code-transformers.git@master
Patch Set: update pubspec/changelog Created 5 years, 11 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/test_harness.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/tests.dart
diff --git a/lib/tests.dart b/lib/tests.dart
index 9ed8e0bdc342f52db06bb13011e7984af0398256..a3946137ee386a18acd9b9b7622a2c0f9b8c8f30 100644
--- a/lib/tests.dart
+++ b/lib/tests.dart
@@ -16,13 +16,16 @@ import 'package:unittest/unittest.dart';
import 'src/test_harness.dart';
import 'src/dart_sdk.dart';
+export 'src/test_harness.dart' show StringFormatter;
+
/// Defines a test which invokes [applyTransformers].
testPhases(String testName, List<List<Transformer>> phases,
Map<String, String> inputs, Map<String, String> results,
- [List<String> messages]) {
+ [List<String> messages,
+ StringFormatter formatter = StringFormatter.noTrailingWhitespace]) {
test(testName,
() => applyTransformers(phases, inputs: inputs, results: results,
- messages: messages));
+ messages: messages, formatter: formatter));
}
/// Updates the provided transformers with [inputs] as asset inputs then
@@ -36,9 +39,11 @@ testPhases(String testName, List<List<Transformer>> phases,
Future applyTransformers(List<List<Transformer>> phases,
{Map<String, String> inputs: const {},
Map<String, String> results: const {},
- List<String> messages: const []}) {
+ List<String> messages: const [],
+ StringFormatter formatter: StringFormatter.noTrailingWhitespace}) {
- var helper = new TestHelper(phases, inputs, messages)..run();
+ var helper = new TestHelper(
+ phases, inputs, messages, formatter: formatter)..run();
return helper.checkAll(results).then((_) => helper.tearDown());
}
« no previous file with comments | « lib/src/test_harness.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698