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

Unified Diff: runtime/vm/isolate_reload_test.cc

Issue 2147293002: Rebinding super calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Implement rebinding super calls after hot reload. Created 4 years, 5 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 | « no previous file | runtime/vm/object_reload.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate_reload_test.cc
diff --git a/runtime/vm/isolate_reload_test.cc b/runtime/vm/isolate_reload_test.cc
index aa8f1888756fbf64815446179f744be77d3b0970..bf239c92091b0950f01a76ed025d755367968def 100644
--- a/runtime/vm/isolate_reload_test.cc
+++ b/runtime/vm/isolate_reload_test.cc
@@ -1187,6 +1187,50 @@ TEST_CASE(IsolateReload_PendingStaticCall_NSMToDefined) {
}
+TEST_CASE(IsolateReload_PendingSuperCall) {
+ const char* kScript =
+ "import 'test:isolate_reload_helper';\n"
+ "class S {\n"
+ " foo() => 1;\n"
+ "}\n"
+ "class C extends S {\n"
+ " foo() => 100;\n"
+ " test() {\n"
+ " var n = super.foo();\n"
+ " reloadTest();\n"
+ " return n + super.foo();\n"
+ " }\n"
+ "}\n"
+ "main() {\n"
+ " return new C().test();\n"
+ "}\n";
+
+ Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+
+ const char* kReloadScript =
+ "import 'test:isolate_reload_helper';\n"
+ "class S {\n"
+ " foo() => 10;\n"
+ "}\n"
+ "class C extends S {\n"
+ " foo() => 100;\n"
+ " test() {\n"
+ " var n = super.foo();\n"
+ " reloadTest();\n"
+ " return n + super.foo();\n"
+ " }\n"
+ "}\n"
+ "main() {\n"
+ " return new C().test();\n"
+ "}\n";
+
+ TestCase::SetReloadTestScript(kReloadScript);
+
+ EXPECT_EQ(11, SimpleInvoke(lib, "main"));
+}
+
+
TEST_CASE(IsolateReload_EnumEquality) {
const char* kScript =
"enum Fruit {\n"
« no previous file with comments | « no previous file | runtime/vm/object_reload.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698