| 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 "bin/builtin.h" | 5 #include "bin/builtin.h" |
| 6 #include "include/dart_api.h" | 6 #include "include/dart_api.h" |
| 7 #include "include/dart_debugger_api.h" | 7 #include "include/dart_debugger_api.h" |
| 8 #include "include/dart_mirrors_api.h" | 8 #include "include/dart_mirrors_api.h" |
| 9 #include "include/dart_native_api.h" | 9 #include "include/dart_native_api.h" |
| 10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 3041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3052 | 3052 |
| 3053 UNIT_TEST_CASE(CurrentIsolateData) { | 3053 UNIT_TEST_CASE(CurrentIsolateData) { |
| 3054 intptr_t mydata = 12345; | 3054 intptr_t mydata = 12345; |
| 3055 char* err; | 3055 char* err; |
| 3056 Dart_Isolate isolate = | 3056 Dart_Isolate isolate = |
| 3057 Dart_CreateIsolate(NULL, NULL, bin::snapshot_buffer, | 3057 Dart_CreateIsolate(NULL, NULL, bin::snapshot_buffer, |
| 3058 reinterpret_cast<void*>(mydata), | 3058 reinterpret_cast<void*>(mydata), |
| 3059 &err); | 3059 &err); |
| 3060 EXPECT(isolate != NULL); | 3060 EXPECT(isolate != NULL); |
| 3061 EXPECT_EQ(mydata, reinterpret_cast<intptr_t>(Dart_CurrentIsolateData())); | 3061 EXPECT_EQ(mydata, reinterpret_cast<intptr_t>(Dart_CurrentIsolateData())); |
| 3062 EXPECT_EQ(mydata, reinterpret_cast<intptr_t>(Dart_IsolateData(isolate))); |
| 3062 Dart_ShutdownIsolate(); | 3063 Dart_ShutdownIsolate(); |
| 3063 } | 3064 } |
| 3064 | 3065 |
| 3065 | 3066 |
| 3066 TEST_CASE(DebugName) { | 3067 TEST_CASE(DebugName) { |
| 3067 Dart_Handle debug_name = Dart_DebugName(); | 3068 Dart_Handle debug_name = Dart_DebugName(); |
| 3068 EXPECT_VALID(debug_name); | 3069 EXPECT_VALID(debug_name); |
| 3069 EXPECT(Dart_IsString(debug_name)); | 3070 EXPECT(Dart_IsString(debug_name)); |
| 3070 } | 3071 } |
| 3071 | 3072 |
| (...skipping 4757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7829 NewString("main"), | 7830 NewString("main"), |
| 7830 1, | 7831 1, |
| 7831 dart_args); | 7832 dart_args); |
| 7832 int64_t value = 0; | 7833 int64_t value = 0; |
| 7833 result = Dart_IntegerToInt64(result, &value); | 7834 result = Dart_IntegerToInt64(result, &value); |
| 7834 EXPECT_VALID(result); | 7835 EXPECT_VALID(result); |
| 7835 EXPECT_EQ(6, value); | 7836 EXPECT_EQ(6, value); |
| 7836 } | 7837 } |
| 7837 | 7838 |
| 7838 } // namespace dart | 7839 } // namespace dart |
| OLD | NEW |