Index: tests/corelib_2/error_stack_trace_test.dart |
diff --git a/tests/corelib_strong/error_stack_trace_test.dart b/tests/corelib_2/error_stack_trace_test.dart |
similarity index 74% |
rename from tests/corelib_strong/error_stack_trace_test.dart |
rename to tests/corelib_2/error_stack_trace_test.dart |
index 6851f7b904ca3b4bef8f4cde944e65d733289029..41f003ec7901688d63de78e61a9e44dcb7d24827 100644 |
--- a/tests/corelib_strong/error_stack_trace_test.dart |
+++ b/tests/corelib_2/error_stack_trace_test.dart |
@@ -8,8 +8,9 @@ void argument() { |
throw new ArgumentError(499); |
} |
+// Verify that |
void noSuchMethod() { |
- (499).doesNotExist(); |
+ (499 as dynamic).doesNotExist(); |
} |
void nullThrown() { |
@@ -20,25 +21,10 @@ void range() { |
throw new RangeError.range(0, 1, 2); |
} |
-void fallThrough() { |
- nested() {} |
- |
- switch (5) { |
- case 5: |
- nested(); |
- default: |
- Expect.fail("Should not reach"); |
- } |
-} |
- |
abstract class A { |
foo(); |
} |
-void abstractClassInstantiation() { |
- new A(); |
-} |
- |
void unsupported() { |
throw new UnsupportedError("unsupported"); |
} |
@@ -48,25 +34,24 @@ void unimplemented() { |
} |
void state() { |
- return [1, 2].single; |
+ [1, 2].single; |
} |
-void type() { |
- return 1 + "string"; |
+void cast() { |
+ dynamic d = 1; |
+ d as String; |
} |
main() { |
List<Function> errorFunctions = [ |
argument, |
noSuchMethod, |
- nullThrown, |
+ nullThrown, //# nullThrown: ok |
range, |
- fallThrough, |
- abstractClassInstantiation, |
unsupported, |
unimplemented, |
state, |
- type |
+ cast, |
]; |
for (var f in errorFunctions) { |