| 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/unit_test.h" | 8 #include "vm/unit_test.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 breakpoint_hit_counter = 0; | 151 breakpoint_hit_counter = 0; |
| 152 Dart_Handle retval = Invoke(lib, "main"); | 152 Dart_Handle retval = Invoke(lib, "main"); |
| 153 EXPECT(!Dart_IsError(retval)); | 153 EXPECT(!Dart_IsError(retval)); |
| 154 EXPECT(breakpoint_hit_counter == 2); | 154 EXPECT(breakpoint_hit_counter == 2); |
| 155 } | 155 } |
| 156 | 156 |
| 157 | 157 |
| 158 TEST_CASE(Debug_InspectObject) { | 158 TEST_CASE(Debug_InspectObject) { |
| 159 const char* kScriptChars = | 159 const char* kScriptChars = |
| 160 " class A { \n" | 160 " class A { \n" |
| 161 " int a_field = 'a'; \n" | 161 " var a_field = 'a'; \n" |
| 162 " static var bla = 'yada yada yada';\n" | 162 " static var bla = 'yada yada yada';\n" |
| 163 " var d = 42.1; \n" | 163 " var d = 42.1; \n" |
| 164 " } \n" | 164 " } \n" |
| 165 " class B extends A { \n" | 165 " class B extends A { \n" |
| 166 " var oneDay = const Duration(hours: 24); \n" | 166 " var oneDay = const Duration(hours: 24); \n" |
| 167 " static var bla = 'blah blah'; \n" | 167 " static var bla = 'blah blah'; \n" |
| 168 " } \n" | 168 " } \n" |
| 169 " get_b() { return new B(); } \n" | 169 " get_b() { return new B(); } \n" |
| 170 " get_int() { return 666; } \n"; | 170 " get_int() { return 666; } \n"; |
| 171 | 171 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 EXPECT(Dart_IsString(source)); | 337 EXPECT(Dart_IsString(source)); |
| 338 char const* source_chars; | 338 char const* source_chars; |
| 339 Dart_StringToCString(source, &source_chars); | 339 Dart_StringToCString(source, &source_chars); |
| 340 printf("\n=== source: ===\n%s", source_chars); | 340 printf("\n=== source: ===\n%s", source_chars); |
| 341 EXPECT_STREQ(kScriptChars, source_chars); | 341 EXPECT_STREQ(kScriptChars, source_chars); |
| 342 } | 342 } |
| 343 | 343 |
| 344 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 344 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
| 345 | 345 |
| 346 } // namespace dart | 346 } // namespace dart |
| OLD | NEW |