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

Unified Diff: vm/snapshot_test.cc

Issue 11275008: - Represent strings internally in UTF-16 format, this makes it (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 2 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
« vm/object.cc ('K') | « vm/snapshot.cc ('k') | vm/stack_frame_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/snapshot_test.cc
===================================================================
--- vm/snapshot_test.cc (revision 14155)
+++ vm/snapshot_test.cc (working copy)
@@ -874,8 +874,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();
}
@@ -916,8 +916,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);
}
@@ -933,8 +933,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));
@@ -1014,8 +1014,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.
@@ -1058,8 +1058,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();
}
@@ -1099,7 +1099,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.
@@ -1139,13 +1139,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));
@@ -1903,9 +1903,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;
« vm/object.cc ('K') | « vm/snapshot.cc ('k') | vm/stack_frame_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698