| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 "vm/source_report.h" | 5 #include "vm/source_report.h" |
| 6 #include "vm/dart_api_impl.h" | 6 #include "vm/dart_api_impl.h" |
| 7 #include "vm/unit_test.h" | 7 #include "vm/unit_test.h" |
| 8 | 8 |
| 9 namespace dart { | 9 namespace dart { |
| 10 | 10 |
| 11 #ifndef PRODUCT |
| 12 |
| 11 static RawObject* ExecuteScript(const char* script) { | 13 static RawObject* ExecuteScript(const char* script) { |
| 12 Dart_Handle h_lib = TestCase::LoadTestScript(script, NULL); | 14 Dart_Handle h_lib = TestCase::LoadTestScript(script, NULL); |
| 13 EXPECT_VALID(h_lib); | 15 EXPECT_VALID(h_lib); |
| 14 Library& lib = Library::Handle(); | 16 Library& lib = Library::Handle(); |
| 15 lib ^= Api::UnwrapHandle(h_lib); | 17 lib ^= Api::UnwrapHandle(h_lib); |
| 16 EXPECT(!lib.IsNull()); | 18 EXPECT(!lib.IsNull()); |
| 17 Dart_Handle result = Dart_Invoke(h_lib, NewString("main"), 0, NULL); | 19 Dart_Handle result = Dart_Invoke(h_lib, NewString("main"), 0, NULL); |
| 18 EXPECT_VALID(result); | 20 EXPECT_VALID(result); |
| 19 return Api::UnwrapHandle(h_lib); | 21 return Api::UnwrapHandle(h_lib); |
| 20 } | 22 } |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 // main. | 498 // main. |
| 497 "{\"scriptIndex\":0,\"startPos\":12,\"endPos\":39,\"compiled\":true," | 499 "{\"scriptIndex\":0,\"startPos\":12,\"endPos\":39,\"compiled\":true," |
| 498 "\"possibleBreakpoints\":[13,23,32,39]}]," | 500 "\"possibleBreakpoints\":[13,23,32,39]}]," |
| 499 | 501 |
| 500 // Only one script in the script table. | 502 // Only one script in the script table. |
| 501 "\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\"," | 503 "\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\"," |
| 502 "\"uri\":\"test-lib\",\"_kind\":\"script\"}]}", | 504 "\"uri\":\"test-lib\",\"_kind\":\"script\"}]}", |
| 503 buffer); | 505 buffer); |
| 504 } | 506 } |
| 505 | 507 |
| 508 #endif // !PRODUCT |
| 509 |
| 506 } // namespace dart | 510 } // namespace dart |
| OLD | NEW |