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

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

Issue 536483004: Fix const problem... (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 "platform/globals.h" 5 #include "platform/globals.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/dart_api_impl.h" 10 #include "vm/dart_api_impl.h"
(...skipping 4211 matching lines...) Expand 10 before | Expand all | Expand 10 after
4222 // For example: 4222 // For example:
4223 // 4223 //
4224 // prefix = "classes" 4224 // prefix = "classes"
4225 // in = "\"id\":\"classes/46\"" 4225 // in = "\"id\":\"classes/46\""
4226 // 4226 //
4227 // Yields: 4227 // Yields:
4228 // 4228 //
4229 // out = "\"id\":\"\"" 4229 // out = "\"id\":\"\""
4230 // 4230 //
4231 static void elideSubstring(const char* prefix, const char* in, char* out) { 4231 static void elideSubstring(const char* prefix, const char* in, char* out) {
4232 char* pos = strstr(in, prefix); 4232 const char* pos = strstr(in, prefix);
4233 while (pos != NULL) { 4233 while (pos != NULL) {
4234 // Copy up to pos into the output buffer. 4234 // Copy up to pos into the output buffer.
4235 while (in < pos) { 4235 while (in < pos) {
4236 *out++ = *in++; 4236 *out++ = *in++;
4237 } 4237 }
4238 4238
4239 // Skip to the close quote. 4239 // Skip to the close quote.
4240 in += strcspn(in, "\""); 4240 in += strcspn(in, "\"");
4241 pos = strstr(in, prefix); 4241 pos = strstr(in, prefix);
4242 } 4242 }
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
4537 EXPECT_VALID(h_result); 4537 EXPECT_VALID(h_result);
4538 Integer& result = Integer::Handle(); 4538 Integer& result = Integer::Handle();
4539 result ^= Api::UnwrapHandle(h_result); 4539 result ^= Api::UnwrapHandle(h_result);
4540 String& foo = String::Handle(String::New("foo")); 4540 String& foo = String::Handle(String::New("foo"));
4541 Integer& expected = Integer::Handle(); 4541 Integer& expected = Integer::Handle();
4542 expected ^= foo.HashCode(); 4542 expected ^= foo.HashCode();
4543 EXPECT(result.IsIdenticalTo(expected)); 4543 EXPECT(result.IsIdenticalTo(expected));
4544 } 4544 }
4545 4545
4546 } // namespace dart 4546 } // 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