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

Unified Diff: runtime/vm/isolate_reload_test.cc

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 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 | « runtime/vm/isolate_reload.cc ('k') | runtime/vm/isolate_test.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 218ecb142b22f95fe02fb028b373967c8910ce9b..574384e405f8a2be5cdaacb488583f5306ae2e70 100644
--- a/runtime/vm/isolate_reload_test.cc
+++ b/runtime/vm/isolate_reload_test.cc
@@ -31,7 +31,6 @@ int64_t SimpleInvoke(Dart_Handle lib, const char* method) {
return integer_result;
}
-
const char* SimpleInvokeStr(Dart_Handle lib, const char* method) {
Dart_Handle result = Dart_Invoke(lib, NewString(method), 0, NULL);
const char* result_str = NULL;
@@ -40,14 +39,12 @@ const char* SimpleInvokeStr(Dart_Handle lib, const char* method) {
return result_str;
}
-
Dart_Handle SimpleInvokeError(Dart_Handle lib, const char* method) {
Dart_Handle result = Dart_Invoke(lib, NewString(method), 0, NULL);
EXPECT(Dart_IsError(result));
return result;
}
-
TEST_CASE(IsolateReload_FunctionReplacement) {
const char* kScript =
"main() {\n"
@@ -70,7 +67,6 @@ TEST_CASE(IsolateReload_FunctionReplacement) {
EXPECT_EQ(10, SimpleInvoke(lib, "main"));
}
-
TEST_CASE(IsolateReload_BadClass) {
const char* kScript =
"class Foo {\n"
@@ -102,7 +98,6 @@ TEST_CASE(IsolateReload_BadClass) {
EXPECT_EQ(4, SimpleInvoke(lib, "main"));
}
-
TEST_CASE(IsolateReload_StaticValuePreserved) {
const char* kScript =
"init() => 'old value';\n"
@@ -130,7 +125,6 @@ TEST_CASE(IsolateReload_StaticValuePreserved) {
SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_SavedClosure) {
// Create a closure in main which only exists in the original source.
const char* kScript =
@@ -165,7 +159,6 @@ TEST_CASE(IsolateReload_SavedClosure) {
EXPECT_STREQ("postapocalyptic!", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_TopLevelFieldAdded) {
const char* kScript =
"var value1 = 10;\n"
@@ -189,7 +182,6 @@ TEST_CASE(IsolateReload_TopLevelFieldAdded) {
EXPECT_STREQ("value1=10,value2=20", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_ClassFieldAdded) {
const char* kScript =
"class Foo {\n"
@@ -219,7 +211,6 @@ TEST_CASE(IsolateReload_ClassFieldAdded) {
EXPECT_EQ(44, SimpleInvoke(lib, "main"));
}
-
TEST_CASE(IsolateReload_ClassFieldAdded2) {
const char* kScript =
"class Foo {\n"
@@ -251,7 +242,6 @@ TEST_CASE(IsolateReload_ClassFieldAdded2) {
EXPECT_EQ(44, SimpleInvoke(lib, "main"));
}
-
TEST_CASE(IsolateReload_ClassFieldRemoved) {
const char* kScript =
"class Foo {\n"
@@ -281,7 +271,6 @@ TEST_CASE(IsolateReload_ClassFieldRemoved) {
EXPECT_EQ(44, SimpleInvoke(lib, "main"));
}
-
TEST_CASE(IsolateReload_ClassAdded) {
const char* kScript =
"main() {\n"
@@ -306,7 +295,6 @@ TEST_CASE(IsolateReload_ClassAdded) {
EXPECT_STREQ("hello from A", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_LibraryImportAdded) {
const char* kScript =
"main() {\n"
@@ -328,7 +316,6 @@ TEST_CASE(IsolateReload_LibraryImportAdded) {
EXPECT_EQ(4, SimpleInvoke(lib, "main"));
}
-
TEST_CASE(IsolateReload_LibraryImportRemoved) {
const char* kScript =
"import 'dart:math';\n"
@@ -351,7 +338,6 @@ TEST_CASE(IsolateReload_LibraryImportRemoved) {
EXPECT_ERROR(SimpleInvokeError(lib, "main"), "max");
}
-
TEST_CASE(IsolateReload_LibraryDebuggable) {
const char* kScript =
"main() {\n"
@@ -390,7 +376,6 @@ TEST_CASE(IsolateReload_LibraryDebuggable) {
EXPECT_EQ(false, debuggable);
}
-
TEST_CASE(IsolateReload_ImplicitConstructorChanged) {
// Note that we are checking that the value 20 gets cleared from the
// compile-time constants cache. To make this test work, "20" and
@@ -424,7 +409,6 @@ TEST_CASE(IsolateReload_ImplicitConstructorChanged) {
EXPECT_STREQ("saved:20 new:10", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_ConstructorChanged) {
const char* kScript =
"class A {\n"
@@ -458,7 +442,6 @@ TEST_CASE(IsolateReload_ConstructorChanged) {
EXPECT_STREQ("saved:20 new:10", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_SuperClassChanged) {
const char* kScript =
"class A {\n"
@@ -490,7 +473,6 @@ TEST_CASE(IsolateReload_SuperClassChanged) {
EXPECT_STREQ("(true/true, false/true)", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_Generics) {
// Reload a program with generics without changing the source. We
// do this to produce duplication TypeArguments and make sure that
@@ -522,7 +504,6 @@ TEST_CASE(IsolateReload_Generics) {
EXPECT_STREQ("Instance of 'B<A>'", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_TypeIdentity) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -554,7 +535,6 @@ TEST_CASE(IsolateReload_TypeIdentity) {
EXPECT_STREQ("true", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_TypeIdentityGeneric) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -586,7 +566,6 @@ TEST_CASE(IsolateReload_TypeIdentityGeneric) {
EXPECT_STREQ("true", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_TypeIdentityParameter) {
const char* kScript =
"import 'dart:mirrors';\n"
@@ -620,7 +599,6 @@ TEST_CASE(IsolateReload_TypeIdentityParameter) {
EXPECT_STREQ("true", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_MixinChanged) {
const char* kScript =
"class Mixin1 {\n"
@@ -663,7 +641,6 @@ TEST_CASE(IsolateReload_MixinChanged) {
SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_ComplexInheritanceChange) {
const char* kScript =
"class A {\n"
@@ -753,7 +730,6 @@ TEST_CASE(IsolateReload_ComplexInheritanceChange) {
SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_LiveStack) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -787,7 +763,6 @@ TEST_CASE(IsolateReload_LiveStack) {
EXPECT_EQ(105, SimpleInvoke(lib, "main"));
}
-
TEST_CASE(IsolateReload_LibraryLookup) {
const char* kImportScript = "importedFunc() => 'a';\n";
TestCase::AddTestLib("test:lib1", kImportScript);
@@ -829,7 +804,6 @@ TEST_CASE(IsolateReload_LibraryLookup) {
EXPECT(Dart_IsError(result));
}
-
TEST_CASE(IsolateReload_LibraryHide) {
const char* kImportScript = "importedFunc() => 'a';\n";
TestCase::AddTestLib("test:lib1", kImportScript);
@@ -860,7 +834,6 @@ TEST_CASE(IsolateReload_LibraryHide) {
EXPECT_STREQ("a", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_LibraryShow) {
const char* kImportScript =
"importedFunc() => 'a';\n"
@@ -878,7 +851,6 @@ TEST_CASE(IsolateReload_LibraryShow) {
" return importedIntFunc();\n"
"}\n";
-
Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
EXPECT_VALID(lib);
@@ -907,7 +879,6 @@ TEST_CASE(IsolateReload_LibraryShow) {
EXPECT_ERROR(SimpleInvokeError(lib, "mainInt"), "importedIntFunc");
}
-
// Verifies that we clear the ICs for the functions live on the stack in a way
// that is compatible with the fast path smi stubs.
TEST_CASE(IsolateReload_SmiFastPathStubs) {
@@ -924,7 +895,6 @@ TEST_CASE(IsolateReload_SmiFastPathStubs) {
" return x + y;\n"
"}\n";
-
Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
EXPECT_VALID(lib);
@@ -934,7 +904,6 @@ TEST_CASE(IsolateReload_SmiFastPathStubs) {
EXPECT_EQ(8, SimpleInvoke(lib, "main"));
}
-
// Verifies that we assign the correct patch classes for imported
// mixins when we reload.
TEST_CASE(IsolateReload_ImportedMixinFunction) {
@@ -972,7 +941,6 @@ TEST_CASE(IsolateReload_ImportedMixinFunction) {
EXPECT_STREQ("mixin", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_TopLevelParseError) {
const char* kScript =
"main() {\n"
@@ -993,7 +961,6 @@ TEST_CASE(IsolateReload_TopLevelParseError) {
EXPECT_ERROR(lib, "unexpected token");
}
-
TEST_CASE(IsolateReload_PendingUnqualifiedCall_StaticToInstance) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1033,7 +1000,6 @@ TEST_CASE(IsolateReload_PendingUnqualifiedCall_StaticToInstance) {
EXPECT_STREQ("instance", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_PendingUnqualifiedCall_InstanceToStatic) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1073,7 +1039,6 @@ TEST_CASE(IsolateReload_PendingUnqualifiedCall_InstanceToStatic) {
EXPECT_STREQ("static", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_PendingConstructorCall_AbstractToConcrete) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1123,7 +1088,6 @@ TEST_CASE(IsolateReload_PendingConstructorCall_AbstractToConcrete) {
EXPECT_STREQ("okay", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_PendingConstructorCall_ConcreteToAbstract) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1173,7 +1137,6 @@ TEST_CASE(IsolateReload_PendingConstructorCall_ConcreteToAbstract) {
EXPECT_STREQ("exception", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_PendingStaticCall_DefinedToNSM) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1220,7 +1183,6 @@ TEST_CASE(IsolateReload_PendingStaticCall_DefinedToNSM) {
EXPECT_STREQ("exception", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_PendingStaticCall_NSMToDefined) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1267,7 +1229,6 @@ TEST_CASE(IsolateReload_PendingStaticCall_NSMToDefined) {
EXPECT_STREQ("static", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_PendingSuperCall) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1311,7 +1272,6 @@ TEST_CASE(IsolateReload_PendingSuperCall) {
EXPECT_EQ(11, SimpleInvoke(lib, "main"));
}
-
TEST_CASE(IsolateReload_TearOff_Instance_Equality) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1350,7 +1310,6 @@ TEST_CASE(IsolateReload_TearOff_Instance_Equality) {
EXPECT_VALID(lib);
}
-
TEST_CASE(IsolateReload_TearOff_Class_Identity) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1389,7 +1348,6 @@ TEST_CASE(IsolateReload_TearOff_Class_Identity) {
EXPECT_VALID(lib);
}
-
TEST_CASE(IsolateReload_TearOff_Library_Identity) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1424,7 +1382,6 @@ TEST_CASE(IsolateReload_TearOff_Library_Identity) {
EXPECT_VALID(lib);
}
-
TEST_CASE(IsolateReload_TearOff_List_Set) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1488,7 +1445,6 @@ TEST_CASE(IsolateReload_TearOff_List_Set) {
EXPECT_VALID(lib);
}
-
TEST_CASE(IsolateReload_DanglingGetter_Instance) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1547,7 +1503,6 @@ TEST_CASE(IsolateReload_DanglingGetter_Instance) {
EXPECT_VALID(lib);
}
-
TEST_CASE(IsolateReload_DanglingGetter_Class) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1608,7 +1563,6 @@ TEST_CASE(IsolateReload_DanglingGetter_Class) {
EXPECT_VALID(lib);
}
-
static void IsolateReload_DanlingGetter_LibraryReload(
Dart_NativeArguments native_args) {
const char* kImportScript2 = "var x;\n";
@@ -1617,7 +1571,6 @@ static void IsolateReload_DanlingGetter_LibraryReload(
DART_CHECK_VALID(TestCase::TriggerReload());
}
-
static Dart_NativeFunction IsolateReload_DanlingGetter_LibraryNativeResolver(
Dart_Handle name,
int num_of_arguments,
@@ -1625,7 +1578,6 @@ static Dart_NativeFunction IsolateReload_DanlingGetter_LibraryNativeResolver(
return IsolateReload_DanlingGetter_LibraryReload;
}
-
TEST_CASE(IsolateReload_DanglingGetter_Library) {
const char* kImportScript =
"var x;\n"
@@ -1667,7 +1619,6 @@ TEST_CASE(IsolateReload_DanglingGetter_Library) {
FLAG_support_deprecated_tearoff_syntax = false;
}
-
TEST_CASE(IsolateReload_DanglingSetter_Instance) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1726,7 +1677,6 @@ TEST_CASE(IsolateReload_DanglingSetter_Instance) {
FLAG_support_deprecated_tearoff_syntax = false;
}
-
TEST_CASE(IsolateReload_DanglingSetter_Class) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1789,7 +1739,6 @@ TEST_CASE(IsolateReload_DanglingSetter_Class) {
FLAG_support_deprecated_tearoff_syntax = false;
}
-
static void IsolateReload_DanlingSetter_LibraryReload(
Dart_NativeArguments native_args) {
const char* kImportScript2 = "var x;\n";
@@ -1798,7 +1747,6 @@ static void IsolateReload_DanlingSetter_LibraryReload(
DART_CHECK_VALID(TestCase::TriggerReload());
}
-
static Dart_NativeFunction IsolateReload_DanlingSetter_LibraryNativeResolver(
Dart_Handle name,
int num_of_arguments,
@@ -1806,7 +1754,6 @@ static Dart_NativeFunction IsolateReload_DanlingSetter_LibraryNativeResolver(
return IsolateReload_DanlingSetter_LibraryReload;
}
-
TEST_CASE(IsolateReload_DanglingSetter_Library) {
const char* kImportScript =
"var x;\n"
@@ -1848,7 +1795,6 @@ TEST_CASE(IsolateReload_DanglingSetter_Library) {
FLAG_support_deprecated_tearoff_syntax = false;
}
-
TEST_CASE(IsolateReload_TearOff_AddArguments) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1906,7 +1852,6 @@ TEST_CASE(IsolateReload_TearOff_AddArguments) {
EXPECT_VALID(lib);
}
-
TEST_CASE(IsolateReload_TearOff_AddArguments2) {
const char* kScript =
"import 'test:isolate_reload_helper';\n"
@@ -1962,7 +1907,6 @@ TEST_CASE(IsolateReload_TearOff_AddArguments2) {
EXPECT_VALID(lib);
}
-
TEST_CASE(IsolateReload_EnumEquality) {
const char* kScript =
"enum Fruit {\n"
@@ -1999,7 +1943,6 @@ TEST_CASE(IsolateReload_EnumEquality) {
EXPECT_STREQ("yes", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_EnumIdentical) {
const char* kScript =
"enum Fruit {\n"
@@ -2035,7 +1978,6 @@ TEST_CASE(IsolateReload_EnumIdentical) {
EXPECT_STREQ("yes", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_EnumReorderIdentical) {
const char* kScript =
"enum Fruit {\n"
@@ -2071,7 +2013,6 @@ TEST_CASE(IsolateReload_EnumReorderIdentical) {
EXPECT_STREQ("yes", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_EnumAddition) {
const char* kScript =
"enum Fruit {\n"
@@ -2107,7 +2048,6 @@ TEST_CASE(IsolateReload_EnumAddition) {
SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_EnumToNotEnum) {
const char* kScript =
"enum Fruit {\n"
@@ -2132,7 +2072,6 @@ TEST_CASE(IsolateReload_EnumToNotEnum) {
EXPECT_ERROR(result, "Enum class cannot be redefined to be a non-enum class");
}
-
TEST_CASE(IsolateReload_NotEnumToEnum) {
const char* kScript =
"class Fruit {\n"
@@ -2158,7 +2097,6 @@ TEST_CASE(IsolateReload_NotEnumToEnum) {
EXPECT_ERROR(result, "Class cannot be redefined to be a enum class");
}
-
TEST_CASE(IsolateReload_EnumDelete) {
const char* kScript =
"enum Fruit {\n"
@@ -2196,7 +2134,6 @@ TEST_CASE(IsolateReload_EnumDelete) {
SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_EnumIdentityReload) {
const char* kScript =
"enum Fruit {\n"
@@ -2255,7 +2192,6 @@ TEST_CASE(IsolateReload_EnumIdentityReload) {
SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_ConstantIdentical) {
const char* kScript =
"class Fruit {\n"
@@ -2293,7 +2229,6 @@ TEST_CASE(IsolateReload_ConstantIdentical) {
EXPECT_STREQ("yes", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_EnumValuesToString) {
const char* kScript =
"enum Fruit {\n"
@@ -2338,7 +2273,6 @@ TEST_CASE(IsolateReload_EnumValuesToString) {
SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_DirectSubclasses_Success) {
Object& new_subclass = Object::Handle();
String& name = String::Handle();
@@ -2395,7 +2329,6 @@ TEST_CASE(IsolateReload_DirectSubclasses_Success) {
EXPECT_STREQ("BIterator", name.ToCString());
}
-
TEST_CASE(IsolateReload_DirectSubclasses_GhostSubclass) {
Object& new_subclass = Object::Handle();
String& name = String::Handle();
@@ -2454,7 +2387,6 @@ TEST_CASE(IsolateReload_DirectSubclasses_GhostSubclass) {
EXPECT_STREQ("BIterator", name.ToCString());
}
-
// Make sure that we restore the direct subclass info when we revert.
TEST_CASE(IsolateReload_DirectSubclasses_Failure) {
Object& new_subclass = Object::Handle();
@@ -2522,7 +2454,6 @@ TEST_CASE(IsolateReload_DirectSubclasses_Failure) {
EXPECT_STREQ("AIterator", name.ToCString());
}
-
// Tests reload succeeds when instance format changes.
// Change: Foo {a, b, c:42} -> Foo {c:42}
// Validate: c keeps the value in the retained Foo object.
@@ -2558,7 +2489,6 @@ TEST_CASE(IsolateReload_ChangeInstanceFormat0) {
EXPECT_EQ(42, SimpleInvoke(lib, "main"));
}
-
// Tests reload succeeds when instance format changes.
// Change: Foo {} -> Foo {c:null}
// Validate: c is initialized to null the retained Foo object.
@@ -2626,7 +2556,6 @@ TEST_CASE(IsolateReload_ChangeInstanceFormat2) {
EXPECT_EQ(24, SimpleInvoke(lib, "main"));
}
-
// Tests reload succeeds when instance format changes.
// Change: Foo {a, b, c:42, d} -> Foo {c:42, g}
// Validate: c keeps the value in the retained Foo object.
@@ -2667,7 +2596,6 @@ TEST_CASE(IsolateReload_ChangeInstanceFormat3) {
EXPECT_EQ(3, SimpleInvoke(lib, "main"));
}
-
// Tests reload succeeds when instance format changes.
// Change: Bar {c:42}, Foo : Bar {d, e} -> Foo {c:42}
// Validate: c keeps the value in the retained Foo object.
@@ -2705,7 +2633,6 @@ TEST_CASE(IsolateReload_ChangeInstanceFormat4) {
EXPECT_EQ(44, SimpleInvoke(lib, "main"));
}
-
// Tests reload succeeds when instance format changes.
// Change: Bar {a, b}, Foo : Bar {c:42} -> Bar {c:42}, Foo : Bar {}
// Validate: c keeps the value in the retained Foo object.
@@ -2745,7 +2672,6 @@ TEST_CASE(IsolateReload_ChangeInstanceFormat5) {
EXPECT_EQ(44, SimpleInvoke(lib, "main"));
}
-
// Tests reload fails when type parameters change.
// Change: Foo<A,B> {a, b} -> Foo<A> {a}
// Validate: the right error message is returned.
@@ -2794,7 +2720,6 @@ TEST_CASE(IsolateReload_ChangeInstanceFormat7) {
EXPECT_VALID(lib);
}
-
// Regression for handle sharing bug: Change the shape of two classes and see
// that their instances don't change class.
TEST_CASE(IsolateReload_ChangeInstanceFormat8) {
@@ -2833,7 +2758,6 @@ TEST_CASE(IsolateReload_ChangeInstanceFormat8) {
EXPECT_STREQ("Instance of 'A' Instance of 'B'", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_ShapeChangeRetainsHash) {
const char* kScript =
"class A{\n"
@@ -2865,7 +2789,6 @@ TEST_CASE(IsolateReload_ShapeChangeRetainsHash) {
EXPECT_STREQ("true", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_StaticTearOffRetainsHash) {
const char* kScript =
"foo() {}\n"
@@ -2892,12 +2815,10 @@ TEST_CASE(IsolateReload_StaticTearOffRetainsHash) {
EXPECT_STREQ("true", SimpleInvokeStr(lib, "main"));
}
-
static bool NothingModifiedCallback(const char* url, int64_t since) {
return false;
}
-
TEST_CASE(IsolateReload_NoLibsModified) {
const char* kImportScript = "importedFunc() => 'fancy';";
TestCase::AddTestLib("test:lib1", kImportScript);
@@ -2930,7 +2851,6 @@ TEST_CASE(IsolateReload_NoLibsModified) {
EXPECT_STREQ("fancy feast", SimpleInvokeStr(lib, "main"));
}
-
static bool MainModifiedCallback(const char* url, int64_t since) {
if (strcmp(url, "test-lib") == 0) {
return true;
@@ -2938,7 +2858,6 @@ static bool MainModifiedCallback(const char* url, int64_t since) {
return false;
}
-
TEST_CASE(IsolateReload_MainLibModified) {
const char* kImportScript = "importedFunc() => 'fancy';";
TestCase::AddTestLib("test:lib1", kImportScript);
@@ -2971,7 +2890,6 @@ TEST_CASE(IsolateReload_MainLibModified) {
EXPECT_STREQ("fancy pants", SimpleInvokeStr(lib, "main"));
}
-
static bool ImportModifiedCallback(const char* url, int64_t since) {
if (strcmp(url, "test:lib1") == 0) {
return true;
@@ -2979,7 +2897,6 @@ static bool ImportModifiedCallback(const char* url, int64_t since) {
return false;
}
-
TEST_CASE(IsolateReload_ImportedLibModified) {
const char* kImportScript = "importedFunc() => 'fancy';";
TestCase::AddTestLib("test:lib1", kImportScript);
@@ -3012,7 +2929,6 @@ TEST_CASE(IsolateReload_ImportedLibModified) {
EXPECT_STREQ("bossy pants", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_PrefixImportedLibModified) {
const char* kImportScript = "importedFunc() => 'fancy';";
TestCase::AddTestLib("test:lib1", kImportScript);
@@ -3046,7 +2962,6 @@ TEST_CASE(IsolateReload_PrefixImportedLibModified) {
EXPECT_STREQ("bossy pants", SimpleInvokeStr(lib, "main"));
}
-
static bool ExportModifiedCallback(const char* url, int64_t since) {
if (strcmp(url, "test:exportlib") == 0) {
return true;
@@ -3054,7 +2969,6 @@ static bool ExportModifiedCallback(const char* url, int64_t since) {
return false;
}
-
TEST_CASE(IsolateReload_ExportedLibModified) {
const char* kImportScript = "export 'test:exportlib';";
TestCase::AddTestLib("test:importlib", kImportScript);
@@ -3090,7 +3004,6 @@ TEST_CASE(IsolateReload_ExportedLibModified) {
EXPECT_STREQ("bossy pants", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_SimpleConstFieldUpdate) {
const char* kScript =
"const value = 'a';\n"
@@ -3113,7 +3026,6 @@ TEST_CASE(IsolateReload_SimpleConstFieldUpdate) {
EXPECT_STREQ("value=b", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_ConstFieldUpdate) {
const char* kScript =
"const value = const Duration(seconds: 1);\n"
@@ -3136,7 +3048,6 @@ TEST_CASE(IsolateReload_ConstFieldUpdate) {
EXPECT_STREQ("value=0:00:02.000000", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_RunNewFieldInitializers) {
const char* kScript =
"class Foo {\n"
@@ -3169,7 +3080,6 @@ TEST_CASE(IsolateReload_RunNewFieldInitializers) {
EXPECT_EQ(7, SimpleInvoke(lib, "main"));
}
-
TEST_CASE(IsolateReload_RunNewFieldInitializersReferenceStaticField) {
const char* kScript =
"int myInitialValue = 8 * 7;\n"
@@ -3204,7 +3114,6 @@ TEST_CASE(IsolateReload_RunNewFieldInitializersReferenceStaticField) {
EXPECT_EQ(56, SimpleInvoke(lib, "main"));
}
-
TEST_CASE(IsolateReload_RunNewFieldInitializersMutateStaticField) {
const char* kScript =
"int myInitialValue = 8 * 7;\n"
@@ -3243,7 +3152,6 @@ TEST_CASE(IsolateReload_RunNewFieldInitializersMutateStaticField) {
EXPECT_EQ(58, SimpleInvoke(lib, "main"));
}
-
// When an initializer expression throws, we leave the field as null.
TEST_CASE(IsolateReload_RunNewFieldInitializersThrows) {
const char* kScript =
@@ -3277,7 +3185,6 @@ TEST_CASE(IsolateReload_RunNewFieldInitializersThrows) {
EXPECT_STREQ("true", SimpleInvokeStr(lib, "main"));
}
-
// When an initializer expression has a syntax error, we detect it at reload
// time.
TEST_CASE(IsolateReload_RunNewFieldInitializersSyntaxError) {
@@ -3312,7 +3219,6 @@ TEST_CASE(IsolateReload_RunNewFieldInitializersSyntaxError) {
EXPECT_ERROR(lib, "......");
}
-
// When an initializer expression has a syntax error, we detect it at reload
// time.
TEST_CASE(IsolateReload_RunNewFieldInitializersSyntaxError2) {
@@ -3349,7 +3255,6 @@ TEST_CASE(IsolateReload_RunNewFieldInitializersSyntaxError2) {
EXPECT_ERROR(lib, "......");
}
-
// When an initializer expression has a syntax error, we detect it at reload
// time.
TEST_CASE(IsolateReload_RunNewFieldInitializersSyntaxError3) {
@@ -3386,7 +3291,6 @@ TEST_CASE(IsolateReload_RunNewFieldInitializersSyntaxError3) {
EXPECT_ERROR(lib, "......");
}
-
TEST_CASE(IsolateReload_RunNewFieldInitialiazersSuperClass) {
const char* kScript =
"class Super {\n"
@@ -3427,7 +3331,6 @@ TEST_CASE(IsolateReload_RunNewFieldInitialiazersSuperClass) {
EXPECT_STREQ("right", SimpleInvokeStr(lib, "main"));
}
-
TEST_CASE(IsolateReload_TypedefToNotTypedef) {
const char* kScript =
"typedef bool Predicate(dynamic x);\n"
@@ -3452,7 +3355,6 @@ TEST_CASE(IsolateReload_TypedefToNotTypedef) {
"Typedef class cannot be redefined to be a non-typedef class");
}
-
TEST_CASE(IsolateReload_NotTypedefToTypedef) {
const char* kScript =
"class Predicate {\n"
@@ -3476,7 +3378,6 @@ TEST_CASE(IsolateReload_NotTypedefToTypedef) {
EXPECT_ERROR(result, "Class cannot be redefined to be a typedef class");
}
-
TEST_CASE(IsolateReload_TypedefAddParameter) {
const char* kScript =
"typedef bool Predicate(dynamic x);\n"
« no previous file with comments | « runtime/vm/isolate_reload.cc ('k') | runtime/vm/isolate_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698