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

Unified Diff: utils/tests/pub/test_pub.dart

Issue 11867012: Create a unit test config for the pub tests that's prettier. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Respond to review. Created 7 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 | « utils/tests/pub/command_line_config.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/test_pub.dart
diff --git a/utils/tests/pub/test_pub.dart b/utils/tests/pub/test_pub.dart
index 975e36f60c54caf8fa6654c255dd19d12c72889b..f9bd96b8c9c0ffc7e20f100741cac7c0324807fa 100644
--- a/utils/tests/pub/test_pub.dart
+++ b/utils/tests/pub/test_pub.dart
@@ -29,6 +29,16 @@ import '../../pub/system_cache.dart';
import '../../pub/utils.dart';
import '../../pub/validator.dart';
import '../../pub/yaml/yaml.dart';
+import 'command_line_config.dart';
+
+/// This should be called at the top of a test file to set up an appropriate
+/// test configuration for the machine running the tests.
+initConfig() {
+ // If we aren't running on the bots, use the human-friendly config.
+ if (new Options().arguments.contains('--human')) {
+ configure(new CommandLineConfiguration());
+ }
+}
/// Creates a new [FileDescriptor] with [name] and [contents].
FileDescriptor file(Pattern name, String contents) =>
@@ -456,7 +466,6 @@ integration(String description, body()) {
/// once per test case.
void _run() {
var createdSandboxDir;
-
var asyncDone = expectAsync0(() {});
Future cleanup() {
« no previous file with comments | « utils/tests/pub/command_line_config.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698