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

Unified Diff: tests/lib_strong/mirrors/enum_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/lib_strong/mirrors/enum_test.dart
diff --git a/tests/lib_strong/mirrors/enum_test.dart b/tests/lib_strong/mirrors/enum_test.dart
index 815d167997b05e026d0c4f68dafcde15a916de16..318bfe63711029cb81b067cc51c3369dc7bf6421 100644
--- a/tests/lib_strong/mirrors/enum_test.dart
+++ b/tests/lib_strong/mirrors/enum_test.dart
@@ -9,6 +9,7 @@ import 'package:expect/expect.dart';
import 'stringify.dart';
class C {}
+
enum Suite { CLUBS, DIAMONDS, SPADES, HEARTS }
main() {
@@ -16,12 +17,18 @@ main() {
Expect.isTrue(reflectClass(Suite).isEnum);
Expect.isFalse(reflectClass(Suite).isAbstract);
- Expect.equals(0, reflectClass(Suite).declarations.values.where(
- (d) => d is MethodMirror && d.isConstructor).length);
+ Expect.equals(
+ 0,
+ reflectClass(Suite)
+ .declarations
+ .values
+ .where((d) => d is MethodMirror && d.isConstructor)
+ .length);
- Expect.equals(reflectClass(Suite),
- (reflectClass(C).owner as LibraryMirror).declarations[#Suite],
- "found in library");
+ Expect.equals(
+ reflectClass(Suite),
+ (reflectClass(C).owner as LibraryMirror).declarations[#Suite],
+ "found in library");
Expect.equals(reflectClass(Suite), reflect(Suite.CLUBS).type);
@@ -30,24 +37,29 @@ main() {
Expect.equals(2, reflect(Suite.SPADES).getField(#index).reflectee);
Expect.equals(3, reflect(Suite.HEARTS).getField(#index).reflectee);
- Expect.equals("Suite.CLUBS",
- reflect(Suite.CLUBS).invoke(#toString, []).reflectee);
+ Expect.equals(
+ "Suite.CLUBS", reflect(Suite.CLUBS).invoke(#toString, []).reflectee);
Expect.equals("Suite.DIAMONDS",
- reflect(Suite.DIAMONDS).invoke(#toString, []).reflectee);
- Expect.equals("Suite.SPADES",
- reflect(Suite.SPADES).invoke(#toString, []).reflectee);
- Expect.equals("Suite.HEARTS",
- reflect(Suite.HEARTS).invoke(#toString, []).reflectee);
-
- Expect.setEquals(
- ['Variable(s(index) in s(Suite), final)',
- 'Variable(s(CLUBS) in s(Suite), static, final)',
- 'Variable(s(DIAMONDS) in s(Suite), static, final)',
- 'Variable(s(SPADES) in s(Suite), static, final)',
- 'Variable(s(HEARTS) in s(Suite), static, final)',
- 'Variable(s(values) in s(Suite), static, final)',
- 'Method(s(hashCode) in s(Suite), getter)',
- 'Method(s(toString) in s(Suite))'],
- reflectClass(Suite).declarations.values
- .where((d) => !d.isPrivate).map(stringify));
+ reflect(Suite.DIAMONDS).invoke(#toString, []).reflectee);
+ Expect.equals(
+ "Suite.SPADES", reflect(Suite.SPADES).invoke(#toString, []).reflectee);
+ Expect.equals(
+ "Suite.HEARTS", reflect(Suite.HEARTS).invoke(#toString, []).reflectee);
+
+ Expect.setEquals(
+ [
+ 'Variable(s(index) in s(Suite), final)',
+ 'Variable(s(CLUBS) in s(Suite), static, final)',
+ 'Variable(s(DIAMONDS) in s(Suite), static, final)',
+ 'Variable(s(SPADES) in s(Suite), static, final)',
+ 'Variable(s(HEARTS) in s(Suite), static, final)',
+ 'Variable(s(values) in s(Suite), static, final)',
+ 'Method(s(hashCode) in s(Suite), getter)',
+ 'Method(s(toString) in s(Suite))'
+ ],
+ reflectClass(Suite)
+ .declarations
+ .values
+ .where((d) => !d.isPrivate)
+ .map(stringify));
}

Powered by Google App Engine
This is Rietveld 408576698