| Index: runtime/vm/dart_api_impl_test.cc
|
| ===================================================================
|
| --- runtime/vm/dart_api_impl_test.cc (revision 448)
|
| +++ runtime/vm/dart_api_impl_test.cc (working copy)
|
| @@ -448,6 +448,37 @@
|
| }
|
|
|
|
|
| +static bool MyPostMessageCallback(Dart_Isolate dest_isolate,
|
| + Dart_Port send_port,
|
| + Dart_Port reply_port,
|
| + Dart_Message message) {
|
| + return true;
|
| +}
|
| +
|
| +
|
| +UNIT_TEST_CASE(SetPostMessageCallback) {
|
| + Dart_Isolate dart_isolate = Dart_CreateIsolate(NULL, NULL);
|
| + Dart_SetPostMessageCallback(&MyPostMessageCallback);
|
| + Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate);
|
| + EXPECT_EQ(&MyPostMessageCallback, isolate->post_message_callback());
|
| + Dart_ShutdownIsolate();
|
| +}
|
| +
|
| +
|
| +static void MyClosePortCallback(Dart_Isolate dest_isolate,
|
| + Dart_Port port) {
|
| +}
|
| +
|
| +
|
| +UNIT_TEST_CASE(SetClosePortCallback) {
|
| + Dart_Isolate dart_isolate = Dart_CreateIsolate(NULL, NULL);
|
| + Dart_SetClosePortCallback(&MyClosePortCallback);
|
| + Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate);
|
| + EXPECT_EQ(&MyClosePortCallback, isolate->close_port_callback());
|
| + Dart_ShutdownIsolate();
|
| +}
|
| +
|
| +
|
| #if defined(TARGET_ARCH_IA32) // only ia32 can run execution tests.
|
|
|
| UNIT_TEST_CASE(FieldAccess) {
|
|
|