| Index: runtime/vm/snapshot_test.cc
|
| ===================================================================
|
| --- runtime/vm/snapshot_test.cc (revision 14314)
|
| +++ runtime/vm/snapshot_test.cc (working copy)
|
| @@ -945,8 +945,8 @@
|
|
|
| // Invoke a function which returns an object.
|
| Dart_Handle cls =
|
| - Dart_GetClass(TestCase::lib(), Dart_NewString("FieldsTest"));
|
| - result = Dart_Invoke(cls, Dart_NewString("testMain"), 0, NULL);
|
| + Dart_GetClass(TestCase::lib(), NewString("FieldsTest"));
|
| + result = Dart_Invoke(cls, NewString("testMain"), 0, NULL);
|
| EXPECT_VALID(result);
|
| Dart_ExitScope();
|
| }
|
| @@ -987,8 +987,8 @@
|
| writer.WriteFullSnapshot();
|
|
|
| // Invoke a function which returns an object.
|
| - Dart_Handle cls = Dart_GetClass(lib, Dart_NewString("FieldsTest"));
|
| - Dart_Handle result = Dart_Invoke(cls, Dart_NewString("testMain"), 0, NULL);
|
| + Dart_Handle cls = Dart_GetClass(lib, NewString("FieldsTest"));
|
| + Dart_Handle result = Dart_Invoke(cls, NewString("testMain"), 0, NULL);
|
| EXPECT_VALID(result);
|
| }
|
|
|
| @@ -1004,8 +1004,8 @@
|
|
|
| // Invoke a function which returns an object.
|
| Dart_Handle cls = Dart_GetClass(TestCase::lib(),
|
| - Dart_NewString("FieldsTest"));
|
| - Dart_Handle result = Dart_Invoke(cls, Dart_NewString("testMain"), 0, NULL);
|
| + NewString("FieldsTest"));
|
| + Dart_Handle result = Dart_Invoke(cls, NewString("testMain"), 0, NULL);
|
| if (Dart_IsError(result)) {
|
| // Print the error. It is probably an unhandled exception.
|
| fprintf(stderr, "%s\n", Dart_GetError(result));
|
| @@ -1085,8 +1085,8 @@
|
| Dart_EnterScope(); // Start a Dart API scope for invoking API functions.
|
|
|
| // Load the library.
|
| - Dart_Handle import_lib = Dart_LoadLibrary(Dart_NewString("dart:import-lib"),
|
| - Dart_NewString(kLibScriptChars));
|
| + Dart_Handle import_lib = Dart_LoadLibrary(NewString("dart:import-lib"),
|
| + NewString(kLibScriptChars));
|
| EXPECT_VALID(import_lib);
|
|
|
| // Create a test library and Load up a test script in it.
|
| @@ -1129,8 +1129,8 @@
|
| EXPECT_EQ(expected_num_libs, actual_num_libs);
|
|
|
| // Invoke a function which returns an object.
|
| - Dart_Handle cls = Dart_GetClass(result, Dart_NewString("FieldsTest"));
|
| - result = Dart_Invoke(cls, Dart_NewString("testMain"), 0, NULL);
|
| + Dart_Handle cls = Dart_GetClass(result, NewString("FieldsTest"));
|
| + result = Dart_Invoke(cls, NewString("testMain"), 0, NULL);
|
| EXPECT_VALID(result);
|
| Dart_ExitScope();
|
| }
|
| @@ -1170,7 +1170,7 @@
|
| static Dart_CObject* GetDeserializedDartMessage(Dart_Handle lib,
|
| const char* dart_function) {
|
| Dart_Handle result;
|
| - result = Dart_Invoke(lib, Dart_NewString(dart_function), 0, NULL);
|
| + result = Dart_Invoke(lib, NewString(dart_function), 0, NULL);
|
| EXPECT_VALID(result);
|
|
|
| // Serialize the list into a message.
|
| @@ -1210,13 +1210,13 @@
|
| NULL);
|
| EXPECT_VALID(lib);
|
| Dart_Handle smi_result;
|
| - smi_result = Dart_Invoke(lib, Dart_NewString("getSmi"), 0, NULL);
|
| + smi_result = Dart_Invoke(lib, NewString("getSmi"), 0, NULL);
|
| EXPECT_VALID(smi_result);
|
| Dart_Handle bigint_result;
|
| - bigint_result = Dart_Invoke(lib, Dart_NewString("getBigint"), 0, NULL);
|
| + bigint_result = Dart_Invoke(lib, NewString("getBigint"), 0, NULL);
|
| EXPECT_VALID(bigint_result);
|
| Dart_Handle string_result;
|
| - string_result = Dart_Invoke(lib, Dart_NewString("getString"), 0, NULL);
|
| + string_result = Dart_Invoke(lib, NewString("getString"), 0, NULL);
|
| EXPECT_VALID(string_result);
|
| EXPECT(Dart_IsString(string_result));
|
|
|
| @@ -1974,9 +1974,9 @@
|
| Dart_EnterScope();
|
|
|
| // xxx
|
| - Dart_Handle send_port = Dart_Invoke(lib, Dart_NewString("main"), 0, NULL);
|
| + Dart_Handle send_port = Dart_Invoke(lib, NewString("main"), 0, NULL);
|
| EXPECT_VALID(send_port);
|
| - Dart_Handle result = Dart_GetField(send_port, Dart_NewString("_id"));
|
| + Dart_Handle result = Dart_GetField(send_port, NewString("_id"));
|
| ASSERT(!Dart_IsError(result));
|
| ASSERT(Dart_IsInteger(result));
|
| int64_t send_port_id;
|
|
|