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

Side by Side Diff: pkg/unittest/unittest.dart

Issue 10948004: Fix argument test to use !? instead of ? (sigh). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « no previous file | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 /** 5 /**
6 * A library for writing dart unit tests. 6 * A library for writing dart unit tests.
7 * 7 *
8 * To import this library, specify the relative path to 8 * To import this library, specify the relative path to
9 * pkg/unittest/unittest.dart. 9 * pkg/unittest/unittest.dart.
10 * 10 *
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 return false; 353 return false;
354 } else { 354 } else {
355 return true; 355 return true;
356 } 356 }
357 } 357 }
358 358
359 invoke([arg0, arg1, arg2, arg3, arg4]) { 359 invoke([arg0, arg1, arg2, arg3, arg4]) {
360 return guardAsync(() { 360 return guardAsync(() {
361 ++_actualCalls; 361 ++_actualCalls;
362 if (!_shouldCallBack()) return; 362 if (!_shouldCallBack()) return;
363 if (?arg0) return _callback(); 363 if (!?arg0) return _callback();
364 if (?arg1) return _callback(arg0); 364 if (!?arg1) return _callback(arg0);
365 if (?arg2) return _callback(arg0, arg1); 365 if (!?arg2) return _callback(arg0, arg1);
366 if (?arg3) return _callback(arg0, arg1, arg2); 366 if (!?arg3) return _callback(arg0, arg1, arg2);
367 if (?arg4) return _callback(arg0, arg1, arg2, arg3); 367 if (!?arg4) return _callback(arg0, arg1, arg2, arg3);
368 _testCase.error( 368 _testCase.error(
369 'unittest lib does not support callbacks with more than' 369 'unittest lib does not support callbacks with more than'
370 ' 4 arguments.', 370 ' 4 arguments.',
371 ''); 371 '');
372 }, 372 },
373 _after, _testNum); 373 _after, _testNum);
374 } 374 }
375 375
376 invoke0() { 376 invoke0() {
377 return guardAsync( 377 return guardAsync(
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 } 847 }
848 848
849 /** Enable a test by ID. */ 849 /** Enable a test by ID. */
850 void enableTest(int testId) => _setTestEnabledState(testId, true); 850 void enableTest(int testId) => _setTestEnabledState(testId, true);
851 851
852 /** Disable a test by ID. */ 852 /** Disable a test by ID. */
853 void disableTest(int testId) => _setTestEnabledState(testId, false); 853 void disableTest(int testId) => _setTestEnabledState(testId, false);
854 854
855 /** Signature for a test function. */ 855 /** Signature for a test function. */
856 typedef void TestFunction(); 856 typedef void TestFunction();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698