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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 3001513002: Add a prefix convention for tests in [dart|debugger]_api_impl_tests.cc. (Closed)
Patch Set: Rebase Created 3 years, 4 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/tests/vm/vm.status ('k') | runtime/vm/debugger_api_impl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl_test.cc
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index d2ee3b21fd9061be74c528a6891ad0e75ea64801..15872fb388403636252dc6eca03f9addd054be5b 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -28,7 +28,7 @@ DECLARE_FLAG(bool, use_dart_frontend);
#ifndef PRODUCT
-TEST_CASE(ErrorHandleBasics) {
+TEST_CASE(DartAPI_ErrorHandleBasics) {
const char* kScriptChars =
"void testMain() {\n"
" throw new Exception(\"bad news\");\n"
@@ -65,7 +65,7 @@ TEST_CASE(ErrorHandleBasics) {
EXPECT_VALID(Dart_ErrorGetStackTrace(exception));
}
-TEST_CASE(StackTraceInfo) {
+TEST_CASE(DartAPI_StackTraceInfo) {
const char* kScriptChars =
"bar() => throw new Error();\n"
"foo() => bar();\n"
@@ -135,7 +135,7 @@ TEST_CASE(StackTraceInfo) {
EXPECT(Dart_IsError(result));
}
-TEST_CASE(DeepStackTraceInfo) {
+TEST_CASE(DartAPI_DeepStackTraceInfo) {
const char* kScriptChars =
"foo(n) => n == 1 ? throw new Error() : foo(n-1);\n"
"testMain() => foo(50);\n";
@@ -213,7 +213,7 @@ TEST_CASE(DeepStackTraceInfo) {
EXPECT(Dart_IsError(result));
}
-TEST_CASE(StackOverflowStackTraceInfo) {
+TEST_CASE(DartAPI_StackOverflowStackTraceInfo) {
const char* kScriptChars =
"class C {\n"
" static foo() => foo();\n"
@@ -261,7 +261,7 @@ TEST_CASE(StackOverflowStackTraceInfo) {
EXPECT(Dart_IsError(result));
}
-TEST_CASE(OutOfMemoryStackTraceInfo) {
+TEST_CASE(DartAPI_OutOfMemoryStackTraceInfo) {
const char* kScriptChars =
"var number_of_ints = 134000000;\n"
"testMain() {\n"
@@ -374,7 +374,7 @@ static Dart_NativeFunction CurrentStackTraceNativeLookup(
return reinterpret_cast<Dart_NativeFunction>(&CurrentStackTraceNative);
}
-TEST_CASE(CurrentStackTraceInfo) {
+TEST_CASE(DartAPI_CurrentStackTraceInfo) {
const char* kScriptChars =
"inspectStack() native 'CurrentStackTraceNatve';\n"
"foo(n) => n == 1 ? inspectStack() : foo(n-1);\n"
@@ -392,7 +392,7 @@ TEST_CASE(CurrentStackTraceInfo) {
#endif // !PRODUCT
-TEST_CASE(ErrorHandleTypes) {
+TEST_CASE(DartAPI_ErrorHandleTypes) {
const String& compile_message = String::Handle(String::New("CompileError"));
const String& fatal_message = String::Handle(String::New("FatalError"));
@@ -443,7 +443,7 @@ TEST_CASE(ErrorHandleTypes) {
EXPECT_STREQ("FatalError", Dart_GetError(fatal_error));
}
-TEST_CASE(UnhandleExceptionError) {
+TEST_CASE(DartAPI_UnhandleExceptionError) {
const char* exception_cstr = "";
// Test with an API Error.
@@ -525,7 +525,7 @@ static Dart_NativeFunction PropagateError_native_lookup(
return reinterpret_cast<Dart_NativeFunction>(&PropagateErrorNative);
}
-TEST_CASE(Dart_PropagateError) {
+TEST_CASE(DartAPI_PropagateError) {
const char* kScriptChars =
"raiseCompileError() {\n"
" return missing_semicolon\n"
@@ -588,13 +588,13 @@ TEST_CASE(Dart_PropagateError) {
EXPECT_SUBSTRING("myException", Dart_GetError(result));
}
-TEST_CASE(Dart_Error) {
+TEST_CASE(DartAPI_Error) {
Dart_Handle error = Api::NewError("An %s", "error");
EXPECT(Dart_IsError(error));
EXPECT_STREQ("An error", Dart_GetError(error));
}
-TEST_CASE(Null) {
+TEST_CASE(DartAPI_Null) {
Dart_Handle null = Dart_Null();
EXPECT_VALID(null);
EXPECT(Dart_IsNull(null));
@@ -604,13 +604,13 @@ TEST_CASE(Null) {
EXPECT(!Dart_IsNull(str));
}
-TEST_CASE(EmptyString) {
+TEST_CASE(DartAPI_EmptyString) {
Dart_Handle empty = Dart_EmptyString();
EXPECT_VALID(empty);
EXPECT(!Dart_IsNull(empty));
}
-TEST_CASE(IdentityEquals) {
+TEST_CASE(DartAPI_IdentityEquals) {
Dart_Handle five = Dart_NewInteger(5);
Dart_Handle five_again = Dart_NewInteger(5);
Dart_Handle mint = Dart_NewInteger(0xFFFFFFFF);
@@ -660,7 +660,7 @@ TEST_CASE(IdentityEquals) {
}
}
-TEST_CASE(ObjectEquals) {
+TEST_CASE(DartAPI_ObjectEquals) {
bool equal = false;
Dart_Handle five = NewString("5");
Dart_Handle five_again = NewString("5");
@@ -684,7 +684,7 @@ TEST_CASE(ObjectEquals) {
EXPECT(!equal);
}
-TEST_CASE(InstanceValues) {
+TEST_CASE(DartAPI_InstanceValues) {
EXPECT(Dart_IsInstance(NewString("test")));
EXPECT(Dart_IsInstance(Dart_True()));
@@ -692,7 +692,7 @@ TEST_CASE(InstanceValues) {
EXPECT(!Dart_IsInstance(Dart_Null()));
}
-TEST_CASE(InstanceGetType) {
+TEST_CASE(DartAPI_InstanceGetType) {
Zone* zone = thread->zone();
// Get the handle from a valid instance handle.
Dart_Handle type = Dart_InstanceGetType(Dart_Null());
@@ -734,7 +734,7 @@ TEST_CASE(InstanceGetType) {
"type Instance.");
}
-TEST_CASE(BooleanValues) {
+TEST_CASE(DartAPI_BooleanValues) {
Dart_Handle str = NewString("test");
EXPECT(!Dart_IsBoolean(str));
@@ -757,7 +757,7 @@ TEST_CASE(BooleanValues) {
EXPECT(!value);
}
-TEST_CASE(BooleanConstants) {
+TEST_CASE(DartAPI_BooleanConstants) {
Dart_Handle true_handle = Dart_True();
EXPECT_VALID(true_handle);
EXPECT(Dart_IsBoolean(true_handle));
@@ -776,7 +776,7 @@ TEST_CASE(BooleanConstants) {
EXPECT(!value);
}
-TEST_CASE(DoubleValues) {
+TEST_CASE(DartAPI_DoubleValues) {
const double kDoubleVal1 = 201.29;
const double kDoubleVal2 = 101.19;
Dart_Handle val1 = Dart_NewDouble(kDoubleVal1);
@@ -792,7 +792,7 @@ TEST_CASE(DoubleValues) {
EXPECT_EQ(kDoubleVal2, out2);
}
-TEST_CASE(NumberValues) {
+TEST_CASE(DartAPI_NumberValues) {
// TODO(antonm): add various kinds of ints (smi, mint, bigint).
const char* kScriptChars =
"int getInt() { return 1; }\n"
@@ -824,7 +824,7 @@ TEST_CASE(NumberValues) {
EXPECT(!Dart_IsNumber(result));
}
-TEST_CASE(IntegerValues) {
+TEST_CASE(DartAPI_IntegerValues) {
const int64_t kIntegerVal1 = 100;
const int64_t kIntegerVal2 = 0xffffffff;
const char* kIntegerVal3 = "0x123456789123456789123456789";
@@ -892,7 +892,7 @@ TEST_CASE(IntegerValues) {
EXPECT(Dart_IsError(result));
}
-TEST_CASE(IntegerToHexCString) {
+TEST_CASE(DartAPI_IntegerToHexCString) {
const struct {
int64_t i;
const char* s;
@@ -943,7 +943,7 @@ TEST_CASE(IntegerToHexCString) {
}
}
-TEST_CASE(IntegerFitsIntoInt64) {
+TEST_CASE(DartAPI_IntegerFitsIntoInt64) {
Dart_Handle max = Dart_NewInteger(kMaxInt64);
EXPECT(Dart_IsInteger(max));
bool fits = false;
@@ -981,7 +981,7 @@ TEST_CASE(IntegerFitsIntoInt64) {
}
}
-TEST_CASE(IntegerFitsIntoUint64) {
+TEST_CASE(DartAPI_IntegerFitsIntoUint64) {
Dart_Handle max = Dart_NewIntegerFromUint64(kMaxUint64);
if (FLAG_limit_ints_to_64_bits) {
EXPECT(Dart_IsApiError(max));
@@ -1019,7 +1019,7 @@ TEST_CASE(IntegerFitsIntoUint64) {
EXPECT(!fits);
}
-TEST_CASE(ArrayValues) {
+TEST_CASE(DartAPI_ArrayValues) {
EXPECT(!Dart_IsList(Dart_Null()));
const int kArrayLength = 10;
Dart_Handle str = NewString("test");
@@ -1055,7 +1055,7 @@ TEST_CASE(ArrayValues) {
}
}
-TEST_CASE(IsString) {
+TEST_CASE(DartAPI_IsString) {
uint8_t latin1[] = {'o', 'n', 'e', 0xC2, 0xA2};
Dart_Handle latin1str = Dart_NewStringFromUTF8(latin1, ARRAY_SIZE(latin1));
@@ -1133,7 +1133,7 @@ TEST_CASE(IsString) {
EXPECT(!Dart_IsExternalString(str32));
}
-TEST_CASE(NewString) {
+TEST_CASE(DartAPI_NewString) {
const char* ascii = "string";
Dart_Handle ascii_str = NewString(ascii);
EXPECT_VALID(ascii_str);
@@ -1154,7 +1154,7 @@ TEST_CASE(NewString) {
EXPECT(Dart_IsError(invalid_str));
}
-TEST_CASE(MalformedStringToUTF8) {
+TEST_CASE(DartAPI_MalformedStringToUTF8) {
// 1D11E = treble clef
// [0] should be high surrogate D834
// [1] should be low surrogate DD1E
@@ -1224,7 +1224,7 @@ static void ExternalStringCallbackFinalizer(void* peer) {
*static_cast<int*>(peer) *= 2;
}
-TEST_CASE(ExternalStringCallback) {
+TEST_CASE(DartAPI_ExternalStringCallback) {
int peer8 = 40;
int peer16 = 41;
@@ -1259,7 +1259,7 @@ TEST_CASE(ExternalStringCallback) {
}
}
-TEST_CASE(ExternalStringPretenure) {
+TEST_CASE(DartAPI_ExternalStringPretenure) {
{
Dart_EnterScope();
static const uint8_t big_data8[16 * MB] = {
@@ -1298,7 +1298,7 @@ TEST_CASE(ExternalStringPretenure) {
}
}
-TEST_CASE(ExternalTypedDataPretenure) {
+TEST_CASE(DartAPI_ExternalTypedDataPretenure) {
{
Dart_EnterScope();
static const int kBigLength = 16 * MB / 8;
@@ -1326,7 +1326,7 @@ TEST_CASE(ExternalTypedDataPretenure) {
}
}
-TEST_CASE(ListAccess) {
+TEST_CASE(DartAPI_ListAccess) {
const char* kScriptChars =
"List testMain() {"
" List a = new List();"
@@ -1476,7 +1476,7 @@ TEST_CASE(ListAccess) {
EXPECT(Dart_IsUnhandledExceptionError(result));
}
-TEST_CASE(MapAccess) {
+TEST_CASE(DartAPI_MapAccess) {
EXPECT(!Dart_IsMap(Dart_Null()));
const char* kScriptChars =
"Map testMain() {"
@@ -1568,7 +1568,7 @@ TEST_CASE(MapAccess) {
EXPECT(Dart_IsError(Dart_MapKeys(a)));
}
-TEST_CASE(IsFuture) {
+TEST_CASE(DartAPI_IsFuture) {
const char* kScriptChars =
"import 'dart:async';"
"Future testMain() {"
@@ -1593,7 +1593,7 @@ TEST_CASE(IsFuture) {
EXPECT(!Dart_IsFuture(null));
}
-TEST_CASE(TypedDataViewListGetAsBytes) {
+TEST_CASE(DartAPI_TypedDataViewListGetAsBytes) {
const int kSize = 1000;
const char* kScriptChars =
@@ -1625,7 +1625,7 @@ TEST_CASE(TypedDataViewListGetAsBytes) {
delete[] data;
}
-TEST_CASE(TypedDataViewListIsTypedData) {
+TEST_CASE(DartAPI_TypedDataViewListIsTypedData) {
const int kSize = 1000;
const char* kScriptChars =
@@ -1647,7 +1647,7 @@ TEST_CASE(TypedDataViewListIsTypedData) {
EXPECT(Dart_IsTypedData(view_obj));
}
-TEST_CASE(TypedDataAccess) {
+TEST_CASE(DartAPI_TypedDataAccess) {
EXPECT_EQ(Dart_TypedData_kInvalid, Dart_GetTypeOfTypedData(Dart_True()));
EXPECT_EQ(Dart_TypedData_kInvalid,
Dart_GetTypeOfExternalTypedData(Dart_False()));
@@ -1720,7 +1720,7 @@ TEST_CASE(TypedDataAccess) {
}
}
-TEST_CASE(ByteBufferAccess) {
+TEST_CASE(DartAPI_ByteBufferAccess) {
EXPECT(!Dart_IsByteBuffer(Dart_True()));
Dart_Handle byte_array = Dart_NewTypedData(Dart_TypedData_kUint8, 10);
EXPECT_VALID(byte_array);
@@ -1782,7 +1782,7 @@ static Dart_NativeFunction ByteDataNativeResolver(Dart_Handle name,
return &ByteDataNativeFunction;
}
-TEST_CASE(ByteDataAccess) {
+TEST_CASE(DartAPI_ByteDataAccess) {
const char* kScriptChars =
"import 'dart:typed_data';\n"
"class Expect {\n"
@@ -1843,7 +1843,7 @@ static Dart_NativeFunction ExternalByteDataNativeResolver(
return &ExternalByteDataNativeFunction;
}
-TEST_CASE(ExternalByteDataAccess) {
+TEST_CASE(DartAPI_ExternalByteDataAccess) {
// TODO(asiva): Once we have getInt16LE and getInt16BE support use the
// appropriate getter instead of the host endian format used now.
const char* kScriptChars =
@@ -1917,7 +1917,7 @@ static Dart_NativeFunction OptExternalByteDataNativeResolver(
return &OptExternalByteDataNativeFunction;
}
-TEST_CASE(OptimizedExternalByteDataAccess) {
+TEST_CASE(DartAPI_OptimizedExternalByteDataAccess) {
const char* kScriptChars =
"import 'dart:typed_data';\n"
"class Expect {\n"
@@ -1999,12 +1999,12 @@ static void TestTypedDataDirectAccess() {
" to be of type 'TypedData'.");
}
-TEST_CASE(TypedDataDirectAccessUnverified) {
+TEST_CASE(DartAPI_TypedDataDirectAccessUnverified) {
FLAG_verify_acquired_data = false;
TestTypedDataDirectAccess();
}
-TEST_CASE(TypedDataDirectAccessVerified) {
+TEST_CASE(DartAPI_TypedDataDirectAccessVerified) {
FLAG_verify_acquired_data = true;
TestTypedDataDirectAccess();
}
@@ -2103,12 +2103,12 @@ static void TestTypedDataDirectAccess1() {
TestDirectAccess(lib, ext_list_access_test_obj, Dart_TypedData_kUint8, true);
}
-TEST_CASE(TypedDataDirectAccess1Unverified) {
+TEST_CASE(DartAPI_TypedDataDirectAccess1Unverified) {
FLAG_verify_acquired_data = false;
TestTypedDataDirectAccess1();
}
-TEST_CASE(TypedDataDirectAccess1Verified) {
+TEST_CASE(DartAPI_TypedDataDirectAccess1Verified) {
FLAG_verify_acquired_data = true;
TestTypedDataDirectAccess1();
}
@@ -2151,12 +2151,12 @@ static void TestTypedDataViewDirectAccess() {
TestDirectAccess(lib, list_access_test_obj, Dart_TypedData_kInt8, false);
}
-TEST_CASE(TypedDataViewDirectAccessUnverified) {
+TEST_CASE(DartAPI_TypedDataViewDirectAccessUnverified) {
FLAG_verify_acquired_data = false;
TestTypedDataViewDirectAccess();
}
-TEST_CASE(TypedDataViewDirectAccessVerified) {
+TEST_CASE(DartAPI_TypedDataViewDirectAccessVerified) {
FLAG_verify_acquired_data = true;
TestTypedDataViewDirectAccess();
}
@@ -2199,12 +2199,12 @@ static void TestByteDataDirectAccess() {
TestDirectAccess(lib, list_access_test_obj, Dart_TypedData_kByteData, false);
}
-TEST_CASE(ByteDataDirectAccessUnverified) {
+TEST_CASE(DartAPI_ByteDataDirectAccessUnverified) {
FLAG_verify_acquired_data = false;
TestByteDataDirectAccess();
}
-TEST_CASE(ByteDataDirectAccessVerified) {
+TEST_CASE(DartAPI_ByteDataDirectAccessVerified) {
FLAG_verify_acquired_data = true;
TestByteDataDirectAccess();
}
@@ -2265,7 +2265,7 @@ static void ExternalTypedDataAccessTests(Dart_Handle obj,
}
}
-TEST_CASE(ExternalTypedDataAccess) {
+TEST_CASE(DartAPI_ExternalTypedDataAccess) {
uint8_t data[] = {0, 11, 22, 33, 44, 55, 66, 77};
intptr_t data_length = ARRAY_SIZE(data);
@@ -2274,7 +2274,7 @@ TEST_CASE(ExternalTypedDataAccess) {
ExternalTypedDataAccessTests(obj, Dart_TypedData_kUint8, data, data_length);
}
-TEST_CASE(ExternalClampedTypedDataAccess) {
+TEST_CASE(DartAPI_ExternalClampedTypedDataAccess) {
uint8_t data[] = {0, 11, 22, 33, 44, 55, 66, 77};
intptr_t data_length = ARRAY_SIZE(data);
@@ -2284,7 +2284,7 @@ TEST_CASE(ExternalClampedTypedDataAccess) {
data_length);
}
-TEST_CASE(ExternalUint8ClampedArrayAccess) {
+TEST_CASE(DartAPI_ExternalUint8ClampedArrayAccess) {
const char* kScriptChars =
"testClamped(List a) {\n"
" if (a[1] != 11) return false;\n"
@@ -2334,7 +2334,7 @@ static void ExternalTypedDataFinalizer(void* isolate_callback_data,
*static_cast<int*>(peer) = 42;
}
-TEST_CASE(ExternalTypedDataCallback) {
+TEST_CASE(DartAPI_ExternalTypedDataCallback) {
int peer = 0;
{
Dart_EnterScope();
@@ -2366,7 +2366,7 @@ static void SlowFinalizer(void* isolate_callback_data,
(*count)++;
}
-TEST_CASE(SlowFinalizer) {
+TEST_CASE(DartAPI_SlowFinalizer) {
intptr_t count = 0;
for (intptr_t i = 0; i < 10; i++) {
Dart_EnterScope();
@@ -2404,7 +2404,7 @@ static void CheckFloat32x4Data(Dart_Handle obj) {
EXPECT_VALID(Dart_TypedDataReleaseData(obj));
}
-TEST_CASE(Float32x4List) {
+TEST_CASE(DartAPI_Float32x4List) {
const char* kScriptChars =
"import 'dart:typed_data';\n"
"Float32x4List float32x4() {\n"
@@ -2447,7 +2447,7 @@ TEST_CASE(Float32x4List) {
// Unit test for entering a scope, creating a local handle and exiting
// the scope.
-VM_UNIT_TEST_CASE(EnterExitScope) {
+VM_UNIT_TEST_CASE(DartAPI_EnterExitScope) {
TestIsolateScope __test_isolate__;
Thread* thread = Thread::Current();
@@ -2468,7 +2468,7 @@ VM_UNIT_TEST_CASE(EnterExitScope) {
}
// Unit test for creating and deleting persistent handles.
-VM_UNIT_TEST_CASE(PersistentHandles) {
+VM_UNIT_TEST_CASE(DartAPI_PersistentHandles) {
const char* kTestString1 = "Test String1";
const char* kTestString2 = "Test String2";
TestCase::CreateTestIsolate();
@@ -2536,7 +2536,7 @@ VM_UNIT_TEST_CASE(PersistentHandles) {
// Test that we are able to create a persistent handle from a
// persistent handle.
-VM_UNIT_TEST_CASE(NewPersistentHandle_FromPersistentHandle) {
+VM_UNIT_TEST_CASE(DartAPI_NewPersistentHandle_FromPersistentHandle) {
TestIsolateScope __test_isolate__;
Isolate* isolate = Isolate::Current();
@@ -2566,7 +2566,7 @@ VM_UNIT_TEST_CASE(NewPersistentHandle_FromPersistentHandle) {
}
// Test that we can assign to a persistent handle.
-VM_UNIT_TEST_CASE(AssignToPersistentHandle) {
+VM_UNIT_TEST_CASE(DartAPI_AssignToPersistentHandle) {
const char* kTestString1 = "Test String1";
const char* kTestString2 = "Test String2";
TestIsolateScope __test_isolate__;
@@ -2619,7 +2619,7 @@ static void WeakPersistentHandleCallback(void* isolate_callback_data,
}
}
-TEST_CASE(WeakPersistentHandle) {
+TEST_CASE(DartAPI_WeakPersistentHandle) {
Dart_Handle local_new_ref = Dart_Null();
weak_new_ref = Dart_NewWeakPersistentHandle(local_new_ref, NULL, 0,
WeakPersistentHandleCallback);
@@ -2739,7 +2739,7 @@ TEST_CASE(WeakPersistentHandle) {
}
}
-TEST_CASE(WeakPersistentHandleErrors) {
+TEST_CASE(DartAPI_WeakPersistentHandleErrors) {
Dart_EnterScope();
// NULL callback.
@@ -2765,7 +2765,7 @@ static void WeakPersistentHandlePeerFinalizer(void* isolate_callback_data,
*static_cast<int*>(peer) = 42;
}
-TEST_CASE(WeakPersistentHandleCallback) {
+TEST_CASE(DartAPI_WeakPersistentHandleCallback) {
Dart_WeakPersistentHandle weak_ref = NULL;
int peer = 0;
{
@@ -2788,7 +2788,7 @@ TEST_CASE(WeakPersistentHandleCallback) {
}
}
-TEST_CASE(WeakPersistentHandleNoCallback) {
+TEST_CASE(DartAPI_WeakPersistentHandleNoCallback) {
Dart_WeakPersistentHandle weak_ref = NULL;
int peer = 0;
{
@@ -2814,7 +2814,7 @@ TEST_CASE(WeakPersistentHandleNoCallback) {
}
}
-VM_UNIT_TEST_CASE(WeakPersistentHandlesCallbackShutdown) {
+VM_UNIT_TEST_CASE(DartAPI_WeakPersistentHandlesCallbackShutdown) {
TestCase::CreateTestIsolate();
Dart_EnterScope();
Dart_Handle ref = Dart_True();
@@ -2826,7 +2826,7 @@ VM_UNIT_TEST_CASE(WeakPersistentHandlesCallbackShutdown) {
EXPECT(peer == 42);
}
-TEST_CASE(WeakPersistentHandleExternalAllocationSize) {
+TEST_CASE(DartAPI_WeakPersistentHandleExternalAllocationSize) {
Heap* heap = Isolate::Current()->heap();
EXPECT(heap->ExternalInWords(Heap::kNew) == 0);
EXPECT(heap->ExternalInWords(Heap::kOld) == 0);
@@ -2878,7 +2878,7 @@ TEST_CASE(WeakPersistentHandleExternalAllocationSize) {
}
}
-TEST_CASE(WeakPersistentHandleExternalAllocationSizeNewspaceGC) {
+TEST_CASE(DartAPI_WeakPersistentHandleExternalAllocationSizeNewspaceGC) {
Dart_Isolate isolate = reinterpret_cast<Dart_Isolate>(Isolate::Current());
Heap* heap = Isolate::Current()->heap();
Dart_WeakPersistentHandle weak1 = NULL;
@@ -2921,7 +2921,7 @@ TEST_CASE(WeakPersistentHandleExternalAllocationSizeNewspaceGC) {
}
}
-TEST_CASE(WeakPersistentHandleExternalAllocationSizeOldspaceGC) {
+TEST_CASE(DartAPI_WeakPersistentHandleExternalAllocationSizeOldspaceGC) {
// Check that external allocation in old space can trigger GC.
Isolate* isolate = Isolate::Current();
Dart_EnterScope();
@@ -2950,7 +2950,7 @@ TEST_CASE(WeakPersistentHandleExternalAllocationSizeOldspaceGC) {
Dart_ExitScope();
}
-TEST_CASE(WeakPersistentHandleExternalAllocationSizeOddReferents) {
+TEST_CASE(DartAPI_WeakPersistentHandleExternalAllocationSizeOddReferents) {
Heap* heap = Isolate::Current()->heap();
Dart_WeakPersistentHandle weak1 = NULL;
static const intptr_t kWeak1ExternalSize = 1 * KB;
@@ -3001,7 +3001,7 @@ static void ImplicitReferencesCallback(void* isolate_callback_data,
}
}
-TEST_CASE(ImplicitReferencesOldSpace) {
+TEST_CASE(DartAPI_ImplicitReferencesOldSpace) {
Dart_PersistentHandle strong = NULL;
Dart_WeakPersistentHandle strong_weak = NULL;
@@ -3066,7 +3066,7 @@ TEST_CASE(ImplicitReferencesOldSpace) {
}
}
-TEST_CASE(ImplicitReferencesNewSpace) {
+TEST_CASE(DartAPI_ImplicitReferencesNewSpace) {
Dart_PersistentHandle strong = NULL;
Dart_WeakPersistentHandle strong_weak = NULL;
@@ -3152,7 +3152,7 @@ static void EpilogueCallbackTimes5() {
global_epilogue_callback_status *= 5;
}
-TEST_CASE(SetGarbageCollectionCallbacks) {
+TEST_CASE(DartAPI_SetGarbageCollectionCallbacks) {
// GC callback addition testing.
// Add GC callbacks.
@@ -3181,7 +3181,7 @@ TEST_CASE(SetGarbageCollectionCallbacks) {
EXPECT(Dart_IsError(Dart_SetGcCallbacks(NULL, &EpilogueCallbackTimes4)));
}
-TEST_CASE(SingleGarbageCollectionCallback) {
+TEST_CASE(DartAPI_SingleGarbageCollectionCallback) {
// Add a prologue callback.
EXPECT_VALID(
Dart_SetGcCallbacks(&PrologueCallbackTimes2, &EpilogueCallbackNOP));
@@ -3292,7 +3292,7 @@ TEST_CASE(SingleGarbageCollectionCallback) {
// Unit test for creating multiple scopes and local handles within them.
// Ensure that the local handles get all cleaned out when exiting the
// scope.
-VM_UNIT_TEST_CASE(LocalHandles) {
+VM_UNIT_TEST_CASE(DartAPI_LocalHandles) {
TestCase::CreateTestIsolate();
Thread* thread = Thread::Current();
Isolate* isolate = thread->isolate();
@@ -3355,7 +3355,7 @@ VM_UNIT_TEST_CASE(LocalHandles) {
// Unit test for creating multiple scopes and allocating objects in the
// zone for the scope. Ensure that the memory is freed when the scope
// exits.
-VM_UNIT_TEST_CASE(LocalZoneMemory) {
+VM_UNIT_TEST_CASE(DartAPI_LocalZoneMemory) {
TestCase::CreateTestIsolate();
Thread* thread = Thread::Current();
EXPECT(thread != NULL);
@@ -3396,7 +3396,7 @@ VM_UNIT_TEST_CASE(LocalZoneMemory) {
Dart_ShutdownIsolate();
}
-VM_UNIT_TEST_CASE(Isolates) {
+VM_UNIT_TEST_CASE(DartAPI_Isolates) {
// This test currently assumes that the Dart_Isolate type is an opaque
// representation of Isolate*.
Dart_Isolate iso_1 = TestCase::CreateTestIsolate();
@@ -3419,7 +3419,7 @@ VM_UNIT_TEST_CASE(Isolates) {
EXPECT(NULL == Dart_CurrentIsolate());
}
-VM_UNIT_TEST_CASE(CurrentIsolateData) {
+VM_UNIT_TEST_CASE(DartAPI_CurrentIsolateData) {
intptr_t mydata = 12345;
char* err;
Dart_Isolate isolate =
@@ -3452,7 +3452,7 @@ static Dart_Handle LoadScript(const char* url_str, const char* source) {
return Dart_LoadScript(url, Dart_Null(), script, 0, 0);
}
-VM_UNIT_TEST_CASE(IsolateSetCheckedMode) {
+VM_UNIT_TEST_CASE(DartAPI_IsolateSetCheckedMode) {
const char* kScriptChars =
"int bad1() {\n"
" int foo = 'string';\n"
@@ -3505,7 +3505,7 @@ VM_UNIT_TEST_CASE(IsolateSetCheckedMode) {
Dart_ShutdownIsolate();
}
-TEST_CASE(DebugName) {
+TEST_CASE(DartAPI_DebugName) {
Dart_Handle debug_name = Dart_DebugName();
EXPECT_VALID(debug_name);
EXPECT(Dart_IsString(debug_name));
@@ -3513,7 +3513,7 @@ TEST_CASE(DebugName) {
static void MyMessageNotifyCallback(Dart_Isolate dest_isolate) {}
-VM_UNIT_TEST_CASE(SetMessageCallbacks) {
+VM_UNIT_TEST_CASE(DartAPI_SetMessageCallbacks) {
Dart_Isolate dart_isolate = TestCase::CreateTestIsolate();
Dart_SetMessageNotifyCallback(&MyMessageNotifyCallback);
Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate);
@@ -3521,7 +3521,7 @@ VM_UNIT_TEST_CASE(SetMessageCallbacks) {
Dart_ShutdownIsolate();
}
-TEST_CASE(SetStickyError) {
+TEST_CASE(DartAPI_SetStickyError) {
const char* kScriptChars = "main() => throw 'HI';";
Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
Dart_Handle retobj = Dart_Invoke(lib, NewString("main"), 0, NULL);
@@ -3537,7 +3537,7 @@ TEST_CASE(SetStickyError) {
EXPECT(Dart_GetStickyError() == Dart_Null());
}
-TEST_CASE(TypeGetNonParamtericTypes) {
+TEST_CASE(DartAPI_TypeGetNonParamtericTypes) {
const char* kScriptChars =
"class MyClass0 {\n"
"}\n"
@@ -3628,7 +3628,7 @@ TEST_CASE(TypeGetNonParamtericTypes) {
EXPECT(Dart_IdentityEquals(type2, type2_obj));
}
-TEST_CASE(TypeGetParameterizedTypes) {
+TEST_CASE(DartAPI_TypeGetParameterizedTypes) {
const char* kScriptChars =
"class MyClass0<A, B> {\n"
"}\n"
@@ -3773,7 +3773,7 @@ static void TestFieldNotFound(Dart_Handle container, Dart_Handle name) {
EXPECT(Dart_IsError(Dart_SetField(container, name, Dart_Null())));
}
-TEST_CASE(FieldAccess) {
+TEST_CASE(DartAPI_FieldAccess) {
const char* kScriptChars =
"class BaseFields {\n"
" BaseFields()\n"
@@ -4024,7 +4024,7 @@ TEST_CASE(FieldAccess) {
TestFieldNotFound(lib, name);
}
-TEST_CASE(SetField_FunnyValue) {
+TEST_CASE(DartAPI_SetField_FunnyValue) {
const char* kScriptChars = "var top;\n";
Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
@@ -4069,7 +4069,7 @@ static Dart_NativeFunction native_field_lookup(Dart_Handle name,
return reinterpret_cast<Dart_NativeFunction>(&NativeFieldLookup);
}
-TEST_CASE(InjectNativeFields1) {
+TEST_CASE(DartAPI_InjectNativeFields1) {
const char* kScriptChars =
"class NativeFields extends NativeFieldsWrapper {\n"
" NativeFields(int i, int j) : fld1 = i, fld2 = j {}\n"
@@ -4120,7 +4120,7 @@ TEST_CASE(InjectNativeFields1) {
EXPECT_EQ(kNumNativeFields, cls.num_native_fields());
}
-TEST_CASE(InjectNativeFields2) {
+TEST_CASE(DartAPI_InjectNativeFields2) {
const char* kScriptChars =
"class NativeFields extends NativeFieldsWrapper {\n"
" NativeFields(int i, int j) : fld1 = i, fld2 = j {}\n"
@@ -4147,7 +4147,7 @@ TEST_CASE(InjectNativeFields2) {
EXPECT(Dart_IsError(result));
}
-TEST_CASE(InjectNativeFields3) {
+TEST_CASE(DartAPI_InjectNativeFields3) {
const char* kScriptChars =
"import 'dart:nativewrappers';"
"class NativeFields extends NativeFieldWrapperClass2 {\n"
@@ -4188,7 +4188,7 @@ TEST_CASE(InjectNativeFields3) {
EXPECT_EQ(kNumNativeFields, cls.num_native_fields());
}
-TEST_CASE(InjectNativeFields4) {
+TEST_CASE(DartAPI_InjectNativeFields4) {
const char* kScriptChars =
"import 'dart:nativewrappers';"
"class NativeFields extends NativeFieldWrapperClass2 {\n"
@@ -4268,7 +4268,7 @@ static Dart_NativeFunction TestNativeFieldsAccess_lookup(Dart_Handle name,
}
}
-TEST_CASE(TestNativeFieldsAccess) {
+TEST_CASE(DartAPI_TestNativeFieldsAccess) {
const char* kScriptChars =
"import 'dart:nativewrappers';"
"class NativeFields extends NativeFieldWrapperClass2 {\n"
@@ -4296,7 +4296,7 @@ TEST_CASE(TestNativeFieldsAccess) {
EXPECT_VALID(result);
}
-TEST_CASE(InjectNativeFieldsSuperClass) {
+TEST_CASE(DartAPI_InjectNativeFieldsSuperClass) {
const char* kScriptChars =
"import 'dart:nativewrappers';"
"class NativeFieldsSuper extends NativeFieldWrapperClass1 {\n"
@@ -4400,7 +4400,7 @@ static void TestNativeFields(Dart_Handle retobj) {
EXPECT_EQ(20, value);
}
-TEST_CASE(NativeFieldAccess) {
+TEST_CASE(DartAPI_NativeFieldAccess) {
const char* kScriptChars =
"class NativeFields extends NativeFieldsWrapper {\n"
" NativeFields(int i, int j) : fld1 = i, fld2 = j {}\n"
@@ -4449,7 +4449,7 @@ TEST_CASE(NativeFieldAccess) {
EXPECT_STREQ("myerror", Dart_GetError(result));
}
-TEST_CASE(ImplicitNativeFieldAccess) {
+TEST_CASE(DartAPI_ImplicitNativeFieldAccess) {
const char* kScriptChars =
"import 'dart:nativewrappers';"
"class NativeFields extends NativeFieldWrapperClass4 {\n"
@@ -4475,7 +4475,7 @@ TEST_CASE(ImplicitNativeFieldAccess) {
TestNativeFields(retobj);
}
-TEST_CASE(NegativeNativeFieldAccess) {
+TEST_CASE(DartAPI_NegativeNativeFieldAccess) {
const char* kScriptChars =
"class NativeFields {\n"
" NativeFields(int i, int j) : fld1 = i, fld2 = j {}\n"
@@ -4546,7 +4546,7 @@ TEST_CASE(NegativeNativeFieldAccess) {
EXPECT(Dart_IsError(result));
}
-TEST_CASE(NegativeNativeFieldInIsolateMessage) {
+TEST_CASE(DartAPI_NegativeNativeFieldInIsolateMessage) {
const char* kScriptChars =
"import 'dart:isolate';\n"
"import 'dart:nativewrappers';\n"
@@ -4583,7 +4583,7 @@ TEST_CASE(NegativeNativeFieldInIsolateMessage) {
EXPECT(Dart_IsError(retobj));
}
-TEST_CASE(GetStaticField_RunsInitializer) {
+TEST_CASE(DartAPI_GetStaticField_RunsInitializer) {
const char* kScriptChars =
"class TestClass {\n"
" static const int fld1 = 7;\n"
@@ -4624,7 +4624,7 @@ TEST_CASE(GetStaticField_RunsInitializer) {
EXPECT_EQ(13, value);
}
-TEST_CASE(GetField_CheckIsolate) {
+TEST_CASE(DartAPI_GetField_CheckIsolate) {
const char* kScriptChars =
"class TestClass {\n"
" static int fld2 = 11;\n"
@@ -4645,7 +4645,7 @@ TEST_CASE(GetField_CheckIsolate) {
EXPECT_EQ(11, value);
}
-TEST_CASE(SetField_CheckIsolate) {
+TEST_CASE(DartAPI_SetField_CheckIsolate) {
const char* kScriptChars =
"class TestClass {\n"
" static int fld2 = 11;\n"
@@ -4669,7 +4669,7 @@ TEST_CASE(SetField_CheckIsolate) {
EXPECT_EQ(13, value);
}
-TEST_CASE(New) {
+TEST_CASE(DartAPI_New) {
const char* kScriptChars =
"class MyClass {\n"
" MyClass() : foo = 7 {}\n"
@@ -4900,7 +4900,7 @@ TEST_CASE(New) {
EXPECT(!instanceOf);
}
-TEST_CASE(New_Issue2971) {
+TEST_CASE(DartAPI_New_Issue2971) {
// Issue 2971: We were unable to use Dart_New to construct an
// instance of List, due to problems implementing interface
// factories.
@@ -4925,7 +4925,7 @@ static Dart_Handle PrivateLibName(Dart_Handle lib, const char* str) {
return Api::NewHandle(thread, library_obj.PrivateName(name));
}
-TEST_CASE(Invoke) {
+TEST_CASE(DartAPI_Invoke) {
const char* kScriptChars =
"class BaseMethods {\n"
" inheritedMethod(arg) => 'inherited $arg';\n"
@@ -5044,7 +5044,7 @@ TEST_CASE(Invoke) {
EXPECT_STREQ("hidden top !!!", str);
}
-TEST_CASE(Invoke_PrivateStatic) {
+TEST_CASE(DartAPI_Invoke_PrivateStatic) {
const char* kScriptChars =
"class Methods {\n"
" static _staticMethod(arg) => 'hidden static $arg';\n"
@@ -5069,7 +5069,7 @@ TEST_CASE(Invoke_PrivateStatic) {
EXPECT_STREQ("hidden static !!!", str);
}
-TEST_CASE(Invoke_FunnyArgs) {
+TEST_CASE(DartAPI_Invoke_FunnyArgs) {
const char* kScriptChars = "test(arg) => 'hello $arg';\n";
Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
@@ -5115,7 +5115,7 @@ TEST_CASE(Invoke_FunnyArgs) {
EXPECT_STREQ("myerror", Dart_GetError(result));
}
-TEST_CASE(Invoke_Null) {
+TEST_CASE(DartAPI_Invoke_Null) {
Dart_Handle result = Dart_Invoke(Dart_Null(), NewString("toString"), 0, NULL);
EXPECT_VALID(result);
EXPECT(Dart_IsString(result));
@@ -5130,7 +5130,7 @@ TEST_CASE(Invoke_Null) {
EXPECT(Dart_ErrorHasException(result));
}
-TEST_CASE(InvokeNoSuchMethod) {
+TEST_CASE(DartAPI_InvokeNoSuchMethod) {
const char* kScriptChars =
"import 'dart:_internal' as _internal;\n"
"class Expect {\n"
@@ -5194,7 +5194,7 @@ TEST_CASE(InvokeNoSuchMethod) {
EXPECT_EQ(3, value);
}
-TEST_CASE(Invoke_CrossLibrary) {
+TEST_CASE(DartAPI_Invoke_CrossLibrary) {
const char* kLibrary1Chars =
"library library1_name;\n"
"void local() {}\n"
@@ -5232,7 +5232,7 @@ TEST_CASE(Invoke_CrossLibrary) {
"did not find top-level function '_imported'");
}
-TEST_CASE(InvokeClosure) {
+TEST_CASE(DartAPI_InvokeClosure) {
const char* kScriptChars =
"class InvokeClosure {\n"
" InvokeClosure(int i, int j) : fld1 = i, fld2 = j {}\n"
@@ -5312,7 +5312,7 @@ static Dart_NativeFunction native_lookup(Dart_Handle name,
return reinterpret_cast<Dart_NativeFunction>(&ExceptionNative);
}
-TEST_CASE(ThrowException) {
+TEST_CASE(DartAPI_ThrowException) {
const char* kScriptChars = "int test() native \"ThrowException_native\";";
Dart_Handle result;
intptr_t size = thread->ZoneSizeInBytes();
@@ -5484,7 +5484,7 @@ static Dart_NativeFunction native_args_lookup(Dart_Handle name,
return NULL;
}
-TEST_CASE(GetNativeArguments) {
+TEST_CASE(DartAPI_GetNativeArguments) {
const bool saved_flag = FLAG_support_externalizable_strings;
FLAG_support_externalizable_strings = true;
@@ -5550,7 +5550,7 @@ static Dart_NativeFunction gnac_lookup(Dart_Handle name,
return reinterpret_cast<Dart_NativeFunction>(&NativeArgumentCounter);
}
-TEST_CASE(GetNativeArgumentCount) {
+TEST_CASE(DartAPI_GetNativeArgumentCount) {
const char* kScriptChars =
"class MyObject {"
" int method1(int i, int j) native 'Name_Does_Not_Matter';"
@@ -5573,7 +5573,7 @@ TEST_CASE(GetNativeArgumentCount) {
EXPECT_EQ(3, value);
}
-TEST_CASE(GetType) {
+TEST_CASE(DartAPI_GetType) {
const char* kScriptChars =
"library testlib;\n"
"class Class {\n"
@@ -5621,7 +5621,7 @@ TEST_CASE(GetType) {
EXPECT_STREQ("myerror", Dart_GetError(type));
}
-TEST_CASE(InstanceOf) {
+TEST_CASE(DartAPI_InstanceOf) {
const char* kScriptChars =
"class OtherClass {\n"
" static returnNull() { return null; }\n"
@@ -5695,7 +5695,7 @@ static Dart_Handle library_handler(Dart_LibraryTag tag,
return Api::Success();
}
-TEST_CASE(LoadScript) {
+TEST_CASE(DartAPI_LoadScript) {
const char* kScriptChars =
"main() {"
" return 12345;"
@@ -5768,7 +5768,7 @@ TEST_CASE(LoadScript) {
Dart_GetError(result));
}
-TEST_CASE(RootLibrary) {
+TEST_CASE(DartAPI_RootLibrary) {
const char* kScriptChars =
"library testlib;"
"main() {"
@@ -5857,7 +5857,7 @@ static Dart_Handle import_library_handler(Dart_LibraryTag tag,
return Api::Success();
}
-TEST_CASE(LoadScript_CompileError) {
+TEST_CASE(DartAPI_LoadScript_CompileError) {
const char* kScriptChars = ")";
Dart_Handle result = Dart_SetLibraryTagHandler(import_library_handler);
EXPECT_VALID(result);
@@ -5868,7 +5868,7 @@ TEST_CASE(LoadScript_CompileError) {
}
}
-TEST_CASE(LookupLibrary) {
+TEST_CASE(DartAPI_LookupLibrary) {
const char* kScriptChars =
"import 'library1_dart';"
"main() {}";
@@ -5914,7 +5914,7 @@ TEST_CASE(LookupLibrary) {
Dart_GetError(result));
}
-TEST_CASE(LibraryName) {
+TEST_CASE(DartAPI_LibraryName) {
const char* kLibrary1Chars = "library library1_name;";
Dart_Handle url = NewString("library1_url");
Dart_Handle source = NewString(kLibrary1Chars);
@@ -5947,7 +5947,7 @@ TEST_CASE(LibraryName) {
#ifndef PRODUCT
-TEST_CASE(LibraryId) {
+TEST_CASE(DartAPI_LibraryId) {
const char* kLibrary1Chars = "library library1_name;";
Dart_Handle url = NewString("library1_url");
Dart_Handle source = NewString(kLibrary1Chars);
@@ -5984,7 +5984,7 @@ TEST_CASE(LibraryId) {
#endif // !PRODUCT
-TEST_CASE(LibraryUrl) {
+TEST_CASE(DartAPI_LibraryUrl) {
const char* kLibrary1Chars = "library library1_name;";
Dart_Handle url = NewString("library1_url");
Dart_Handle source = NewString(kLibrary1Chars);
@@ -6015,7 +6015,7 @@ TEST_CASE(LibraryUrl) {
EXPECT_STREQ("library1_url", cstr);
}
-TEST_CASE(LibraryGetClassNames) {
+TEST_CASE(DartAPI_LibraryGetClassNames) {
const char* kLibraryChars =
"library library_name;\n"
"\n"
@@ -6053,7 +6053,7 @@ TEST_CASE(LibraryGetClassNames) {
EXPECT_STREQ("[A, B, C, _A, _B, _C]", list_cstr);
}
-TEST_CASE(GetFunctionNames) {
+TEST_CASE(DartAPI_GetFunctionNames) {
const char* kLibraryChars =
"library library_name;\n"
"\n"
@@ -6124,7 +6124,7 @@ TEST_CASE(GetFunctionNames) {
EXPECT_STREQ("[A2, B2, C2=, MyClass, _A2, _B2, _C2=]", list_cstr);
}
-TEST_CASE(LibraryImportLibrary) {
+TEST_CASE(DartAPI_LibraryImportLibrary) {
const char* kLibrary1Chars = "library library1_name;";
const char* kLibrary2Chars = "library library2_name;";
Dart_Handle error = Dart_NewApiError("incoming error");
@@ -6178,7 +6178,7 @@ TEST_CASE(LibraryImportLibrary) {
EXPECT_VALID(result);
}
-TEST_CASE(ImportLibraryWithPrefix) {
+TEST_CASE(DartAPI_ImportLibraryWithPrefix) {
const char* kLibrary1Chars =
"library library1_name;"
"int bar() => 42;";
@@ -6219,7 +6219,7 @@ TEST_CASE(ImportLibraryWithPrefix) {
EXPECT_EQ(42, value);
}
-TEST_CASE(LoadLibrary) {
+TEST_CASE(DartAPI_LoadLibrary) {
const char* kLibrary1Chars = "library library1_name;";
Dart_Handle error = Dart_NewApiError("incoming error");
Dart_Handle result;
@@ -6279,7 +6279,7 @@ TEST_CASE(LoadLibrary) {
Dart_GetError(result));
}
-TEST_CASE(LoadLibrary_CompileError) {
+TEST_CASE(DartAPI_LoadLibrary_CompileError) {
const char* kLibrary1Chars =
"library library1_name;"
")";
@@ -6290,7 +6290,7 @@ TEST_CASE(LoadLibrary_CompileError) {
EXPECT(strstr(Dart_GetError(result), "unexpected token ')'"));
}
-TEST_CASE(LoadSource) {
+TEST_CASE(DartAPI_LoadSource) {
const char* kLibrary1Chars = "library library1_name;";
const char* kSourceChars = "part of library1_name;\n// Something innocuous";
const char* kBadSourceChars = ")";
@@ -6379,7 +6379,7 @@ TEST_CASE(LoadSource) {
EXPECT(Dart_IsError(result));
}
-TEST_CASE(LoadSource_LateLoad) {
+TEST_CASE(DartAPI_LoadSource_LateLoad) {
const char* kLibrary1Chars =
"library library1_name;\n"
"class OldClass {\n"
@@ -6428,7 +6428,7 @@ TEST_CASE(LoadSource_LateLoad) {
EXPECT_STREQ("bar", result_cstr);
}
-TEST_CASE(LoadPatch) {
+TEST_CASE(DartAPI_LoadPatch) {
const char* kLibrary1Chars = "library library1_name;";
const char* kSourceChars =
"part of library1_name;\n"
@@ -6464,7 +6464,7 @@ TEST_CASE(LoadPatch) {
EXPECT_EQ(42, value);
}
-TEST_CASE(LoadPatchSignatureMismatch) {
+TEST_CASE(DartAPI_LoadPatchSignatureMismatch) {
// This tests the sort of APIs with intentional signature mismatches we need
// for typed Dart-JavaScript interop where we emulated JavaScript semantics
// for optional arguments.
@@ -6592,7 +6592,7 @@ static Dart_NativeFunction PatchNativeResolver(Dart_Handle name,
return &PatchNativeFunction;
}
-TEST_CASE(ParsePatchLibrary) {
+TEST_CASE(DartAPI_ParsePatchLibrary) {
const char* kLibraryChars =
"library patched_library;\n"
"class A {\n"
@@ -6790,7 +6790,7 @@ static Dart_NativeFunction MyNativeResolver2(Dart_Handle name,
return &MyNativeFunction2;
}
-TEST_CASE(SetNativeResolver) {
+TEST_CASE(DartAPI_SetNativeResolver) {
const char* kScriptChars =
"class Test {"
" static foo() native \"SomeNativeFunction\";\n"
@@ -6868,7 +6868,7 @@ TEST_CASE(SetNativeResolver) {
// Test that an imported name does not clash with the same name defined
// in the importing library.
-TEST_CASE(ImportLibrary2) {
+TEST_CASE(DartAPI_ImportLibrary2) {
const char* kScriptChars =
"import 'library1_dart';\n"
"var foo;\n"
@@ -6905,7 +6905,7 @@ TEST_CASE(ImportLibrary2) {
// Test that if the same name is imported from two libraries, it is
// an error if that name is referenced.
-TEST_CASE(ImportLibrary3) {
+TEST_CASE(DartAPI_ImportLibrary3) {
const char* kScriptChars =
"import 'library2_dart';\n"
"import 'library1_dart';\n"
@@ -6944,7 +6944,7 @@ TEST_CASE(ImportLibrary3) {
// Test that if the same name is imported from two libraries, it is
// not an error if that name is not used.
-TEST_CASE(ImportLibrary4) {
+TEST_CASE(DartAPI_ImportLibrary4) {
const char* kScriptChars =
"import 'library2_dart';\n"
"import 'library1_dart';\n"
@@ -6978,7 +6978,7 @@ TEST_CASE(ImportLibrary4) {
EXPECT_VALID(result);
}
-TEST_CASE(ImportLibrary5) {
+TEST_CASE(DartAPI_ImportLibrary5) {
const char* kScriptChars =
"import 'lib.dart';\n"
"abstract class Y {\n"
@@ -7038,19 +7038,19 @@ void NewNativePort_send321(Dart_Port dest_port_id, Dart_CObject* message) {
response);
}
-TEST_CASE(IllegalNewSendPort) {
+TEST_CASE(DartAPI_IllegalNewSendPort) {
Dart_Handle error = Dart_NewSendPort(ILLEGAL_PORT);
EXPECT(Dart_IsError(error));
EXPECT(Dart_IsApiError(error));
}
-TEST_CASE(IllegalPost) {
+TEST_CASE(DartAPI_IllegalPost) {
Dart_Handle message = Dart_True();
bool success = Dart_Post(ILLEGAL_PORT, message);
EXPECT(!success);
}
-VM_UNIT_TEST_CASE(NewNativePort) {
+VM_UNIT_TEST_CASE(DartAPI_NewNativePort) {
// Create a port with a bogus handler.
Dart_Port error_port = Dart_NewNativePort("Foo", NULL, true);
EXPECT_EQ(ILLEGAL_PORT, error_port);
@@ -7133,7 +7133,7 @@ void NewNativePort_sendInteger321(Dart_Port dest_port_id,
321);
}
-TEST_CASE(NativePortPostInteger) {
+TEST_CASE(DartAPI_NativePortPostInteger) {
const char* kScriptChars =
"import 'dart:isolate';\n"
"void callPort(SendPort port) {\n"
@@ -7198,7 +7198,7 @@ void NewNativePort_nativeReceiveNull(Dart_Port dest_port_id,
}
}
-TEST_CASE(NativePortReceiveNull) {
+TEST_CASE(DartAPI_NativePortReceiveNull) {
const char* kScriptChars =
"import 'dart:isolate';\n"
"void callPort(SendPort port) {\n"
@@ -7250,7 +7250,7 @@ void NewNativePort_nativeReceiveInteger(Dart_Port dest_port_id,
}
}
-TEST_CASE(NativePortReceiveInteger) {
+TEST_CASE(DartAPI_NativePortReceiveInteger) {
const char* kScriptChars =
"import 'dart:isolate';\n"
"void callPort(SendPort port) {\n"
@@ -7357,11 +7357,11 @@ static void RunLoopTest(bool throw_exception) {
Isolate::SetCreateCallback(saved);
}
-VM_UNIT_TEST_CASE(RunLoop_Success) {
+VM_UNIT_TEST_CASE(DartAPI_RunLoop_Success) {
RunLoopTest(false);
}
-VM_UNIT_TEST_CASE(RunLoop_Exception) {
+VM_UNIT_TEST_CASE(DartAPI_RunLoop_Exception) {
RunLoopTest(true);
}
@@ -7449,7 +7449,7 @@ static void IsolateShutdownTestCallback(void* callback_data) {
saved_callback_data = callback_data;
}
-VM_UNIT_TEST_CASE(IsolateShutdown) {
+VM_UNIT_TEST_CASE(DartAPI_IsolateShutdown) {
Dart_IsolateShutdownCallback saved = Isolate::ShutdownCallback();
Isolate::SetShutdownCallback(IsolateShutdownTestCallback);
@@ -7497,7 +7497,7 @@ static void IsolateShutdownRunDartCodeTestCallback(void* callback_data) {
Dart_ExitScope();
}
-VM_UNIT_TEST_CASE(IsolateShutdownRunDartCode) {
+VM_UNIT_TEST_CASE(DartAPI_IsolateShutdownRunDartCode) {
const char* kScriptChars =
"int add(int a, int b) {\n"
" return a + b;\n"
@@ -7637,7 +7637,7 @@ static Dart_NativeFunction MyNativeClosureResolver(Dart_Handle name,
}
}
-TEST_CASE(NativeFunctionClosure) {
+TEST_CASE(DartAPI_NativeFunctionClosure) {
const char* kScriptChars =
"class Test {"
" int foo1() native \"NativeFoo1\";\n"
@@ -7776,7 +7776,7 @@ static Dart_NativeFunction MyStaticNativeClosureResolver(
}
}
-TEST_CASE(NativeStaticFunctionClosure) {
+TEST_CASE(DartAPI_NativeStaticFunctionClosure) {
const char* kScriptChars =
"class Test {"
" static int foo1() native \"StaticNativeFoo1\";\n"
@@ -7848,7 +7848,7 @@ TEST_CASE(NativeStaticFunctionClosure) {
EXPECT_EQ(0, value);
}
-TEST_CASE(RangeLimits) {
+TEST_CASE(DartAPI_RangeLimits) {
uint8_t chars8[1] = {'a'};
uint16_t chars16[1] = {'a'};
int32_t chars32[1] = {'a'};
@@ -7873,7 +7873,7 @@ TEST_CASE(RangeLimits) {
"expects argument 'length' to be in the range");
}
-TEST_CASE(NewString_Null) {
+TEST_CASE(DartAPI_NewString_Null) {
Dart_Handle str = Dart_NewStringFromUTF8(NULL, 0);
EXPECT_VALID(str);
EXPECT(Dart_IsString(str));
@@ -7898,7 +7898,7 @@ TEST_CASE(NewString_Null) {
// Try to allocate a peer with a handles to objects of prohibited
// subtypes.
-TEST_CASE(InvalidGetSetPeer) {
+TEST_CASE(DartAPI_InvalidGetSetPeer) {
void* out = &out;
EXPECT(Dart_IsError(Dart_GetPeer(Dart_Null(), &out)));
EXPECT(out == &out);
@@ -7935,7 +7935,7 @@ TEST_CASE(InvalidGetSetPeer) {
// Allocates an object in new space and assigns it a peer. Removes
// the peer and checks that the count of peer objects is decremented
// by one.
-TEST_CASE(OneNewSpacePeer) {
+TEST_CASE(DartAPI_OneNewSpacePeer) {
Isolate* isolate = Isolate::Current();
Dart_Handle str = NewString("a string");
EXPECT_VALID(str);
@@ -7960,7 +7960,7 @@ TEST_CASE(OneNewSpacePeer) {
// Allocates an object in new space and assigns it a peer. Allows the
// peer referent to be garbage collected and checks that the count of
// peer objects is decremented by one.
-TEST_CASE(CollectOneNewSpacePeer) {
+TEST_CASE(DartAPI_CollectOneNewSpacePeer) {
Isolate* isolate = Isolate::Current();
Dart_EnterScope();
{
@@ -7999,7 +7999,7 @@ TEST_CASE(CollectOneNewSpacePeer) {
// Allocates two objects in new space and assigns them peers. Removes
// the peers and checks that the count of peer objects is decremented
// by two.
-TEST_CASE(TwoNewSpacePeers) {
+TEST_CASE(DartAPI_TwoNewSpacePeers) {
Isolate* isolate = Isolate::Current();
Dart_Handle s1 = NewString("s1");
EXPECT_VALID(s1);
@@ -8038,7 +8038,7 @@ TEST_CASE(TwoNewSpacePeers) {
// Allocates two objects in new space and assigns them a peer. Allow
// the peer referents to be garbage collected and check that the count
// of peer objects is decremented by two.
-TEST_CASE(CollectTwoNewSpacePeers) {
+TEST_CASE(DartAPI_CollectTwoNewSpacePeers) {
Isolate* isolate = Isolate::Current();
Dart_EnterScope();
{
@@ -8079,7 +8079,7 @@ TEST_CASE(CollectTwoNewSpacePeers) {
// Allocates several objects in new space. Performs successive
// garbage collections and checks that the peer count is stable.
-TEST_CASE(CopyNewSpacePeers) {
+TEST_CASE(DartAPI_CopyNewSpacePeers) {
const int kPeerCount = 10;
Isolate* isolate = Isolate::Current();
Dart_Handle s[kPeerCount];
@@ -8113,7 +8113,7 @@ TEST_CASE(CopyNewSpacePeers) {
// Allocates an object in new space and assigns it a peer. Promotes
// the peer to old space. Removes the peer and check that the count
// of peer objects is decremented by one.
-TEST_CASE(OnePromotedPeer) {
+TEST_CASE(DartAPI_OnePromotedPeer) {
Isolate* isolate = Isolate::Current();
Dart_Handle str = NewString("a string");
EXPECT_VALID(str);
@@ -8153,7 +8153,7 @@ TEST_CASE(OnePromotedPeer) {
// Allocates an object in old space and assigns it a peer. Removes
// the peer and checks that the count of peer objects is decremented
// by one.
-TEST_CASE(OneOldSpacePeer) {
+TEST_CASE(DartAPI_OneOldSpacePeer) {
Isolate* isolate = Isolate::Current();
Dart_Handle str = Api::NewHandle(thread, String::New("str", Heap::kOld));
EXPECT_VALID(str);
@@ -8185,7 +8185,7 @@ TEST_CASE(OneOldSpacePeer) {
// Allocates an object in old space and assigns it a peer. Allow the
// peer referent to be garbage collected and check that the count of
// peer objects is decremented by one.
-TEST_CASE(CollectOneOldSpacePeer) {
+TEST_CASE(DartAPI_CollectOneOldSpacePeer) {
Isolate* isolate = Isolate::Current();
Dart_EnterScope();
{
@@ -8224,7 +8224,7 @@ TEST_CASE(CollectOneOldSpacePeer) {
// Allocates two objects in old space and assigns them peers. Removes
// the peers and checks that the count of peer objects is decremented
// by two.
-TEST_CASE(TwoOldSpacePeers) {
+TEST_CASE(DartAPI_TwoOldSpacePeers) {
Isolate* isolate = Isolate::Current();
Dart_Handle s1 = Api::NewHandle(thread, String::New("s1", Heap::kOld));
EXPECT_VALID(s1);
@@ -8267,7 +8267,7 @@ TEST_CASE(TwoOldSpacePeers) {
// Allocates two objects in old space and assigns them a peer. Allows
// the peer referents to be garbage collected and checks that the
// count of peer objects is decremented by two.
-TEST_CASE(CollectTwoOldSpacePeers) {
+TEST_CASE(DartAPI_CollectTwoOldSpacePeers) {
Isolate* isolate = Isolate::Current();
Dart_EnterScope();
{
@@ -8314,7 +8314,7 @@ static void MakeExternalCback(void* peer) {
*static_cast<int*>(peer) *= 2;
}
-TEST_CASE(MakeExternalString) {
+TEST_CASE(DartAPI_MakeExternalString) {
const bool saved_flag = FLAG_support_externalizable_strings;
FLAG_support_externalizable_strings = true;
@@ -8499,7 +8499,7 @@ TEST_CASE(MakeExternalString) {
FLAG_support_externalizable_strings = saved_flag;
}
-TEST_CASE(ExternalizeConstantStrings) {
+TEST_CASE(DartAPI_ExternalizeConstantStrings) {
const bool saved_flag = FLAG_support_externalizable_strings;
FLAG_support_externalizable_strings = true;
@@ -8524,7 +8524,7 @@ TEST_CASE(ExternalizeConstantStrings) {
FLAG_support_externalizable_strings = saved_flag;
}
-TEST_CASE(LazyLoadDeoptimizes) {
+TEST_CASE(DartAPI_LazyLoadDeoptimizes) {
const char* kLoadFirst =
"library L;\n"
"start(a) {\n"
@@ -8603,7 +8603,7 @@ static Dart_NativeFunction ExternalStringDeoptimize_native_lookup(
// Do not use guarding mechanism on externalizable classes, since their class
// can change on the fly,
-TEST_CASE(GuardExternalizedString) {
+TEST_CASE(DartAPI_GuardExternalizedString) {
const bool saved_flag = FLAG_support_externalizable_strings;
FLAG_support_externalizable_strings = true;
@@ -8642,7 +8642,7 @@ TEST_CASE(GuardExternalizedString) {
FLAG_support_externalizable_strings = saved_flag;
}
-TEST_CASE(ExternalStringDeoptimize) {
+TEST_CASE(DartAPI_ExternalStringDeoptimize) {
const bool saved_flag = FLAG_support_externalizable_strings;
FLAG_support_externalizable_strings = true;
@@ -8677,7 +8677,7 @@ TEST_CASE(ExternalStringDeoptimize) {
FLAG_support_externalizable_strings = saved_flag;
}
-TEST_CASE(ExternalStringPolymorphicDeoptimize) {
+TEST_CASE(DartAPI_ExternalStringPolymorphicDeoptimize) {
const bool saved_flag = FLAG_support_externalizable_strings;
FLAG_support_externalizable_strings = true;
@@ -8713,7 +8713,7 @@ TEST_CASE(ExternalStringPolymorphicDeoptimize) {
FLAG_support_externalizable_strings = saved_flag;
}
-TEST_CASE(ExternalStringLoadElimination) {
+TEST_CASE(DartAPI_ExternalStringLoadElimination) {
const bool saved_flag = FLAG_support_externalizable_strings;
FLAG_support_externalizable_strings = true;
@@ -8743,7 +8743,7 @@ TEST_CASE(ExternalStringLoadElimination) {
FLAG_support_externalizable_strings = saved_flag;
}
-TEST_CASE(ExternalStringGuardFieldDeoptimize) {
+TEST_CASE(DartAPI_ExternalStringGuardFieldDeoptimize) {
const bool saved_flag = FLAG_support_externalizable_strings;
FLAG_support_externalizable_strings = true;
@@ -8784,7 +8784,7 @@ TEST_CASE(ExternalStringGuardFieldDeoptimize) {
FLAG_support_externalizable_strings = saved_flag;
}
-TEST_CASE(ExternalStringStaticFieldDeoptimize) {
+TEST_CASE(DartAPI_ExternalStringStaticFieldDeoptimize) {
const bool saved_flag = FLAG_support_externalizable_strings;
FLAG_support_externalizable_strings = true;
@@ -8820,7 +8820,7 @@ TEST_CASE(ExternalStringStaticFieldDeoptimize) {
FLAG_support_externalizable_strings = saved_flag;
}
-TEST_CASE(ExternalStringTrimDoubleParse) {
+TEST_CASE(DartAPI_ExternalStringTrimDoubleParse) {
const bool saved_flag = FLAG_support_externalizable_strings;
FLAG_support_externalizable_strings = true;
@@ -8849,7 +8849,7 @@ TEST_CASE(ExternalStringTrimDoubleParse) {
FLAG_support_externalizable_strings = saved_flag;
}
-TEST_CASE(ExternalStringDoubleParse) {
+TEST_CASE(DartAPI_ExternalStringDoubleParse) {
const bool saved_flag = FLAG_support_externalizable_strings;
FLAG_support_externalizable_strings = true;
@@ -8878,7 +8878,7 @@ TEST_CASE(ExternalStringDoubleParse) {
FLAG_support_externalizable_strings = saved_flag;
}
-TEST_CASE(ExternalStringIndexOf) {
+TEST_CASE(DartAPI_ExternalStringIndexOf) {
const char* kScriptChars =
"main(String pattern) {\n"
" var str = 'Hello World';\n"
@@ -8902,7 +8902,7 @@ TEST_CASE(ExternalStringIndexOf) {
EXPECT_EQ(6, value);
}
-TEST_CASE(StringFromExternalTypedData) {
+TEST_CASE(DartAPI_StringFromExternalTypedData) {
const char* kScriptChars =
"test(external) {\n"
" var str1 = new String.fromCharCodes(external);\n"
@@ -8981,7 +8981,7 @@ TEST_CASE(StringFromExternalTypedData) {
#ifndef PRODUCT
-TEST_CASE(Timeline_Dart_TimelineDuration) {
+TEST_CASE(DartAPI_TimelineDuration) {
Isolate* isolate = Isolate::Current();
// Grab embedder stream.
TimelineStream* stream = Timeline::GetEmbedderStream();
@@ -8999,7 +8999,7 @@ TEST_CASE(Timeline_Dart_TimelineDuration) {
EXPECT_SUBSTRING("testDurationEvent", js.ToCString());
}
-TEST_CASE(Timeline_Dart_TimelineInstant) {
+TEST_CASE(DartAPI_TimelineInstant) {
Isolate* isolate = Isolate::Current();
// Grab embedder stream.
TimelineStream* stream = Timeline::GetEmbedderStream();
@@ -9016,7 +9016,7 @@ TEST_CASE(Timeline_Dart_TimelineInstant) {
EXPECT_SUBSTRING("testInstantEvent", js.ToCString());
}
-TEST_CASE(Timeline_Dart_TimelineAsyncDisabled) {
+TEST_CASE(DartAPI_TimelineAsyncDisabled) {
// Grab embedder stream.
TimelineStream* stream = Timeline::GetEmbedderStream();
// Make sure it is disabled.
@@ -9033,7 +9033,7 @@ TEST_CASE(Timeline_Dart_TimelineAsyncDisabled) {
EXPECT_NOTSUBSTRING("testAsyncEvent", js.ToCString());
}
-TEST_CASE(Timeline_Dart_TimelineAsync) {
+TEST_CASE(DartAPI_TimelineAsync) {
Isolate* isolate = Isolate::Current();
// Grab embedder stream.
TimelineStream* stream = Timeline::GetEmbedderStream();
@@ -9083,7 +9083,7 @@ static void AppendStreamConsumer(Dart_StreamConsumer_State state,
data->buffer_length += buffer_length;
}
-TEST_CASE(Timeline_Dart_TimelineGetTrace) {
+TEST_CASE(DartAPI_TimelineGetTrace) {
const char* kScriptChars =
"foo() => 'a';\n"
"main() => foo();\n";
@@ -9126,7 +9126,7 @@ TEST_CASE(Timeline_Dart_TimelineGetTrace) {
free(data.buffer);
}
-TEST_CASE(Timeline_Dart_TimelineGetTraceOnlyDartEvents) {
+TEST_CASE(DartAPI_TimelineGetTraceOnlyDartEvents) {
const char* kScriptChars =
"import 'dart:developer';\n"
""
@@ -9173,7 +9173,7 @@ TEST_CASE(Timeline_Dart_TimelineGetTraceOnlyDartEvents) {
free(data.buffer);
}
-TEST_CASE(Timeline_Dart_TimelineGetTraceWithDartEvents) {
+TEST_CASE(DartAPI_TimelineGetTraceWithDartEvents) {
const char* kScriptChars =
"import 'dart:developer';\n"
"\n"
@@ -9222,7 +9222,7 @@ TEST_CASE(Timeline_Dart_TimelineGetTraceWithDartEvents) {
free(data.buffer);
}
-TEST_CASE(Timeline_Dart_TimelineGetTraceGlobalOverride) {
+TEST_CASE(DartAPI_TimelineGetTraceGlobalOverride) {
const char* kScriptChars =
"foo() => 'a';\n"
"main() => foo();\n";
@@ -9269,7 +9269,7 @@ static const char* arg_names[] = {"arg0"};
static const char* arg_values[] = {"value0"};
-TEST_CASE(Timeline_Dart_GlobalTimelineGetTrace) {
+TEST_CASE(DartAPI_GlobalTimelineGetTrace) {
const char* kScriptChars =
"bar() => 'z';\n"
"foo() => 'a';\n"
@@ -9435,7 +9435,7 @@ static void GlobalTimelineThread(uword parameter) {
// Dart_GlobalTimelineGetTrace are made from a fresh thread. This ensures that
// we can call the function from a thread for which we have not set up a
// Thread object.
-TEST_CASE(Timeline_Dart_GlobalTimelineGetTrace_Threaded) {
+TEST_CASE(DartAPI_GlobalTimelineGetTrace_Threaded) {
const char* kScriptChars =
"bar() => 'z';\n"
"foo() => 'a';\n"
@@ -9543,7 +9543,7 @@ static void StopRecording() {
stop_called = true;
}
-TEST_CASE(Timeline_Dart_EmbedderTimelineStartStopRecording) {
+TEST_CASE(DartAPI_EmbedderTimelineStartStopRecording) {
Dart_SetEmbedderTimelineCallbacks(StartRecording, StopRecording);
EXPECT(!start_called);
@@ -9561,7 +9561,7 @@ TEST_CASE(Timeline_Dart_EmbedderTimelineStartStopRecording) {
EXPECT(stop_called);
}
-TEST_CASE(Dart_LoadLibraryPatch_1) {
+TEST_CASE(DartAPI_LoadLibraryPatch_1) {
const char* kScriptChars1 =
"class A {\n"
" int foo() { return 10; }\n"
@@ -9593,7 +9593,7 @@ TEST_CASE(Dart_LoadLibraryPatch_1) {
EXPECT_VALID(result);
}
-TEST_CASE(Dart_LoadLibraryPatch_Error1) {
+TEST_CASE(DartAPI_LoadLibraryPatch_Error1) {
const char* kScriptChars1 =
"class A {\n"
" int foo() { return 10; }\n"
@@ -9623,7 +9623,7 @@ TEST_CASE(Dart_LoadLibraryPatch_Error1) {
EXPECT(Dart_IsError(result));
}
-TEST_CASE(Dart_LoadLibraryPatch_Error2) {
+TEST_CASE(DartAPI_LoadLibraryPatch_Error2) {
const char* kScriptChars1 =
"class A {\n"
" int foo() { return 10; }\n"
@@ -9653,7 +9653,7 @@ TEST_CASE(Dart_LoadLibraryPatch_Error2) {
OS::Print("Patched class executed\n");
}
-TEST_CASE(Dart_LoadLibraryPatch_Error3) {
+TEST_CASE(DartAPI_LoadLibraryPatch_Error3) {
const char* kScriptChars1 =
"class A {\n"
" int foo() { return 10; }\n"
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | runtime/vm/debugger_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698