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

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

Issue 10752017: Rename Script's source to Source. Trace parser (--trace-parser) only if source is available (thus s… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 2166 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 const Script& script = Script::Handle(Script::New(url, 2177 const Script& script = Script::Handle(Script::New(url,
2178 source, 2178 source,
2179 RawScript::kSource)); 2179 RawScript::kSource));
2180 EXPECT(!script.IsNull()); 2180 EXPECT(!script.IsNull());
2181 EXPECT(script.IsScript()); 2181 EXPECT(script.IsScript());
2182 String& str = String::Handle(script.url()); 2182 String& str = String::Handle(script.url());
2183 EXPECT_EQ(17, str.Length()); 2183 EXPECT_EQ(17, str.Length());
2184 EXPECT_EQ('b', str.CharAt(0)); 2184 EXPECT_EQ('b', str.CharAt(0));
2185 EXPECT_EQ(':', str.CharAt(7)); 2185 EXPECT_EQ(':', str.CharAt(7));
2186 EXPECT_EQ('e', str.CharAt(16)); 2186 EXPECT_EQ('e', str.CharAt(16));
2187 str = script.source(); 2187 str = script.Source();
2188 EXPECT_EQ(22, str.Length()); 2188 EXPECT_EQ(22, str.Length());
2189 EXPECT_EQ('T', str.CharAt(0)); 2189 EXPECT_EQ('T', str.CharAt(0));
2190 EXPECT_EQ('n', str.CharAt(10)); 2190 EXPECT_EQ('n', str.CharAt(10));
2191 EXPECT_EQ('.', str.CharAt(21)); 2191 EXPECT_EQ('.', str.CharAt(21));
2192 } 2192 }
2193 2193
2194 2194
2195 TEST_CASE(Context) { 2195 TEST_CASE(Context) {
2196 const int kNumVariables = 5; 2196 const int kNumVariables = 5;
2197 const Context& parent_context = Context::Handle(Context::New(0)); 2197 const Context& parent_context = Context::Handle(Context::New(0));
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
2666 EXPECT(Field::IsSetterName(setter_f)); 2666 EXPECT(Field::IsSetterName(setter_f));
2667 EXPECT_STREQ(f.ToCString(), 2667 EXPECT_STREQ(f.ToCString(),
2668 String::Handle(Field::NameFromGetter(getter_f)).ToCString()); 2668 String::Handle(Field::NameFromGetter(getter_f)).ToCString());
2669 EXPECT_STREQ(f.ToCString(), 2669 EXPECT_STREQ(f.ToCString(),
2670 String::Handle(Field::NameFromSetter(setter_f)).ToCString()); 2670 String::Handle(Field::NameFromSetter(setter_f)).ToCString());
2671 } 2671 }
2672 2672
2673 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 2673 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
2674 2674
2675 } // namespace dart 2675 } // 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