| 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 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1468 Dart_ExitScope(); | 1468 Dart_ExitScope(); |
| 1469 Dart_ShutdownIsolate(); | 1469 Dart_ShutdownIsolate(); |
| 1470 } | 1470 } |
| 1471 | 1471 |
| 1472 | 1472 |
| 1473 UNIT_TEST_CASE(PostCObject) { | 1473 UNIT_TEST_CASE(PostCObject) { |
| 1474 // Create a native port for posting from C to Dart | 1474 // Create a native port for posting from C to Dart |
| 1475 TestIsolateScope __test_isolate__; | 1475 TestIsolateScope __test_isolate__; |
| 1476 const char* kScriptChars = | 1476 const char* kScriptChars = |
| 1477 "#import('dart:isolate');\n" | 1477 "#import('dart:isolate');\n" |
| 1478 "void main() {\n" | 1478 "main() {\n" |
| 1479 " var messageCount = 0;\n" | 1479 " var messageCount = 0;\n" |
| 1480 " var exception = '';\n" | 1480 " var exception = '';\n" |
| 1481 " var port = new ReceivePort();\n" | 1481 " var port = new ReceivePort();\n" |
| 1482 " port.receive((message, replyTo) {\n" | 1482 " port.receive((message, replyTo) {\n" |
| 1483 " if (messageCount < 7) {\n" | 1483 " if (messageCount < 7) {\n" |
| 1484 " exception = '$exception${message}';\n" | 1484 " exception = '$exception${message}';\n" |
| 1485 " } else {\n" | 1485 " } else {\n" |
| 1486 " exception = '$exception${message.length}';\n" | 1486 " exception = '$exception${message.length}';\n" |
| 1487 " for (int i = 0; i < message.length; i++) {\n" | 1487 " for (int i = 0; i < message.length; i++) {\n" |
| 1488 " exception = '$exception${message[i]}';\n" | 1488 " exception = '$exception${message[i]}';\n" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1560 EXPECT(Dart_ErrorHasException(result)); | 1560 EXPECT(Dart_ErrorHasException(result)); |
| 1561 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n", | 1561 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n", |
| 1562 Dart_GetError(result)); | 1562 Dart_GetError(result)); |
| 1563 | 1563 |
| 1564 Dart_ExitScope(); | 1564 Dart_ExitScope(); |
| 1565 } | 1565 } |
| 1566 | 1566 |
| 1567 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 1567 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
| 1568 | 1568 |
| 1569 } // namespace dart | 1569 } // namespace dart |
| OLD | NEW |