Index: runtime/vm/isolate_reload_test.cc |
diff --git a/runtime/vm/isolate_reload_test.cc b/runtime/vm/isolate_reload_test.cc |
index d0606800ec541ad349b5b8ae5bfe47c3bed68f2e..a2f1a99c4d6a8104867ca680a124b1e76aec1a2b 100644 |
--- a/runtime/vm/isolate_reload_test.cc |
+++ b/runtime/vm/isolate_reload_test.cc |
@@ -1003,11 +1003,11 @@ TEST_CASE(IsolateReload_PendingUnqualifiedCall_StaticToInstance) { |
TestCase::SetReloadTestScript(kReloadScript); |
- EXPECT_EQ("instance", SimpleInvokeStr(lib, "main")); |
+ EXPECT_STREQ("instance", SimpleInvokeStr(lib, "main")); |
lib = TestCase::GetReloadErrorOrRootLibrary(); |
EXPECT_VALID(lib); |
- EXPECT_EQ("instance", SimpleInvokeStr(lib, "main")); |
+ EXPECT_STREQ("instance", SimpleInvokeStr(lib, "main")); |
} |
@@ -1043,11 +1043,11 @@ TEST_CASE(IsolateReload_PendingUnqualifiedCall_InstanceToStatic) { |
TestCase::SetReloadTestScript(kReloadScript); |
- EXPECT_EQ("static", SimpleInvokeStr(lib, "main")); |
+ EXPECT_STREQ("static", SimpleInvokeStr(lib, "main")); |
lib = TestCase::GetReloadErrorOrRootLibrary(); |
EXPECT_VALID(lib); |
- EXPECT_EQ("static", SimpleInvokeStr(lib, "main")); |
+ EXPECT_STREQ("static", SimpleInvokeStr(lib, "main")); |
} |
@@ -1093,11 +1093,11 @@ TEST_CASE(IsolateReload_PendingConstructorCall_AbstractToConcrete) { |
TestCase::SetReloadTestScript(kReloadScript); |
- EXPECT_EQ("okay", SimpleInvokeStr(lib, "main")); |
+ EXPECT_STREQ("okay", SimpleInvokeStr(lib, "main")); |
lib = TestCase::GetReloadErrorOrRootLibrary(); |
EXPECT_VALID(lib); |
- EXPECT_EQ("okay", SimpleInvokeStr(lib, "main")); |
+ EXPECT_STREQ("okay", SimpleInvokeStr(lib, "main")); |
} |
@@ -1143,11 +1143,11 @@ TEST_CASE(IsolateReload_PendingConstructorCall_ConcreteToAbstract) { |
TestCase::SetReloadTestScript(kReloadScript); |
- EXPECT_EQ("exception", SimpleInvokeStr(lib, "main")); |
+ EXPECT_STREQ("exception", SimpleInvokeStr(lib, "main")); |
lib = TestCase::GetReloadErrorOrRootLibrary(); |
EXPECT_VALID(lib); |
- EXPECT_EQ("exception", SimpleInvokeStr(lib, "main")); |
+ EXPECT_STREQ("exception", SimpleInvokeStr(lib, "main")); |
} |
@@ -1190,11 +1190,11 @@ TEST_CASE(IsolateReload_PendingStaticCall_DefinedToNSM) { |
TestCase::SetReloadTestScript(kReloadScript); |
- EXPECT_EQ("exception", SimpleInvokeStr(lib, "main")); |
+ EXPECT_STREQ("exception", SimpleInvokeStr(lib, "main")); |
lib = TestCase::GetReloadErrorOrRootLibrary(); |
EXPECT_VALID(lib); |
- EXPECT_EQ("exception", SimpleInvokeStr(lib, "main")); |
+ EXPECT_STREQ("exception", SimpleInvokeStr(lib, "main")); |
} |
@@ -1237,11 +1237,11 @@ TEST_CASE(IsolateReload_PendingStaticCall_NSMToDefined) { |
TestCase::SetReloadTestScript(kReloadScript); |
- EXPECT_EQ("static", SimpleInvokeStr(lib, "main")); |
+ EXPECT_STREQ("static", SimpleInvokeStr(lib, "main")); |
lib = TestCase::GetReloadErrorOrRootLibrary(); |
EXPECT_VALID(lib); |
- EXPECT_EQ("static", SimpleInvokeStr(lib, "main")); |
+ EXPECT_STREQ("static", SimpleInvokeStr(lib, "main")); |
} |
@@ -1289,6 +1289,46 @@ TEST_CASE(IsolateReload_PendingSuperCall) { |
} |
+TEST_CASE(IsolateReload_TearOff_Equality) { |
+ const char* kScript = |
+ "import 'test:isolate_reload_helper';\n" |
+ "class C {\n" |
+ " foo() => 'old';\n" |
+ "}\n" |
+ "main() {\n" |
+ " var c = new C();\n" |
+ " var f1 = c.foo;\n" |
+ " reloadTest();\n" |
+ " var f2 = c.foo;\n" |
+ " return '${f1()} ${f2()} ${f1 == f2} ${identical(f1, f2)}';\n" |
+ "}\n"; |
+ |
+ Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL); |
+ EXPECT_VALID(lib); |
+ |
+ const char* kReloadScript = |
+ "import 'test:isolate_reload_helper';\n" |
+ "class C {\n" |
+ " foo() => 'new';\n" |
+ "}\n" |
+ "main() {\n" |
+ " var c = new C();\n" |
+ " var f1 = c.foo;\n" |
+ " reloadTest();\n" |
+ " var f2 = c.foo;\n" |
+ " return '${f1()} ${f2()} ${f1 == f2} ${identical(f1, f2)}';\n" |
+ "}\n"; |
+ |
+ TestCase::SetReloadTestScript(kReloadScript); |
+ |
+ EXPECT_STREQ("new new true false", SimpleInvokeStr(lib, "main")); |
+ |
+ lib = TestCase::GetReloadErrorOrRootLibrary(); |
+ EXPECT_VALID(lib); |
+} |
+ |
+ |
+ |
TEST_CASE(IsolateReload_EnumEquality) { |
const char* kScript = |
"enum Fruit {\n" |