Index: tests/language/instanceof_optimized_test.dart |
diff --git a/tests/language/instanceof_optimized_test.dart b/tests/language/instanceof_optimized_test.dart |
index 820504f1b1fbfbf5fda52f13e6b62cc590a72aa3..3c3f875b6a97017b64fa9d957330437f18c78e58 100644 |
--- a/tests/language/instanceof_optimized_test.dart |
+++ b/tests/language/instanceof_optimized_test.dart |
@@ -6,10 +6,8 @@ |
import "package:expect/expect.dart"; |
- |
bool isInt(x) => x is int; |
- |
int isIntRes(x) { |
if (x is int) { |
return 1; |
@@ -18,7 +16,6 @@ int isIntRes(x) { |
} |
} |
- |
int isNotIntRes(x) { |
if (x is! int) { |
return 1; |
@@ -27,16 +24,12 @@ int isNotIntRes(x) { |
} |
} |
- |
int isIfThenElseIntRes(x) { |
- return x is int ? 1 : 0; |
+ return x is int ? 1 : 0; |
} |
- |
- |
bool isString(x) => x is String; |
- |
int isStringRes(x) { |
if (x is String) { |
return 1; |
@@ -45,7 +38,6 @@ int isStringRes(x) { |
} |
} |
- |
int isNotStringRes(x) { |
if (x is! String) { |
return 1; |
@@ -54,12 +46,11 @@ int isNotStringRes(x) { |
} |
} |
- |
main() { |
for (int i = 0; i < 20; i++) { |
Expect.isFalse(isInt(3.2)); |
Expect.isTrue(isInt(3)); |
- Expect.isTrue(isInt(17179869184)); // Mint on ia32. |
+ Expect.isTrue(isInt(17179869184)); // Mint on ia32. |
Expect.isFalse(isString(2.0)); |
Expect.isTrue(isString("Morgan")); |
} |
@@ -69,7 +60,7 @@ main() { |
for (int i = 0; i < 20; i++) { |
Expect.isFalse(isInt(3.2)); |
Expect.isTrue(isInt(3)); |
- Expect.isTrue(isInt(17179869184)); // Mint on ia32. |
+ Expect.isTrue(isInt(17179869184)); // Mint on ia32. |
Expect.isFalse(isInt("hu")); |
Expect.isFalse(isString(2.0)); |
Expect.isTrue(isString("Morgan")); |
@@ -107,4 +98,4 @@ main() { |
Expect.equals(0, isNotStringRes("Lotus")); |
Expect.equals(1, isNotStringRes(null)); |
} |
-} |
+} |