Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: runtime/vm/object_test.cc

Issue 121553005: Fix checked mode failure of FindFunctionIndex (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "vm/assembler.h" 5 #include "vm/assembler.h"
6 #include "vm/bigint_operations.h" 6 #include "vm/bigint_operations.h"
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/dart_api_impl.h" 8 #include "vm/dart_api_impl.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 3454 matching lines...) Expand 10 before | Expand all | Expand 10 after
3465 // Same field. 3465 // Same field.
3466 EXPECT_EQ(field_b.raw(), field_b_from_index.raw()); 3466 EXPECT_EQ(field_b.raw(), field_b_from_index.raw());
3467 } 3467 }
3468 3468
3469 3469
3470 TEST_CASE(FindFunctionIndex) { 3470 TEST_CASE(FindFunctionIndex) {
3471 // Tests both FindFunctionIndex and FindImplicitClosureFunctionIndex. 3471 // Tests both FindFunctionIndex and FindImplicitClosureFunctionIndex.
3472 const char* kScriptChars = 3472 const char* kScriptChars =
3473 "class A {\n" 3473 "class A {\n"
3474 " void a() {}\n" 3474 " void a() {}\n"
3475 " void b() { return a; }\n" 3475 " Function b() { return a; }\n"
3476 "}\n" 3476 "}\n"
3477 "class B {\n" 3477 "class B {\n"
3478 " dynamic d() {}\n" 3478 " dynamic d() {}\n"
3479 "}\n" 3479 "}\n"
3480 "var x;\n" 3480 "var x;\n"
3481 "test() {\n" 3481 "test() {\n"
3482 " x = new A().b();\n" 3482 " x = new A().b();\n"
3483 " x();\n" 3483 " x();\n"
3484 " new B();\n" 3484 " new B();\n"
3485 " return x;\n" 3485 " return x;\n"
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
3982 // Simple map. 3982 // Simple map.
3983 // 3983 //
3984 // TODO(turnidge): Consider showing something like: {1: 2, 2: 'otter'} 3984 // TODO(turnidge): Consider showing something like: {1: 2, 2: 'otter'}
3985 result = Dart_GetField(lib, NewString("simple_map")); 3985 result = Dart_GetField(lib, NewString("simple_map"));
3986 EXPECT_VALID(result); 3986 EXPECT_VALID(result);
3987 obj ^= Api::UnwrapHandle(result); 3987 obj ^= Api::UnwrapHandle(result);
3988 EXPECT_STREQ("Instance of '_LinkedHashMap'", obj.ToUserCString()); 3988 EXPECT_STREQ("Instance of '_LinkedHashMap'", obj.ToUserCString());
3989 } 3989 }
3990 3990
3991 } // namespace dart 3991 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698