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

Unified Diff: tests/corelib/expando_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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
Index: tests/corelib/expando_test.dart
diff --git a/tests/corelib/expando_test.dart b/tests/corelib/expando_test.dart
index a7fb1c43b5e6d247574db77a81e4678feac850cd..3b604e43792f02d06ba108264f8f5fed6df866b8 100644
--- a/tests/corelib/expando_test.dart
+++ b/tests/corelib/expando_test.dart
@@ -9,10 +9,17 @@ class ExpandoTest {
static testMain() {
visits = new Expando<int>('visits');
- var legal = [ new Object(),
- new List(), [1,2,3], const [1,2,3],
- new Map(), {'x':1,'y':2}, const {'x':1,'y':2},
- new Expando(), new Expando('horse') ];
+ var legal = [
+ new Object(),
+ new List(),
+ [1, 2, 3],
+ const [1, 2, 3],
+ new Map(),
+ {'x': 1, 'y': 2},
+ const {'x': 1, 'y': 2},
+ new Expando(),
+ new Expando('horse')
+ ];
for (var object in legal) {
testNamedExpando(object);
testUnnamedExpando(object);
@@ -64,20 +71,20 @@ class ExpandoTest {
static testIllegal() {
Expando<int> expando = new Expando<int>();
- Expect.throws(() => expando[null], (exception)
- => exception is ArgumentError, "null");
- Expect.throws(() => expando['string'], (exception)
- => exception is ArgumentError, "'string'");
- Expect.throws(() => expando['string'], (exception)
- => exception is ArgumentError, "'string'");
- Expect.throws(() => expando[42], (exception)
- => exception is ArgumentError, "42");
- Expect.throws(() => expando[42.87], (exception)
- => exception is ArgumentError, "42.87");
- Expect.throws(() => expando[true], (exception)
- => exception is ArgumentError, "true");
- Expect.throws(() => expando[false], (exception)
- => exception is ArgumentError, "false");
+ Expect.throws(
+ () => expando[null], (exception) => exception is ArgumentError, "null");
+ Expect.throws(() => expando['string'],
+ (exception) => exception is ArgumentError, "'string'");
+ Expect.throws(() => expando['string'],
+ (exception) => exception is ArgumentError, "'string'");
+ Expect.throws(
+ () => expando[42], (exception) => exception is ArgumentError, "42");
+ Expect.throws(() => expando[42.87],
+ (exception) => exception is ArgumentError, "42.87");
+ Expect.throws(
+ () => expando[true], (exception) => exception is ArgumentError, "true");
+ Expect.throws(() => expando[false],
+ (exception) => exception is ArgumentError, "false");
}
static testIdentity() {
@@ -105,5 +112,5 @@ class Mutable {
int id;
Mutable(this.id);
int get hashCode => id;
- bool operator==(other) => other is Mutable && other.id == id;
+ bool operator ==(other) => other is Mutable && other.id == id;
}

Powered by Google App Engine
This is Rietveld 408576698