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

Unified Diff: dart/tools/testing/dart/status_file_parser.dart

Issue 9325024: Remove "complex matching" from co19. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/tests/co19/testcfg.py ('k') | dart/tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/testing/dart/status_file_parser.dart
diff --git a/dart/tools/testing/dart/status_file_parser.dart b/dart/tools/testing/dart/status_file_parser.dart
index 6e60b7888d333fd4fa0b36556adde3bb2926d5bf..58e24831d55f2c2d489390d7f14cbcd02d3cc9b1 100644
--- a/dart/tools/testing/dart/status_file_parser.dart
+++ b/dart/tools/testing/dart/status_file_parser.dart
@@ -121,20 +121,16 @@ class TestRule {
class TestExpectations {
- bool _complexMatching;
Map _map;
bool _preprocessed = false;
Map _regExpCache;
Map _keyToRegExps;
/**
- * Create a TestExpectations object. Optionally specify
- * complexMatching behavior. See the [expectations] method
+ * Create a TestExpectations object. See the [expectations] method
* for an explanation of matching.
*/
- TestExpectations([bool complexMatching = false])
- : _complexMatching = complexMatching,
- _map = new Map();
+ TestExpectations() : _map = new Map();
/**
* Add a rule to the expectations.
@@ -159,38 +155,11 @@ class TestExpectations {
* Normal matching splits the key and the filename into path
* components and checks that the anchored regular expression
* "^$keyComponent\$" matches the corresponding filename component.
- *
- * If Complex matching is required the last filename component is
- * translated into multiple components. If the last filename
- * component starts with the second-to-last filename component that
- * part is removed from the last filename component. Then the last
- * component is split into more components at '_'s.
- *
- * Examples of complext filename component splits:
- *
- * a/b/c/d_e_f/d_e_f_A01_t01 -> ['a', 'b', 'c', 'd_e_f', 'A01', 't01']
- * a/b/c/d_e_f_A01_t01 -> ['a', 'b', 'c', 'd', 'e', 'f', 'A01', 't01']
*/
Set<String> expectations(String filename) {
var result = new Set();
var splitFilename = filename.split('/');
- // If complex matching is required split the last filename
- // component at '_'. Additionally, remove the prefix of the last
- // component if it is identical to the second-to-last component.
- if (_complexMatching && splitFilename.length >= 2) {
- var last = splitFilename.removeLast();
- var secondToLast = splitFilename.last();
- if (last.startsWith(secondToLast)) {
- last = last.substring(secondToLast.length);
- }
- last.split('_').forEach((component) {
- if (!component.isEmpty()) {
- splitFilename.add(component);
- }
- });
- }
-
// Create mapping from keys to list of RegExps once and for all.
_preprocessForMatching();
« no previous file with comments | « dart/tests/co19/testcfg.py ('k') | dart/tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698