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

Unified Diff: tests/corelib_2/error_stack_trace_test.dart

Issue 2987793002: Migrate test block 7 to Dart 2.0. (Closed)
Patch Set: Final review comment, dropping static multitest Created 3 years, 4 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/corelib_2/error_stack_trace2_test.dart ('k') | tests/corelib_strong/double_round2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « tests/corelib_2/error_stack_trace2_test.dart ('k') | tests/corelib_strong/double_round2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698