OLD | NEW |
1 library Suites; | 1 library Suites; |
2 | 2 |
3 class Origin { | 3 class Origin { |
4 final String author; | 4 final String author; |
5 final String url; | 5 final String url; |
6 | 6 |
7 const Origin(this.author, this.url); | 7 const Origin(this.author, this.url); |
8 } | 8 } |
9 | 9 |
10 class SuiteDescription { | 10 class SuiteDescription { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 if (lib != '') { | 83 if (lib != '') { |
84 lib = '-$lib'; | 84 lib = '-$lib'; |
85 } | 85 } |
86 switch (platform) { | 86 switch (platform) { |
87 case 'js': | 87 case 'js': |
88 case 'dart': | 88 case 'dart': |
89 return path.replaceFirst('.html', '$lib.html'); | 89 return path.replaceFirst('.html', '$lib.html'); |
90 case 'dart2js': | 90 case 'dart2js': |
91 int i = path.indexOf('/'); | 91 int i = path.indexOf('/'); |
92 String topLevelDir = ''; | 92 String topLevelDir = ''; |
93 if (i != -1) topLevelDir = '${path.substring(0, i)}/'; | 93 if (i != -1) topLevelDir = '${path.substring(0, i)}'; |
94 return '$topLevelDir$platform/' | 94 return '$topLevelDir/' |
95 '${path.substring(i + 1).replaceFirst(".html", "$lib-js.html")}'; | 95 '${path.substring(i + 1).replaceFirst(".html", "$lib-js.html")}'; |
96 } | 96 } |
97 } | 97 } |
98 | 98 |
99 static var _SUITE_DESCRIPTIONS; | 99 static var _SUITE_DESCRIPTIONS; |
100 | 100 |
101 static List<SuiteDescription> get SUITE_DESCRIPTIONS { | 101 static List<SuiteDescription> get SUITE_DESCRIPTIONS { |
102 if (_SUITE_DESCRIPTIONS != null) { | 102 if (_SUITE_DESCRIPTIONS != null) { |
103 return _SUITE_DESCRIPTIONS; | 103 return _SUITE_DESCRIPTIONS; |
104 } | 104 } |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 return CATEGORIES[tags]; | 165 return CATEGORIES[tags]; |
166 } | 166 } |
167 for (final suite in _CORE_SUITE_DESCRIPTIONS) { | 167 for (final suite in _CORE_SUITE_DESCRIPTIONS) { |
168 if (suite.tags[0] == tags) { | 168 if (suite.tags[0] == tags) { |
169 return suite.name; | 169 return suite.name; |
170 } | 170 } |
171 } | 171 } |
172 return null; | 172 return null; |
173 } | 173 } |
174 } | 174 } |
OLD | NEW |