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

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

Issue 11090016: Change core lib, dart2js, and more for new optional parameters syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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
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 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 * [done] or if it fails with an exception. 781 * [done] or if it fails with an exception.
782 */ 782 */
783 _nextBatch() { 783 _nextBatch() {
784 while (_currentTest < _tests.length) { 784 while (_currentTest < _tests.length) {
785 final testCase = _tests[_currentTest]; 785 final testCase = _tests[_currentTest];
786 guardAsync(() { 786 guardAsync(() {
787 testCase.run(); 787 testCase.run();
788 if (!testCase.isComplete && testCase.callbackFunctionsOutstanding == 0) { 788 if (!testCase.isComplete && testCase.callbackFunctionsOutstanding == 0) {
789 testCase.pass(); 789 testCase.pass();
790 } 790 }
791 }, testNum:_currentTest); 791 }, null, _currentTest);
792 792
793 if (!testCase.isComplete && 793 if (!testCase.isComplete &&
794 testCase.callbackFunctionsOutstanding > 0) return; 794 testCase.callbackFunctionsOutstanding > 0) return;
795 _currentTest++; 795 _currentTest++;
796 } 796 }
797 797
798 _completeTests(); 798 _completeTests();
799 } 799 }
800 800
801 /** Publish results on the page and notify controller. */ 801 /** Publish results on the page and notify controller. */
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 } 877 }
878 878
879 /** Enable a test by ID. */ 879 /** Enable a test by ID. */
880 void enableTest(int testId) => _setTestEnabledState(testId, true); 880 void enableTest(int testId) => _setTestEnabledState(testId, true);
881 881
882 /** Disable a test by ID. */ 882 /** Disable a test by ID. */
883 void disableTest(int testId) => _setTestEnabledState(testId, false); 883 void disableTest(int testId) => _setTestEnabledState(testId, false);
884 884
885 /** Signature for a test function. */ 885 /** Signature for a test function. */
886 typedef void TestFunction(); 886 typedef void TestFunction();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698