| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_api.h" | 5 #include "include/dart_api.h" |
| 6 #include "include/dart_tools_api.h" | 6 #include "include/dart_tools_api.h" |
| 7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
| 8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
| 9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
| 10 #include "vm/lockers.h" | 10 #include "vm/lockers.h" |
| (...skipping 3369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3380 " return '${value.y == null}';" | 3380 " return '${value.y == null}';" |
| 3381 "}\n"; | 3381 "}\n"; |
| 3382 | 3382 |
| 3383 // The reload fails because the initializing expression is parsed at | 3383 // The reload fails because the initializing expression is parsed at |
| 3384 // class finalization time. | 3384 // class finalization time. |
| 3385 lib = TestCase::ReloadTestScript(kReloadScript); | 3385 lib = TestCase::ReloadTestScript(kReloadScript); |
| 3386 EXPECT_ERROR(lib, "......"); | 3386 EXPECT_ERROR(lib, "......"); |
| 3387 } | 3387 } |
| 3388 | 3388 |
| 3389 | 3389 |
| 3390 TEST_CASE(IsolateREload_RunNewFieldInitialiazersSuperClass) { | 3390 TEST_CASE(IsolateReload_RunNewFieldInitialiazersSuperClass) { |
| 3391 const char* kScript = | 3391 const char* kScript = |
| 3392 "class Super {\n" | 3392 "class Super {\n" |
| 3393 " static var foo = 'right';\n" | 3393 " static var foo = 'right';\n" |
| 3394 "}\n" | 3394 "}\n" |
| 3395 "class Foo extends Super {\n" | 3395 "class Foo extends Super {\n" |
| 3396 " static var foo = 'wrong';\n" | 3396 " static var foo = 'wrong';\n" |
| 3397 "}\n" | 3397 "}\n" |
| 3398 "Foo value;\n" | 3398 "Foo value;\n" |
| 3399 "main() {\n" | 3399 "main() {\n" |
| 3400 " Super.foo;\n" | 3400 " Super.foo;\n" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3497 "}\n"; | 3497 "}\n"; |
| 3498 | 3498 |
| 3499 Dart_Handle result = TestCase::ReloadTestScript(kReloadScript); | 3499 Dart_Handle result = TestCase::ReloadTestScript(kReloadScript); |
| 3500 EXPECT_VALID(result); | 3500 EXPECT_VALID(result); |
| 3501 EXPECT_STREQ("false", SimpleInvokeStr(lib, "main")); | 3501 EXPECT_STREQ("false", SimpleInvokeStr(lib, "main")); |
| 3502 } | 3502 } |
| 3503 | 3503 |
| 3504 #endif // !PRODUCT | 3504 #endif // !PRODUCT |
| 3505 | 3505 |
| 3506 } // namespace dart | 3506 } // namespace dart |
| OLD | NEW |