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

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

Issue 10540040: Inline setters, getters, various cleanups & restructuring. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | 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 "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/assembler.h" 6 #include "vm/assembler.h"
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/object_store.h" 10 #include "vm/object_store.h"
(...skipping 2642 matching lines...) Expand 10 before | Expand all | Expand 10 after
2653 AbstractTypeArguments& test_targ_0 = AbstractTypeArguments::Handle(); 2653 AbstractTypeArguments& test_targ_0 = AbstractTypeArguments::Handle();
2654 AbstractTypeArguments& test_targ_1 = AbstractTypeArguments::Handle(); 2654 AbstractTypeArguments& test_targ_1 = AbstractTypeArguments::Handle();
2655 Bool& test_result = Bool::Handle(); 2655 Bool& test_result = Bool::Handle();
2656 cache.GetCheck(0, &test_class, &test_targ_0, &test_targ_1, &test_result); 2656 cache.GetCheck(0, &test_class, &test_targ_0, &test_targ_1, &test_result);
2657 EXPECT_EQ(empty_class.raw(), test_class.raw()); 2657 EXPECT_EQ(empty_class.raw(), test_class.raw());
2658 EXPECT_EQ(targ_0.raw(), test_targ_0.raw()); 2658 EXPECT_EQ(targ_0.raw(), test_targ_0.raw());
2659 EXPECT_EQ(targ_1.raw(), test_targ_1.raw()); 2659 EXPECT_EQ(targ_1.raw(), test_targ_1.raw());
2660 EXPECT_EQ(Bool::True(), test_result.raw()); 2660 EXPECT_EQ(Bool::True(), test_result.raw());
2661 } 2661 }
2662 2662
2663
2664 TEST_CASE(FieldTests) {
2665 const String& f = String::Handle(String::New("oneField"));
2666 const String& getter_f = String::Handle(Field::GetterName(f));
2667 const String& setter_f = String::Handle(Field::SetterName(f));
2668 EXPECT(!Field::IsGetterName(f));
2669 EXPECT(!Field::IsSetterName(f));
2670 EXPECT(Field::IsGetterName(getter_f));
2671 EXPECT(!Field::IsSetterName(getter_f));
2672 EXPECT(!Field::IsGetterName(setter_f));
2673 EXPECT(Field::IsSetterName(setter_f));
2674 EXPECT_STREQ(f.ToCString(),
2675 String::Handle(Field::NameFromGetter(getter_f)).ToCString());
2676 EXPECT_STREQ(f.ToCString(),
2677 String::Handle(Field::NameFromSetter(setter_f)).ToCString());
2678 }
2679
2663 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 2680 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
2664 2681
2665 } // namespace dart 2682 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698