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

Unified Diff: tests/language/null_bottom_test.dart

Issue 2770063002: Revert "Format all multitests" (Closed)
Patch Set: Created 3 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 | « tests/language/not_enough_positional_arguments_test.dart ('k') | tests/language/null_is_bottom_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/null_bottom_test.dart
diff --git a/tests/language/null_bottom_test.dart b/tests/language/null_bottom_test.dart
index f1288b741f29f35ea5a70d8720971c027168eadb..e13ad67f5a9719598ea5ec35ba85c860679c23af 100644
--- a/tests/language/null_bottom_test.dart
+++ b/tests/language/null_bottom_test.dart
@@ -7,11 +7,7 @@ import "package:expect/expect.dart";
// Test that `Null` acts like the bottom type - less than any other type.
-bool isCheckedMode = () {
- bool c = false;
- assert(c = true);
- return c;
-}();
+bool isCheckedMode = () { bool c = false; assert(c = true); return c; } ();
typedef R Fun<A, R>(A argument);
@@ -64,8 +60,8 @@ void testClassTypes() {
C<Null> x1 = cn;
C<Object> x2 = cn;
- Expect.identical(x1, cn);
- Expect.identical(x2, cn);
+ Expect.identical(x1 , cn);
+ Expect.identical(x2 , cn);
const C<Null> cocn = const C<Null>();
const C<Object> coco = cocn;
@@ -76,18 +72,18 @@ void testClassTypes() {
Expect.throws(() {
Null x = "string" as dynamic;
- use(x); // Avoid "x unused" warning.
+ use(x); // Avoid "x unused" warning.
});
Expect.throws(() {
Null x = new Object();
- use(x); // Avoid "x unused" warning.
+ use(x); // Avoid "x unused" warning.
});
- NullBound<int> nb = new NullBound<Null>(); // Should not fail.
- use(nb); // Avoid "nb unused" warning.
- ListBound<List<Null>> lb = new ListBound<Null>(); // Should not fails
- use(lb); // Avoid "nb unused" warning.
+ NullBound<int> nb = new NullBound<Null>(); // Should not fail.
+ use(nb); // Avoid "nb unused" warning.
+ ListBound<List<Null>> lb = new ListBound<Null>(); // Should not fails
+ use(lb); // Avoid "nb unused" warning.
}
void testFunctionTypes() {
@@ -110,13 +106,13 @@ void testFunctionTypes() {
Expect.isTrue(((int _) => null) is Fun<int, Null>);
Null fun(int x) => null;
- Fun<Null, int> fun2 = fun; // Safe assignment.
+ Fun<Null, int> fun2 = fun; // Safe assignment.
if (fun2 is Fun<int, Null>) {
// If int->Null is *subtype* of Null->int (which it should be),
// then type promotion succeeds.
// If type promotion succeeds, the static type is int->Null, otherwise
// it's Null->int.
- fun2(42); // Should not give a warning after type promotion.
+ fun2(42); // Should not give a warning after type promotion.
fun2(null).abs(); // //# 03: runtime error
}
}
« no previous file with comments | « tests/language/not_enough_positional_arguments_test.dart ('k') | tests/language/null_is_bottom_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698