Index: packages/csslib/test/error_test.dart |
diff --git a/packages/csslib/test/error_test.dart b/packages/csslib/test/error_test.dart |
index 1060d83556514e72fe40b84cbb501bc28eedda0e..013865e3e6dcaa36a41f9baef48b4c4b5775dc9f 100644 |
--- a/packages/csslib/test/error_test.dart |
+++ b/packages/csslib/test/error_test.dart |
@@ -21,17 +21,13 @@ void testUnsupportedFontWeights() { |
var stylesheet = parseCss(input, errors: errors); |
expect(errors.isEmpty, false); |
- expect( |
- errors[0].toString(), |
- r''' |
+ expect(errors[0].toString(), r''' |
error on line 1, column 24: Unknown property value bolder |
.foobar { font-weight: bolder; } |
^^^^^^'''); |
expect(stylesheet != null, true); |
- expect( |
- prettyPrint(stylesheet), |
- r''' |
+ expect(prettyPrint(stylesheet), r''' |
.foobar { |
font-weight: bolder; |
}'''); |
@@ -42,16 +38,12 @@ error on line 1, column 24: Unknown property value bolder |
stylesheet = parseCss(input, errors: errors..clear()); |
expect(errors.isEmpty, false); |
- expect( |
- errors[0].toString(), |
- r''' |
+ expect(errors[0].toString(), r''' |
error on line 1, column 24: Unknown property value lighter |
.foobar { font-weight: lighter; } |
^^^^^^^'''); |
expect(stylesheet != null, true); |
- expect( |
- prettyPrint(stylesheet), |
- r''' |
+ expect(prettyPrint(stylesheet), r''' |
.foobar { |
font-weight: lighter; |
}'''); |
@@ -62,16 +54,12 @@ error on line 1, column 24: Unknown property value lighter |
stylesheet = parseCss(input, errors: errors..clear()); |
expect(errors.isEmpty, false); |
- expect( |
- errors[0].toString(), |
- r''' |
+ expect(errors[0].toString(), r''' |
error on line 1, column 24: Unknown property value inherit |
.foobar { font-weight: inherit; } |
^^^^^^^'''); |
expect(stylesheet != null, true); |
- expect( |
- prettyPrint(stylesheet), |
- r''' |
+ expect(prettyPrint(stylesheet), r''' |
.foobar { |
font-weight: inherit; |
}'''); |
@@ -89,16 +77,12 @@ void testUnsupportedLineHeights() { |
var stylesheet = parseCss(input, errors: errors); |
expect(errors.isEmpty, false); |
- expect( |
- errors[0].toString(), |
- r''' |
+ expect(errors[0].toString(), r''' |
error on line 1, column 24: Unexpected value for line-height |
.foobar { line-height: 120%; } |
^^^'''); |
expect(stylesheet != null, true); |
- expect( |
- prettyPrint(stylesheet), |
- r''' |
+ expect(prettyPrint(stylesheet), r''' |
.foobar { |
line-height: 120%; |
}'''); |
@@ -109,16 +93,12 @@ error on line 1, column 24: Unexpected value for line-height |
stylesheet = parseCss(input, errors: errors..clear()); |
expect(errors.isEmpty, false); |
- expect( |
- errors[0].toString(), |
- r''' |
+ expect(errors[0].toString(), r''' |
error on line 1, column 24: Unexpected unit for line-height |
.foobar { line-height: 20cm; } |
^^'''); |
expect(stylesheet != null, true); |
- expect( |
- prettyPrint(stylesheet), |
- r''' |
+ expect(prettyPrint(stylesheet), r''' |
.foobar { |
line-height: 20cm; |
}'''); |
@@ -129,16 +109,12 @@ error on line 1, column 24: Unexpected unit for line-height |
stylesheet = parseCss(input, errors: errors..clear()); |
expect(errors.isEmpty, false); |
- expect( |
- errors[0].toString(), |
- r''' |
+ expect(errors[0].toString(), r''' |
error on line 1, column 24: Unknown property value inherit |
.foobar { line-height: inherit; } |
^^^^^^^'''); |
expect(stylesheet != null, true); |
- expect( |
- prettyPrint(stylesheet), |
- r''' |
+ expect(prettyPrint(stylesheet), r''' |
.foobar { |
line-height: inherit; |
}'''); |
@@ -153,16 +129,12 @@ void testBadSelectors() { |
var stylesheet = parseCss(input, errors: errors); |
expect(errors.isEmpty, false); |
- expect( |
- errors[0].toString(), |
- r''' |
+ expect(errors[0].toString(), r''' |
error on line 1, column 1: Not a valid ID selector expected #id |
# foo { color: #ff00ff; } |
^'''); |
expect(stylesheet != null, true); |
- expect( |
- prettyPrint(stylesheet), |
- r''' |
+ expect(prettyPrint(stylesheet), r''' |
# foo { |
color: #f0f; |
}'''); |
@@ -172,16 +144,12 @@ error on line 1, column 1: Not a valid ID selector expected #id |
stylesheet = parseCss(input, errors: errors..clear()); |
expect(errors.isEmpty, false); |
- expect( |
- errors[0].toString(), |
- r''' |
+ expect(errors[0].toString(), r''' |
error on line 1, column 1: Not a valid class selector expected .className |
. foo { color: #ff00ff; } |
^'''); |
expect(stylesheet != null, true); |
- expect( |
- prettyPrint(stylesheet), |
- r''' |
+ expect(prettyPrint(stylesheet), r''' |
. foo { |
color: #f0f; |
}'''); |
@@ -196,16 +164,12 @@ void testBadHexValues() { |
var stylesheet = parseCss(input, errors: errors); |
expect(errors.isEmpty, false); |
- expect( |
- errors[0].toString(), |
- r''' |
+ expect(errors[0].toString(), r''' |
error on line 1, column 18: Bad hex number |
.foobar { color: #AH787; } |
^^^^^^'''); |
expect(stylesheet != null, true); |
- expect( |
- prettyPrint(stylesheet), |
- r''' |
+ expect(prettyPrint(stylesheet), r''' |
.foobar { |
color: #AH787; |
}'''); |
@@ -215,17 +179,13 @@ error on line 1, column 18: Bad hex number |
stylesheet = parseCss(input, errors: errors..clear()); |
expect(errors.isEmpty, false); |
- expect( |
- errors[0].toString(), |
- r''' |
+ expect(errors[0].toString(), r''' |
error on line 1, column 18: Unknown property value redder |
.foobar { color: redder; } |
^^^^^^'''); |
expect(stylesheet != null, true); |
- expect( |
- prettyPrint(stylesheet), |
- r''' |
+ expect(prettyPrint(stylesheet), r''' |
.foobar { |
color: redder; |
}'''); |
@@ -235,17 +195,13 @@ error on line 1, column 18: Unknown property value redder |
stylesheet = parseCss(input, errors: errors..clear()); |
expect(errors.isEmpty, false); |
- expect( |
- errors[0].toString(), |
- r''' |
+ expect(errors[0].toString(), r''' |
error on line 1, column 18: Expected hex number |
.foobar { color: # ffffff; } |
^'''); |
expect(stylesheet != null, true); |
- expect( |
- prettyPrint(stylesheet), |
- r''' |
+ expect(prettyPrint(stylesheet), r''' |
.foobar { |
color: # ffffff; |
}'''); |
@@ -255,9 +211,7 @@ error on line 1, column 18: Expected hex number |
stylesheet = parseCss(input, errors: errors..clear()); |
expect(errors.isEmpty, false); |
- expect( |
- errors[0].toString(), |
- r''' |
+ expect(errors[0].toString(), r''' |
error on line 1, column 18: Expected hex number |
.foobar { color: # 123fff; } |
^'''); |
@@ -266,9 +220,7 @@ error on line 1, column 18: Expected hex number |
// Formating is off with an extra space. However, the entire value is bad |
// and isn't processed anyway. |
- expect( |
- prettyPrint(stylesheet), |
- r''' |
+ expect(prettyPrint(stylesheet), r''' |
.foobar { |
color: # 123 fff; |
}'''); |