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

Side by Side Diff: tools/testing/dart/test_suite.dart

Issue 9109012: Fix static type warnings in test.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | 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 #library("test_suite"); 5 #library("test_suite");
6 6
7 #import("status_file_parser.dart"); 7 #import("status_file_parser.dart");
8 #import("test_runner.dart"); 8 #import("test_runner.dart");
9 #import("multitest.dart"); 9 #import("multitest.dart");
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 ReceivePort receiveTestName; 55 ReceivePort receiveTestName;
56 TestExpectations testExpectations; 56 TestExpectations testExpectations;
57 57
58 CCTestSuite(Map this.configuration, 58 CCTestSuite(Map this.configuration,
59 String this.suiteName, 59 String this.suiteName,
60 String runnerName, 60 String runnerName,
61 List<String> this.statusFilePaths) { 61 List<String> this.statusFilePaths) {
62 runnerPath = TestUtils.buildDir(configuration) + '/' + runnerName; 62 runnerPath = TestUtils.buildDir(configuration) + '/' + runnerName;
63 } 63 }
64 64
65 void complexStatusMatching() => false; 65 bool complexStatusMatching() => false;
66 66
67 void testNameHandler(String testName, ignore) { 67 void testNameHandler(String testName, ignore) {
68 if (testName == "") { 68 if (testName == "") {
69 receiveTestName.close(); 69 receiveTestName.close();
70 doDone(true); 70 doDone(true);
71 } else { 71 } else {
72 // Only run the tests that match the pattern. Use the name 72 // Only run the tests that match the pattern. Use the name
73 // "suiteName/testName" for cc tests. 73 // "suiteName/testName" for cc tests.
74 RegExp pattern = configuration['selectors'][suiteName]; 74 RegExp pattern = configuration['selectors'][suiteName];
75 String constructedName = '$suiteName/$testName'; 75 String constructedName = '$suiteName/$testName';
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 TestExpectations testExpectations; 154 TestExpectations testExpectations;
155 List<TestInformation> cachedTests; 155 List<TestInformation> cachedTests;
156 final String pathSeparator; 156 final String pathSeparator;
157 157
158 StandardTestSuite(Map this.configuration, 158 StandardTestSuite(Map this.configuration,
159 String this.suiteName, 159 String this.suiteName,
160 String this.directoryPath, 160 String this.directoryPath,
161 List<String> this.statusFilePaths) 161 List<String> this.statusFilePaths)
162 : pathSeparator = new Platform().pathSeparator(); 162 : pathSeparator = new Platform().pathSeparator();
163 163
164 void isTestFile(String filename) => filename.endsWith("Test.dart"); 164 bool isTestFile(String filename) => filename.endsWith("Test.dart");
165 165
166 void listRecursively() => false; 166 bool listRecursively() => false;
167 167
168 void complexStatusMatching() => false; 168 bool complexStatusMatching() => false;
169 169
170 String shellPath() => TestUtils.dartShellFileName(configuration); 170 String shellPath() => TestUtils.dartShellFileName(configuration);
171 171
172 List<String> additionalOptions() => []; 172 List<String> additionalOptions() => [];
173 173
174 void forEachTest(Function onTest, Map testCache, [Function onDone = null]) { 174 void forEachTest(Function onTest, Map testCache, [Function onDone = null]) {
175 doTest = onTest; 175 doTest = onTest;
176 doDone = (onDone != null) ? onDone : (() => null); 176 doDone = (onDone != null) ? onDone : (() => null);
177 177
178 var filesRead = 0; 178 var filesRead = 0;
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 return 'application/dart'; 501 return 'application/dart';
502 case 'chromium': 502 case 'chromium':
503 case 'frogium': 503 case 'frogium':
504 return 'text/javascript'; 504 return 'text/javascript';
505 default: 505 default:
506 Expect.fail('Unimplemented component scriptType'); 506 Expect.fail('Unimplemented component scriptType');
507 return null; 507 return null;
508 } 508 }
509 } 509 }
510 510
511 String get scriptName() {
512 switch (configuration['component']) {
513 case 'dartium':
514 return tempDir.path + 'test.dart';
515 case 'chromium':
516 case 'frogium':
517 return tempDir.path + 'test.js';
518 default:
519 Expect.fail('Unimplemented component scriptType');
520 return null;
521 }
522 }
523
524 String getHtmlName(String filename) { 511 String getHtmlName(String filename) {
525 return filename.replaceAll('/', '_') + configuration['component'] + '.html'; 512 return filename.replaceAll('/', '_') + configuration['component'] + '.html';
526 } 513 }
527 514
528 String get dumpRenderTreeFilename() { 515 String get dumpRenderTreeFilename() {
529 if (new Platform().operatingSystem() == 'macos') { 516 if (new Platform().operatingSystem() == 'macos') {
530 return 'client/tests/drt/DumpRenderTree.app/Contents/' + 517 return 'client/tests/drt/DumpRenderTree.app/Contents/' +
531 'MacOS/DumpRenderTree'; 518 'MacOS/DumpRenderTree';
532 } 519 }
533 return 'client/tests/drt/DumpRenderTree'; 520 return 'client/tests/drt/DumpRenderTree';
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 DartcCompilationTestSuite(Map configuration, 663 DartcCompilationTestSuite(Map configuration,
677 String suiteName, 664 String suiteName,
678 String directoryPath, 665 String directoryPath,
679 List<String> this._testDirs, 666 List<String> this._testDirs,
680 List<String> expectations) 667 List<String> expectations)
681 : super(configuration, 668 : super(configuration,
682 suiteName, 669 suiteName,
683 directoryPath, 670 directoryPath,
684 expectations); 671 expectations);
685 672
686 void activityStarted() => ++activityCount; 673 void activityStarted() { ++activityCount; }
687 674
688 void activityCompleted() { 675 void activityCompleted() {
689 if (--activityCount == 0) { 676 if (--activityCount == 0) {
690 directoryListingDone(true); 677 directoryListingDone(true);
691 } 678 }
692 } 679 }
693 680
694 String shellPath() => TestUtils.compilerPath(configuration); 681 String shellPath() => TestUtils.compilerPath(configuration);
695 682
696 List<String> additionalOptions() { 683 List<String> additionalOptions() {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 List<String> testClasses; 722 List<String> testClasses;
736 Function doTest; 723 Function doTest;
737 Function doDone; 724 Function doDone;
738 TestExpectations testExpectations; 725 TestExpectations testExpectations;
739 726
740 JUnitTestSuite(Map this.configuration, 727 JUnitTestSuite(Map this.configuration,
741 String this.suiteName, 728 String this.suiteName,
742 String this.directoryPath, 729 String this.directoryPath,
743 String this.statusFilePath); 730 String this.statusFilePath);
744 731
745 void isTestFile(String filename) => filename.endsWith("Tests.java") && 732 bool isTestFile(String filename) => filename.endsWith("Tests.java") &&
746 !filename.contains('com/google/dart/compiler/vm') && 733 !filename.contains('com/google/dart/compiler/vm') &&
747 !filename.contains('com/google/dart/corelib/SharedTests.java'); 734 !filename.contains('com/google/dart/corelib/SharedTests.java');
748 735
749 void forEachTest(Function onTest, 736 void forEachTest(Function onTest,
750 Map testCacheIgnored, 737 Map testCacheIgnored,
751 [Function onDone = null]) { 738 [Function onDone = null]) {
752 doTest = onTest; 739 doTest = onTest;
753 doDone = (onDone != null) ? onDone : (() => null); 740 doDone = (onDone != null) ? onDone : (() => null);
754 741
755 if (configuration['component'] != 'dartc') { 742 if (configuration['component'] != 'dartc') {
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 * $noCrash tests are expected to be flaky but not crash 963 * $noCrash tests are expected to be flaky but not crash
977 * $pass tests are expected to pass 964 * $pass tests are expected to pass
978 * $failOk tests are expected to fail that we won't fix 965 * $failOk tests are expected to fail that we won't fix
979 * $fail tests are expected to fail that we should fix 966 * $fail tests are expected to fail that we should fix
980 * $crash tests are expected to crash that we should fix 967 * $crash tests are expected to crash that we should fix
981 * $timeout tests are allowed to timeout\ 968 * $timeout tests are allowed to timeout\
982 """; 969 """;
983 print(report); 970 print(report);
984 } 971 }
985 } 972 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698