Index: tests/language_strong/instanceof_optimized_test.dart |
diff --git a/tests/language_strong/instanceof_optimized_test.dart b/tests/language_strong/instanceof_optimized_test.dart |
index e3f5965071620249b2dfb4ba927f30b892044543..7b7df19a2efe099791bd194ea0081d77b5887ecc 100644 |
--- a/tests/language_strong/instanceof_optimized_test.dart |
+++ b/tests/language_strong/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)); |
} |
-} |
+} |