| 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 "platform/assert.h" | 5 #include "platform/assert.h" |
| 6 #include "vm/globals.h" | 6 #include "vm/globals.h" |
| 7 #include "vm/isolate.h" | 7 #include "vm/isolate.h" |
| 8 #include "vm/unit_test.h" | 8 #include "vm/unit_test.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 Dart_Handle async_lib = Dart_LookupLibrary(url); | 66 Dart_Handle async_lib = Dart_LookupLibrary(url); |
| 67 DART_CHECK_VALID(async_lib); | 67 DART_CHECK_VALID(async_lib); |
| 68 DART_CHECK_VALID(Dart_Invoke( | 68 DART_CHECK_VALID(Dart_Invoke( |
| 69 async_lib, NewString("_setScheduleImmediateClosure"), 1, args)); | 69 async_lib, NewString("_setScheduleImmediateClosure"), 1, args)); |
| 70 | 70 |
| 71 | 71 |
| 72 result = Dart_Invoke(test_lib, NewString("testMain"), 0, NULL); | 72 result = Dart_Invoke(test_lib, NewString("testMain"), 0, NULL); |
| 73 EXPECT(!Dart_IsError(result)); | 73 EXPECT(!Dart_IsError(result)); |
| 74 // Run until all ports to isolate are closed. | 74 // Run until all ports to isolate are closed. |
| 75 result = Dart_RunLoop(); | 75 result = Dart_RunLoop(); |
| 76 EXPECT_ERROR(result, "Null callback specified for isolate creation"); | 76 EXPECT_ERROR(result, |
| 77 "Isolate spawn is not supported by this Dart implementation"); |
| 77 EXPECT(Dart_ErrorHasException(result)); | 78 EXPECT(Dart_ErrorHasException(result)); |
| 78 Dart_Handle exception_result = Dart_ErrorGetException(result); | 79 Dart_Handle exception_result = Dart_ErrorGetException(result); |
| 79 EXPECT_VALID(exception_result); | 80 EXPECT_VALID(exception_result); |
| 80 } | 81 } |
| 81 | 82 |
| 82 } // namespace dart | 83 } // namespace dart |
| OLD | NEW |