Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: runtime/vm/debugger_api_impl_test.cc

Issue 10416050: Remove the partially completed code for remote IsolateMirrors and (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_entry.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/unit_test.h" 8 #include "vm/unit_test.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 968
969 Dart_Handle lib_url = Dart_NewString(TestCase::url()); 969 Dart_Handle lib_url = Dart_NewString(TestCase::url());
970 Dart_Handle source = Dart_GetScriptSource(lib_url, lib_url); 970 Dart_Handle source = Dart_GetScriptSource(lib_url, lib_url);
971 EXPECT(Dart_IsString(source)); 971 EXPECT(Dart_IsString(source));
972 char const* source_chars; 972 char const* source_chars;
973 Dart_StringToCString(source, &source_chars); 973 Dart_StringToCString(source, &source_chars);
974 OS::Print("\n=== source: ===\n%s", source_chars); 974 OS::Print("\n=== source: ===\n%s", source_chars);
975 EXPECT_STREQ(kScriptChars, source_chars); 975 EXPECT_STREQ(kScriptChars, source_chars);
976 } 976 }
977 977
978
979 TEST_CASE(GetLibraryURLs) {
980 const char* kScriptChars =
981 "main() {"
982 " return 12345;"
983 "}";
984
985 Dart_Handle lib_list = Dart_GetLibraryURLs();
986 EXPECT_VALID(lib_list);
987 EXPECT(Dart_IsList(lib_list));
988 Dart_Handle list_as_string = Dart_ToString(lib_list);
989 const char* list_cstr = "";
990 EXPECT_VALID(Dart_StringToCString(list_as_string, &list_cstr));
991 EXPECT_NOTSUBSTRING(TestCase::url(), list_cstr);
992
993 // Load a script.
994 Dart_Handle url = Dart_NewString(TestCase::url());
995 Dart_Handle source = Dart_NewString(kScriptChars);
996 EXPECT_VALID(Dart_LoadScript(url, source));
997
998 lib_list = Dart_GetLibraryURLs();
999 EXPECT_VALID(lib_list);
1000 EXPECT(Dart_IsList(lib_list));
1001 list_as_string = Dart_ToString(lib_list);
1002 list_cstr = "";
1003 EXPECT_VALID(Dart_StringToCString(list_as_string, &list_cstr));
1004 EXPECT_SUBSTRING(TestCase::url(), list_cstr);
1005 }
1006
1007
978 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 1008 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
979 1009
980 } // namespace dart 1010 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_entry.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698