| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "platform/assert.h" | 5 #include "platform/assert.h" |
| 6 | 6 |
| 7 #include "vm/dart_api_impl.h" | 7 #include "vm/dart_api_impl.h" |
| 8 #include "vm/dart_api_state.h" | 8 #include "vm/dart_api_state.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/profiler.h" | 10 #include "vm/profiler.h" |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 "class A {\n" | 452 "class A {\n" |
| 453 " var a;\n" | 453 " var a;\n" |
| 454 " var b;\n" | 454 " var b;\n" |
| 455 "}\n" | 455 "}\n" |
| 456 "class B {\n" | 456 "class B {\n" |
| 457 " static boo() {\n" | 457 " static boo() {\n" |
| 458 " return new A();\n" | 458 " return new A();\n" |
| 459 " }\n" | 459 " }\n" |
| 460 "}\n" | 460 "}\n" |
| 461 "main() {\n" | 461 "main() {\n" |
| 462 " B.boo();\n" | 462 " return B.boo();\n" |
| 463 "}\n"; | 463 "}\n"; |
| 464 | 464 |
| 465 Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL); | 465 Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL); |
| 466 EXPECT_VALID(lib); | 466 EXPECT_VALID(lib); |
| 467 Library& root_library = Library::Handle(); | 467 Library& root_library = Library::Handle(); |
| 468 root_library ^= Api::UnwrapHandle(lib); | 468 root_library ^= Api::UnwrapHandle(lib); |
| 469 | 469 |
| 470 const Class& class_a = Class::Handle(GetClass(root_library, "A")); | 470 const Class& class_a = Class::Handle(GetClass(root_library, "A")); |
| 471 EXPECT(!class_a.IsNull()); | 471 EXPECT(!class_a.IsNull()); |
| 472 | 472 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 "class A {\n" | 551 "class A {\n" |
| 552 " var a;\n" | 552 " var a;\n" |
| 553 " var b;\n" | 553 " var b;\n" |
| 554 "}\n" | 554 "}\n" |
| 555 "class B {\n" | 555 "class B {\n" |
| 556 " static boo() {\n" | 556 " static boo() {\n" |
| 557 " return new A();\n" | 557 " return new A();\n" |
| 558 " }\n" | 558 " }\n" |
| 559 "}\n" | 559 "}\n" |
| 560 "main() {\n" | 560 "main() {\n" |
| 561 " B.boo();\n" | 561 " return B.boo();\n" |
| 562 "}\n"; | 562 "}\n"; |
| 563 | 563 |
| 564 Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL); | 564 Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL); |
| 565 EXPECT_VALID(lib); | 565 EXPECT_VALID(lib); |
| 566 Library& root_library = Library::Handle(); | 566 Library& root_library = Library::Handle(); |
| 567 root_library ^= Api::UnwrapHandle(lib); | 567 root_library ^= Api::UnwrapHandle(lib); |
| 568 | 568 |
| 569 const Class& class_a = Class::Handle(GetClass(root_library, "A")); | 569 const Class& class_a = Class::Handle(GetClass(root_library, "A")); |
| 570 EXPECT(!class_a.IsNull()); | 570 EXPECT(!class_a.IsNull()); |
| 571 | 571 |
| (...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2554 EXPECT_SUBSTRING("\"positions\":[\"TempMove\",39]", js.ToCString()); | 2554 EXPECT_SUBSTRING("\"positions\":[\"TempMove\",39]", js.ToCString()); |
| 2555 // Verify exclusive ticks in main. | 2555 // Verify exclusive ticks in main. |
| 2556 EXPECT_SUBSTRING("\"exclusiveTicks\":[1,0]", js.ToCString()); | 2556 EXPECT_SUBSTRING("\"exclusiveTicks\":[1,0]", js.ToCString()); |
| 2557 // Verify inclusive ticks in main. | 2557 // Verify inclusive ticks in main. |
| 2558 EXPECT_SUBSTRING("\"inclusiveTicks\":[1,2]", js.ToCString()); | 2558 EXPECT_SUBSTRING("\"inclusiveTicks\":[1,2]", js.ToCString()); |
| 2559 } | 2559 } |
| 2560 | 2560 |
| 2561 #endif // !PRODUCT | 2561 #endif // !PRODUCT |
| 2562 | 2562 |
| 2563 } // namespace dart | 2563 } // namespace dart |
| OLD | NEW |