| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 140 |
| 141 bool match(suite) { | 141 bool match(suite) { |
| 142 // If any conjunction matches, return true. | 142 // If any conjunction matches, return true. |
| 143 for (final tagset in taglist) { | 143 for (final tagset in taglist) { |
| 144 if (tagset.every((tag) => suite.tags.indexOf(tag) >= 0)) { | 144 if (tagset.every((tag) => suite.tags.indexOf(tag) >= 0)) { |
| 145 return true; | 145 return true; |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 return false; | 148 return false; |
| 149 } | 149 } |
| 150 final suites = SUITE_DESCRIPTIONS.where(match); | 150 final suites = SUITE_DESCRIPTIONS.where(match).toList(); |
| 151 | 151 |
| 152 suites.sort((s1, s2) => s1.name.compareTo(s2.name)); | 152 suites.sort((s1, s2) => s1.name.compareTo(s2.name)); |
| 153 return suites; | 153 return suites; |
| 154 } | 154 } |
| 155 | 155 |
| 156 static getCategory(String tags) { | 156 static getCategory(String tags) { |
| 157 if (CATEGORIES.containsKey(tags)) { | 157 if (CATEGORIES.containsKey(tags)) { |
| 158 return CATEGORIES[tags]; | 158 return CATEGORIES[tags]; |
| 159 } | 159 } |
| 160 for (final suite in _CORE_SUITE_DESCRIPTIONS) { | 160 for (final suite in _CORE_SUITE_DESCRIPTIONS) { |
| 161 if (suite.tags[0] == tags) { | 161 if (suite.tags[0] == tags) { |
| 162 return suite.name; | 162 return suite.name; |
| 163 } | 163 } |
| 164 } | 164 } |
| 165 return null; | 165 return null; |
| 166 } | 166 } |
| 167 } | 167 } |
| OLD | NEW |