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

Unified Diff: runtime/vm/isolate_reload_test.cc

Issue 2070873002: Bug fixes for hot reload (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix an error message Created 4 years, 6 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
Index: runtime/vm/isolate_reload_test.cc
diff --git a/runtime/vm/isolate_reload_test.cc b/runtime/vm/isolate_reload_test.cc
index 9b4504673ac4722ba8b75b64a01f2160c1670ebc..aa8f1888756fbf64815446179f744be77d3b0970 100644
--- a/runtime/vm/isolate_reload_test.cc
+++ b/runtime/vm/isolate_reload_test.cc
@@ -228,6 +228,38 @@ TEST_CASE(IsolateReload_ClassFieldAdded) {
}
+TEST_CASE(IsolateReload_ClassFieldAdded2) {
+ const char* kScript =
+ "class Foo {\n"
+ " var x;\n"
+ " var y;\n"
+ "}\n"
+ "main() {\n"
+ " new Foo();\n"
+ " return 44;\n"
+ "}\n";
+
+ Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+
+ EXPECT_EQ(44, SimpleInvoke(lib, "main"));
+
+ const char* kReloadScript =
+ "class Foo {\n"
+ " var x;\n"
+ " var y;\n"
+ " var z;\n"
+ "}\n"
+ "main() {\n"
+ " new Foo();\n"
+ " return 44;\n"
+ "}\n";
+
+ lib = TestCase::ReloadTestScript(kReloadScript);
+ EXPECT_ERROR(lib, "Number of instance fields changed");
+}
+
+
TEST_CASE(IsolateReload_ClassFieldRemoved) {
const char* kScript =
"class Foo {\n"
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/json_stream.h » ('j') | runtime/vm/service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698