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

Unified Diff: pkg/csslib/test/var_test.dart

Issue 22859069: Reapply "Make Map constructors return LinkedHashMap." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make map_values2_test know the order. Created 7 years, 4 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 | « pkg/analyzer_experimental/lib/src/generated/java_core.dart ('k') | pkg/polymer/test/css_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/csslib/test/var_test.dart
diff --git a/pkg/csslib/test/var_test.dart b/pkg/csslib/test/var_test.dart
index fb870c7274f11e9cf5dd750033f28ff89b9de4dd..ecbd22d69720c34cb2b9301522f68c77b58e13ee 100644
--- a/pkg/csslib/test/var_test.dart
+++ b/pkg/csslib/test/var_test.dart
@@ -207,7 +207,7 @@ div {
}
.test-2 {
- background: var(color-background) var(image-2, url('img_1.png'))
+ background: var(color-background) var(image-2, url('img_1.png'))
no-repeat right top;
}
@@ -322,38 +322,44 @@ void cyclesVar() {
expect(stylesheet != null, true);
expect(errors.length, 8, reason: errors.toString());
- expect(errors[0].toString(),
+ int testBitMap = 0;
+ var errorStrings = [
'error :14:3: var cycle detected var-six\n'
' var-six: var(four);\n'
- ' ^^^^^^^^^^^^^^^^^^');
- expect(errors[1].toString(),
+ ' ^^^^^^^^^^^^^^^^^^',
'error :18:3: var cycle detected var-def-3\n'
' var-def-3: var(def-2);\n'
- ' ^^^^^^^^^^^^^^^^^^^^^');
- expect(errors[2].toString(),
+ ' ^^^^^^^^^^^^^^^^^^^^^',
'error :10:3: var cycle detected var-two\n'
' var-two: var(one);\n'
- ' ^^^^^^^^^^^^^^^^^');
- expect(errors[3].toString(),
+ ' ^^^^^^^^^^^^^^^^^',
'error :17:3: var cycle detected var-def-2\n'
' var-def-2: var(def-3);\n'
- ' ^^^^^^^^^^^^^^^^^^^^^');
- expect(errors[4].toString(),
+ ' ^^^^^^^^^^^^^^^^^^^^^',
'error :16:3: var cycle detected var-def-1\n'
' var-def-1: var(def-2);\n'
- ' ^^^^^^^^^^^^^^^^^^^^^');
- expect(errors[5].toString(),
+ ' ^^^^^^^^^^^^^^^^^^^^^',
'error :13:3: var cycle detected var-five\n'
' var-five: var(six);\n'
- ' ^^^^^^^^^^^^^^^^^^');
- expect(errors[6].toString(),
+ ' ^^^^^^^^^^^^^^^^^^',
'error :9:3: var cycle detected var-one\n'
' var-one: var(two);\n'
- ' ^^^^^^^^^^^^^^^^^');
- expect(errors[7].toString(),
+ ' ^^^^^^^^^^^^^^^^^',
'error :12:3: var cycle detected var-four\n'
' var-four: var(five);\n'
- ' ^^^^^^^^^^^^^^^^^^^');
+ ' ^^^^^^^^^^^^^^^^^^^'
+ ];
+ outer: for (var error in errors) {
+ var errorString = error.toString();
+ for (int i = 0; i < 8; i++) {
+ if (errorString == errorStrings[i]) {
+ testBitMap |= 1 << i;
+ continue outer;
+ }
+ }
+ fail("Unexpected error string: $errorString");
+ }
+ expect(testBitMap, equals((1 << 8) - 1));
expect(prettyPrint(stylesheet), generated);
}
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/java_core.dart ('k') | pkg/polymer/test/css_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698