| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "include/dart_debugger_api.h" | 5 #include "include/dart_debugger_api.h" |
| 6 #include "platform/assert.h" | 6 #include "platform/assert.h" |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
| 10 #include "vm/dart_api_message.h" | 10 #include "vm/dart_api_message.h" |
| (...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1490 Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL); | 1490 Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL); |
| 1491 Dart_EnterScope(); | 1491 Dart_EnterScope(); |
| 1492 | 1492 |
| 1493 // xxx | 1493 // xxx |
| 1494 Dart_Handle send_port = Dart_InvokeStatic(lib, | 1494 Dart_Handle send_port = Dart_InvokeStatic(lib, |
| 1495 Dart_NewString(""), | 1495 Dart_NewString(""), |
| 1496 Dart_NewString("main"), | 1496 Dart_NewString("main"), |
| 1497 0, | 1497 0, |
| 1498 NULL); | 1498 NULL); |
| 1499 EXPECT_VALID(send_port); | 1499 EXPECT_VALID(send_port); |
| 1500 Dart_Handle result = | 1500 Dart_Handle result = Dart_GetField(send_port, Dart_NewString("_id")); |
| 1501 Dart_GetInstanceField(send_port, Dart_NewString("_id")); | |
| 1502 ASSERT(!Dart_IsError(result)); | 1501 ASSERT(!Dart_IsError(result)); |
| 1503 ASSERT(Dart_IsInteger(result)); | 1502 ASSERT(Dart_IsInteger(result)); |
| 1504 int64_t send_port_id; | 1503 int64_t send_port_id; |
| 1505 Dart_Handle result2 = Dart_IntegerToInt64(result, &send_port_id); | 1504 Dart_Handle result2 = Dart_IntegerToInt64(result, &send_port_id); |
| 1506 ASSERT(!Dart_IsError(result2)); | 1505 ASSERT(!Dart_IsError(result2)); |
| 1507 | 1506 |
| 1508 // Setup single object message. | 1507 // Setup single object message. |
| 1509 Dart_CObject object; | 1508 Dart_CObject object; |
| 1510 | 1509 |
| 1511 object.type = Dart_CObject::kNull; | 1510 object.type = Dart_CObject::kNull; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1559 EXPECT(Dart_ErrorHasException(result)); | 1558 EXPECT(Dart_ErrorHasException(result)); |
| 1560 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n", | 1559 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n", |
| 1561 Dart_GetError(result)); | 1560 Dart_GetError(result)); |
| 1562 | 1561 |
| 1563 Dart_ExitScope(); | 1562 Dart_ExitScope(); |
| 1564 } | 1563 } |
| 1565 | 1564 |
| 1566 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 1565 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
| 1567 | 1566 |
| 1568 } // namespace dart | 1567 } // namespace dart |
| OLD | NEW |