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

Unified Diff: pkg/unittest/lib/unittest.dart

Issue 772463003: Don't Throw Error when setting unittest config twice (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Adding new version Created 6 years 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
Index: pkg/unittest/lib/unittest.dart
===================================================================
--- pkg/unittest/lib/unittest.dart (revision 42037)
+++ pkg/unittest/lib/unittest.dart (working copy)
@@ -194,7 +194,9 @@
void set unittestConfiguration(Configuration value) {
if (!identical(_config, value)) {
if (_config != null) {
- throw new StateError('unittestConfiguration has already been set');
+ logMessage('Warning: The unittestConfiguration has already been set. New '
+ + 'unittestConfiguration ignored.');
kevmoo 2014/12/08 21:04:46 Remove '+' adjacent string literals automatically
Nicolas Garnier 2014/12/08 21:18:15 Done.
+ return;
kevmoo 2014/12/08 21:04:45 Use an else block instead of the in-block return
Nicolas Garnier 2014/12/08 21:18:15 Done.
}
_config = value;
}

Powered by Google App Engine
This is Rietveld 408576698