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

Unified Diff: test/error_test.dart

Issue 1045533002: pkg/string_scanner: code format, expanded dependency constraint on unittest (Closed) Base URL: https://github.com/dart-lang/string_scanner.git@master
Patch Set: Created 5 years, 9 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 | « pubspec.yaml ('k') | test/string_scanner_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/error_test.dart
diff --git a/test/error_test.dart b/test/error_test.dart
index 4fe9083dfbfbe633094fbe151d0241d6e1364fdf..d7b81e8121d7d7a04105b1d6520b98a6ec30f3dd 100644
--- a/test/error_test.dart
+++ b/test/error_test.dart
@@ -28,7 +28,8 @@ void main() {
});
test('supports a match on a previous line', () {
- var scanner = new StringScanner('foo bar baz\ndo re mi\nearth fire water');
+ var scanner =
+ new StringScanner('foo bar baz\ndo re mi\nearth fire water');
scanner.expect('foo bar baz\ndo ');
scanner.expect('re');
var match = scanner.lastMatch;
@@ -38,7 +39,8 @@ void main() {
});
test('supports a multiline match', () {
- var scanner = new StringScanner('foo bar baz\ndo re mi\nearth fire water');
+ var scanner =
+ new StringScanner('foo bar baz\ndo re mi\nearth fire water');
scanner.expect('foo bar ');
scanner.expect('baz\ndo');
var match = scanner.lastMatch;
@@ -81,14 +83,16 @@ void main() {
});
test('supports a position on a previous line', () {
- var scanner = new StringScanner('foo bar baz\ndo re mi\nearth fire water');
+ var scanner =
+ new StringScanner('foo bar baz\ndo re mi\nearth fire water');
scanner.expect('foo bar baz\ndo re mi\nearth');
expect(() => scanner.error('oh no!', position: 15, length: 2),
throwsStringScannerException('re'));
});
test('supports a multiline length', () {
- var scanner = new StringScanner('foo bar baz\ndo re mi\nearth fire water');
+ var scanner =
+ new StringScanner('foo bar baz\ndo re mi\nearth fire water');
scanner.expect('foo bar baz\ndo re mi\nearth');
expect(() => scanner.error('oh no!', position: 8, length: 8),
throwsStringScannerException('baz\ndo r'));
@@ -121,8 +125,7 @@ void main() {
});
test("if match is passed with length", () {
- expect(
- () => scanner.error("oh no!", match: scanner.lastMatch, length: 1),
+ expect(() => scanner.error("oh no!", match: scanner.lastMatch, length: 1),
throwsArgumentError);
});
« no previous file with comments | « pubspec.yaml ('k') | test/string_scanner_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698