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

Unified Diff: tests/html/js_array_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/html/js_array_test.dart
diff --git a/tests/html/js_array_test.dart b/tests/html/js_array_test.dart
index 753ced3ba289e2ec0f4d7423603ada4780f75785..d4d086b71d2b8587bff5f61428c3a2398cab843b 100644
--- a/tests/html/js_array_test.dart
+++ b/tests/html/js_array_test.dart
@@ -250,7 +250,8 @@ external getValue(obj, index);
external setValue(obj, index, value);
@JS()
-external callListMethodOnTarget(List target, object, String methodName, List args);
+external callListMethodOnTarget(
+ List target, object, String methodName, List args);
@JS()
external newArray();
@@ -455,8 +456,7 @@ main() {
group("js snippet tests", () {
test("enumerate indices", () {
var list = ["a", "b", "c", "d"];
- var indices =
- jsEnumerateIndices(list);
+ var indices = jsEnumerateIndices(list);
expect(indices.length, equals(4));
for (int i = 0; i < 4; i++) {
expect(indices[i], equals('$i'));
@@ -483,19 +483,13 @@ main() {
test("get element", () {
var list = ["a", "b", "c", "d"];
- expect(getValue(list, 0),
- equals("a"));
- expect(getValue(list, 1),
- equals("b"));
- expect(getValue(list, 6),
- equals(null));
- expect(getValue(list, -1),
- equals(null));
+ expect(getValue(list, 0), equals("a"));
+ expect(getValue(list, 1), equals("b"));
+ expect(getValue(list, 6), equals(null));
+ expect(getValue(list, -1), equals(null));
- expect(getValue(list, "0"),
- equals("a"));
- expect(getValue(list, "1"),
- equals("b"));
+ expect(getValue(list, "0"), equals("a"));
+ expect(getValue(list, "1"), equals("b"));
});
test("is array", () {
@@ -562,40 +556,25 @@ main() {
});
test("every greater than zero", () {
- expect(
- everyGreaterThanZero([1, 5]),
- isTrue);
- expect(
- everyGreaterThanZeroCheckThisArg([1, 5]),
- isTrue);
- expect(
- everyGreaterThanZero([1, 0]),
- isFalse);
- expect(everyGreaterThanZero([]),
- isTrue);
+ expect(everyGreaterThanZero([1, 5]), isTrue);
+ expect(everyGreaterThanZeroCheckThisArg([1, 5]), isTrue);
+ expect(everyGreaterThanZero([1, 0]), isFalse);
+ expect(everyGreaterThanZero([]), isTrue);
});
test("filter greater than 42", () {
expect(filterGreater42([1, 5]), equals([]));
- expect(
- filterGreater42([43, 5, 49]),
- equals([43, 49]));
- expect(
- filterGreater42(["43", "5", "49"]),
- equals(["43", "49"]));
+ expect(filterGreater42([43, 5, 49]), equals([43, 49]));
+ expect(filterGreater42(["43", "5", "49"]), equals(["43", "49"]));
});
test("for each collect result", () {
- expect(
- forEachCollectResult([1, 5, 7]),
- equals([2, 10, 14]));
+ expect(forEachCollectResult([1, 5, 7]), equals([2, 10, 14]));
});
test("some", () {
- expect(someEqual42([1, 5, 9]),
- isFalse);
- expect(someEqual42([1, 42, 9]),
- isTrue);
+ expect(someEqual42([1, 5, 9]), isFalse);
+ expect(someEqual42([1, 42, 9]), isTrue);
});
test("sort backwards", () {

Powered by Google App Engine
This is Rietveld 408576698