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

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

Issue 10920003: Use new syntax for getters in test.dart and its libraries. (Closed) Base URL: https://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 | « 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 * Classes and methods for enumerating and preparing tests. 6 * Classes and methods for enumerating and preparing tests.
7 * 7 *
8 * This library includes: 8 * This library includes:
9 * 9 *
10 * - Creating tests by listing all the Dart files in certain directories, 10 * - Creating tests by listing all the Dart files in certain directories,
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 var generatedTestPath = Strings.join( 748 var generatedTestPath = Strings.join(
749 [TestUtils.buildDir(configuration), 749 [TestUtils.buildDir(configuration),
750 'generated_tests', 750 'generated_tests',
751 "${configuration['compiler']}-${configuration['runtime']}", 751 "${configuration['compiler']}-${configuration['runtime']}",
752 testUniqueName], '/'); 752 testUniqueName], '/');
753 753
754 TestUtils.mkdirRecursive(new Path('.'), new Path(generatedTestPath)); 754 TestUtils.mkdirRecursive(new Path('.'), new Path(generatedTestPath));
755 return new File(generatedTestPath).fullPathSync().replaceAll('\\', '/'); 755 return new File(generatedTestPath).fullPathSync().replaceAll('\\', '/');
756 } 756 }
757 757
758 String get scriptType() { 758 String get scriptType {
759 switch (configuration['compiler']) { 759 switch (configuration['compiler']) {
760 case 'none': 760 case 'none':
761 case 'dart2dart': 761 case 'dart2dart':
762 return 'application/dart'; 762 return 'application/dart';
763 case 'dart2js': 763 case 'dart2js':
764 case 'dartc': 764 case 'dartc':
765 return 'text/javascript'; 765 return 'text/javascript';
766 default: 766 default:
767 Expect.fail('Non-web runtime, so no scriptType for: ' 767 Expect.fail('Non-web runtime, so no scriptType for: '
768 '${configuration["compiler"]}'); 768 '${configuration["compiler"]}');
769 return null; 769 return null;
770 } 770 }
771 } 771 }
772 772
773 bool get hasRuntime() { 773 bool get hasRuntime {
774 switch(configuration['runtime']) { 774 switch(configuration['runtime']) {
775 case null: 775 case null:
776 Expect.fail("configuration['runtime'] is not set"); 776 Expect.fail("configuration['runtime'] is not set");
777 case 'none': 777 case 'none':
778 return false; 778 return false;
779 default: 779 default:
780 return true; 780 return true;
781 } 781 }
782 } 782 }
783 783
784 String getHtmlName(String filename) { 784 String getHtmlName(String filename) {
785 var cleanFilename = filename.replaceAll('/', '_') 785 var cleanFilename = filename.replaceAll('/', '_')
786 .replaceAll(':', '_') 786 .replaceAll(':', '_')
787 .replaceAll('\\', '_'); 787 .replaceAll('\\', '_');
788 788
789 return "$cleanFilename" 789 return "$cleanFilename"
790 "${configuration['compiler']}-${configuration['runtime']}.html"; 790 "${configuration['compiler']}-${configuration['runtime']}.html";
791 } 791 }
792 792
793 String get dumpRenderTreeFilename() { 793 String get dumpRenderTreeFilename {
794 if (configuration['drt'] != '') { 794 if (configuration['drt'] != '') {
795 return configuration['drt']; 795 return configuration['drt'];
796 } 796 }
797 if (Platform.operatingSystem == 'macos') { 797 if (Platform.operatingSystem == 'macos') {
798 return dartDir.append('/client/tests/drt/DumpRenderTree.app/Contents/' 798 return dartDir.append('/client/tests/drt/DumpRenderTree.app/Contents/'
799 'MacOS/DumpRenderTree').toNativePath(); 799 'MacOS/DumpRenderTree').toNativePath();
800 } 800 }
801 return dartDir.append('client/tests/drt/DumpRenderTree').toNativePath(); 801 return dartDir.append('client/tests/drt/DumpRenderTree').toNativePath();
802 } 802 }
803 803
804 String get dartiumFilename() { 804 String get dartiumFilename {
805 if (configuration['dartium'] != '') { 805 if (configuration['dartium'] != '') {
806 return configuration['dartium']; 806 return configuration['dartium'];
807 } 807 }
808 if (Platform.operatingSystem == 'macos') { 808 if (Platform.operatingSystem == 'macos') {
809 return dartDir.append('client/tests/dartium/Chromium.app/Contents/' 809 return dartDir.append('client/tests/dartium/Chromium.app/Contents/'
810 'MacOS/Chromium').toNativePath(); 810 'MacOS/Chromium').toNativePath();
811 } 811 }
812 return dartDir.append('client/tests/dartium/chrome').toNativePath(); 812 return dartDir.append('client/tests/dartium/chrome').toNativePath();
813 } 813 }
814 814
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 * $noCrash tests are expected to be flaky but not crash 1413 * $noCrash tests are expected to be flaky but not crash
1414 * $pass tests are expected to pass 1414 * $pass tests are expected to pass
1415 * $failOk tests are expected to fail that we won't fix 1415 * $failOk tests are expected to fail that we won't fix
1416 * $fail tests are expected to fail that we should fix 1416 * $fail tests are expected to fail that we should fix
1417 * $crash tests are expected to crash that we should fix 1417 * $crash tests are expected to crash that we should fix
1418 * $timeout tests are allowed to timeout 1418 * $timeout tests are allowed to timeout
1419 """; 1419 """;
1420 print(report); 1420 print(report);
1421 } 1421 }
1422 } 1422 }
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