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 "platform/globals.h" | 5 #include "platform/globals.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 3305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3316 "main() {\n" | 3316 "main() {\n" |
3317 " (() => new MyClass())();\n" | 3317 " (() => new MyClass())();\n" |
3318 "}\n"; | 3318 "}\n"; |
3319 Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL); | 3319 Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL); |
3320 EXPECT_VALID(lib); | 3320 EXPECT_VALID(lib); |
3321 Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL); | 3321 Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL); |
3322 EXPECT_ERROR(result, | 3322 EXPECT_ERROR(result, |
3323 "Unhandled exception:\n" | 3323 "Unhandled exception:\n" |
3324 "MyException\n" | 3324 "MyException\n" |
3325 "#0 baz (test-lib:2:3)\n" | 3325 "#0 baz (test-lib:2:3)\n" |
3326 "#1 _OtherClass._OtherClass._named (test-lib:7:5)\n" | 3326 "#1 new _OtherClass._named (test-lib:7:5)\n" |
3327 "#2 globalVar= (test-lib:12:7)\n" | 3327 "#2 globalVar= (test-lib:12:7)\n" |
3328 "#3 _bar (test-lib:16:3)\n" | 3328 "#3 _bar (test-lib:16:3)\n" |
3329 "#4 MyClass.field (test-lib:25:5)\n" | 3329 "#4 MyClass.field (test-lib:25:5)\n" |
3330 "#5 MyClass.foo.fooHelper (test-lib:30:7)\n" | 3330 "#5 MyClass.foo.fooHelper (test-lib:30:7)\n" |
3331 "#6 MyClass.foo (test-lib:32:14)\n" | 3331 "#6 MyClass.foo (test-lib:32:14)\n" |
3332 "#7 MyClass.MyClass.<anonymous closure> (test-lib:21:12)\n" | 3332 "#7 new MyClass.<anonymous closure> (test-lib:21:12)\n" |
3333 "#8 MyClass.MyClass (test-lib:21:18)\n" | 3333 "#8 new MyClass (test-lib:21:18)\n" |
3334 "#9 main.<anonymous closure> (test-lib:37:14)\n" | 3334 "#9 main.<anonymous closure> (test-lib:37:14)\n" |
3335 "#10 main (test-lib:37:24)"); | 3335 "#10 main (test-lib:37:24)"); |
3336 } | 3336 } |
3337 | 3337 |
3338 | 3338 |
3339 ISOLATE_UNIT_TEST_CASE(WeakProperty_PreserveCrossGen) { | 3339 ISOLATE_UNIT_TEST_CASE(WeakProperty_PreserveCrossGen) { |
3340 Isolate* isolate = Isolate::Current(); | 3340 Isolate* isolate = Isolate::Current(); |
3341 WeakProperty& weak = WeakProperty::Handle(); | 3341 WeakProperty& weak = WeakProperty::Handle(); |
3342 { | 3342 { |
3343 // Weak property and value in new. Key in old. | 3343 // Weak property and value in new. Key in old. |
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4710 // utf32->utf16 conversion. | 4710 // utf32->utf16 conversion. |
4711 int32_t char_codes[] = {0, 0x0a, 0x0d, 0x7f, 0xff, | 4711 int32_t char_codes[] = {0, 0x0a, 0x0d, 0x7f, 0xff, |
4712 0xffff, 0xd800, 0xdc00, 0xdbff, 0xdfff}; | 4712 0xffff, 0xd800, 0xdc00, 0xdbff, 0xdfff}; |
4713 | 4713 |
4714 const String& str = | 4714 const String& str = |
4715 String::Handle(String::FromUTF32(char_codes, ARRAY_SIZE(char_codes))); | 4715 String::Handle(String::FromUTF32(char_codes, ARRAY_SIZE(char_codes))); |
4716 EXPECT(str.Equals(char_codes, ARRAY_SIZE(char_codes))); | 4716 EXPECT(str.Equals(char_codes, ARRAY_SIZE(char_codes))); |
4717 } | 4717 } |
4718 | 4718 |
4719 } // namespace dart | 4719 } // namespace dart |
OLD | NEW |