| 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/dart_api_impl.h" | 7 #include "vm/dart_api_impl.h" |
| 8 #include "vm/thread.h" | 8 #include "vm/thread.h" |
| 9 #include "vm/unit_test.h" | 9 #include "vm/unit_test.h" |
| 10 | 10 |
| (...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 EXPECT_VALID(lib_list); | 1043 EXPECT_VALID(lib_list); |
| 1044 EXPECT(Dart_IsList(lib_list)); | 1044 EXPECT(Dart_IsList(lib_list)); |
| 1045 Dart_Handle list_as_string = Dart_ToString(lib_list); | 1045 Dart_Handle list_as_string = Dart_ToString(lib_list); |
| 1046 const char* list_cstr = ""; | 1046 const char* list_cstr = ""; |
| 1047 EXPECT_VALID(Dart_StringToCString(list_as_string, &list_cstr)); | 1047 EXPECT_VALID(Dart_StringToCString(list_as_string, &list_cstr)); |
| 1048 EXPECT_NOTSUBSTRING(TestCase::url(), list_cstr); | 1048 EXPECT_NOTSUBSTRING(TestCase::url(), list_cstr); |
| 1049 | 1049 |
| 1050 // Load a script. | 1050 // Load a script. |
| 1051 Dart_Handle url = NewString(TestCase::url()); | 1051 Dart_Handle url = NewString(TestCase::url()); |
| 1052 Dart_Handle source = NewString(kScriptChars); | 1052 Dart_Handle source = NewString(kScriptChars); |
| 1053 EXPECT_VALID(Dart_LoadScript(url, source)); | 1053 EXPECT_VALID(Dart_LoadScript(url, source, 0, 0)); |
| 1054 | 1054 |
| 1055 lib_list = Dart_GetLibraryURLs(); | 1055 lib_list = Dart_GetLibraryURLs(); |
| 1056 EXPECT_VALID(lib_list); | 1056 EXPECT_VALID(lib_list); |
| 1057 EXPECT(Dart_IsList(lib_list)); | 1057 EXPECT(Dart_IsList(lib_list)); |
| 1058 list_as_string = Dart_ToString(lib_list); | 1058 list_as_string = Dart_ToString(lib_list); |
| 1059 list_cstr = ""; | 1059 list_cstr = ""; |
| 1060 EXPECT_VALID(Dart_StringToCString(list_as_string, &list_cstr)); | 1060 EXPECT_VALID(Dart_StringToCString(list_as_string, &list_cstr)); |
| 1061 EXPECT_SUBSTRING(TestCase::url(), list_cstr); | 1061 EXPECT_SUBSTRING(TestCase::url(), list_cstr); |
| 1062 } | 1062 } |
| 1063 | 1063 |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1545 | 1545 |
| 1546 Dart_Handle retval = Invoke("main"); | 1546 Dart_Handle retval = Invoke("main"); |
| 1547 EXPECT(Dart_IsError(retval)); | 1547 EXPECT(Dart_IsError(retval)); |
| 1548 EXPECT(Dart_IsUnhandledExceptionError(retval)); | 1548 EXPECT(Dart_IsUnhandledExceptionError(retval)); |
| 1549 EXPECT_EQ(1, breakpoint_hit_counter); | 1549 EXPECT_EQ(1, breakpoint_hit_counter); |
| 1550 } | 1550 } |
| 1551 | 1551 |
| 1552 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 1552 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
| 1553 | 1553 |
| 1554 } // namespace dart | 1554 } // namespace dart |
| OLD | NEW |