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

Unified Diff: tests/compiler/dart2js/no_such_method_enabled_test.dart

Issue 1005873009: Fix check for throwing NSM implementations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | « pkg/compiler/lib/src/js_backend/no_such_method_registry.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/no_such_method_enabled_test.dart
diff --git a/tests/compiler/dart2js/no_such_method_enabled_test.dart b/tests/compiler/dart2js/no_such_method_enabled_test.dart
index 927396c0f4dd8b2a09225ecf9f2e5e1a4c0bf6f5..c9da1a05f9fb8b4a00f897e3555a378dab0dca31 100644
--- a/tests/compiler/dart2js/no_such_method_enabled_test.dart
+++ b/tests/compiler/dart2js/no_such_method_enabled_test.dart
@@ -209,6 +209,28 @@ main() {
}));
}
+dummyImplTest10() {
+ String source = """
+class A {
+ noSuchMethod(Invocation x) {
+ throw new UnsupportedException();
+ }
+}
+main() {
+ print(new A().foo());
+}
+""";
+ Uri uri = new Uri(scheme: 'source');
+ var compiler = compilerFor(source, uri);
+ asyncTest(() => compiler.runCompiler(uri).then((_) {
+ Expect.isTrue(compiler.backend.enabledNoSuchMethod);
+ ClassElement clsA = findElement(compiler, 'A');
+ Expect.isTrue(
+ compiler.backend.noSuchMethodRegistry.throwingImpls.contains(
+ clsA.lookupMember('noSuchMethod')));
+ }));
+}
+
main() {
dummyImplTest();
dummyImplTest2();
@@ -219,4 +241,5 @@ main() {
dummyImplTest7();
dummyImplTest8();
dummyImplTest9();
+ dummyImplTest10();
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/no_such_method_registry.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698