| 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 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 Dart_ExitScope(); | 956 Dart_ExitScope(); |
| 957 } | 957 } |
| 958 | 958 |
| 959 { | 959 { |
| 960 // Create an Isolate using the full snapshot, load a script and create | 960 // Create an Isolate using the full snapshot, load a script and create |
| 961 // a script snapshot of the script. | 961 // a script snapshot of the script. |
| 962 TestCase::CreateTestIsolateFromSnapshot(full_snapshot); | 962 TestCase::CreateTestIsolateFromSnapshot(full_snapshot); |
| 963 Dart_EnterScope(); // Start a Dart API scope for invoking API functions. | 963 Dart_EnterScope(); // Start a Dart API scope for invoking API functions. |
| 964 | 964 |
| 965 // Load the library. | 965 // Load the library. |
| 966 Dart_Handle import_map = Dart_NewList(0); |
| 966 Dart_Handle import_lib = Dart_LoadLibrary(Dart_NewString("dart:import-lib"), | 967 Dart_Handle import_lib = Dart_LoadLibrary(Dart_NewString("dart:import-lib"), |
| 967 Dart_NewString(kLibScriptChars)); | 968 Dart_NewString(kLibScriptChars), |
| 969 import_map); |
| 968 EXPECT_VALID(import_lib); | 970 EXPECT_VALID(import_lib); |
| 969 | 971 |
| 970 // Create a test library and Load up a test script in it. | 972 // Create a test library and Load up a test script in it. |
| 971 TestCase::LoadTestScript(kScriptChars, NULL); | 973 TestCase::LoadTestScript(kScriptChars, NULL); |
| 972 | 974 |
| 973 EXPECT_VALID(Dart_LibraryImportLibrary(TestCase::lib(), import_lib)); | 975 EXPECT_VALID(Dart_LibraryImportLibrary(TestCase::lib(), import_lib)); |
| 974 | 976 |
| 975 // Get list of library URLs loaded and save the count. | 977 // Get list of library URLs loaded and save the count. |
| 976 Dart_Handle libs = Dart_GetLibraryURLs(); | 978 Dart_Handle libs = Dart_GetLibraryURLs(); |
| 977 EXPECT(Dart_IsList(libs)); | 979 EXPECT(Dart_IsList(libs)); |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1526 EXPECT(Dart_ErrorHasException(result)); | 1528 EXPECT(Dart_ErrorHasException(result)); |
| 1527 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n", | 1529 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n", |
| 1528 Dart_GetError(result)); | 1530 Dart_GetError(result)); |
| 1529 | 1531 |
| 1530 Dart_ExitScope(); | 1532 Dart_ExitScope(); |
| 1531 } | 1533 } |
| 1532 | 1534 |
| 1533 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 1535 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
| 1534 | 1536 |
| 1535 } // namespace dart | 1537 } // namespace dart |
| OLD | NEW |