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

Unified Diff: tests/lib/typed_data/typed_data_sublist_type_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/typed_data/typed_data_sublist_type_test.dart
diff --git a/tests/lib/typed_data/typed_data_sublist_type_test.dart b/tests/lib/typed_data/typed_data_sublist_type_test.dart
index 2873693e1d981c216ba9f4ff25eb43e2b44ccde5..cb83dfa26a6be3eeae7b9b973740066b1caeb075 100644
--- a/tests/lib/typed_data/typed_data_sublist_type_test.dart
+++ b/tests/lib/typed_data/typed_data_sublist_type_test.dart
@@ -16,6 +16,7 @@ class Is<T> {
expect(x, part) {
Expect.isTrue(check(x), '($part: ${x.runtimeType}) is $name');
}
+
expectNot(x, part) {
Expect.isFalse(check(x), '($part: ${x.runtimeType}) is! $name');
}
@@ -41,7 +42,6 @@ void testSublistType(input, positive, all) {
for (var check in negative) check.expectNot(sub2, 'empty sublist');
}
-
void testTypes() {
var isFloat32list = new Is<Float32List>('Float32List');
var isFloat64list = new Is<Float64List>('Float64List');
@@ -60,10 +60,17 @@ void testTypes() {
var isDoubleList = new Is<List<double>>('List<double>');
var isNumList = new Is<List<num>>('List<num>');
- var allChecks = [isFloat32list, isFloat64list,
- isInt8List, isInt16List, isInt32List,
- isUint8List, isUint16List, isUint32List,
- isUint8ClampedList];
+ var allChecks = [
+ isFloat32list,
+ isFloat64list,
+ isInt8List,
+ isInt16List,
+ isInt32List,
+ isUint8List,
+ isUint16List,
+ isUint32List,
+ isUint8ClampedList
+ ];
testInt(list, check) {
testSublistType(list, [check, isIntList, isNumList], allChecks);

Powered by Google App Engine
This is Rietveld 408576698