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

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

Issue 26294002: Cleanups: int -> intptr_t for "array" lengths, memory sizes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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/os_linux.cc ('k') | runtime/vm/stub_code_ia32.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/os.h" 6 #include "vm/os.h"
7 #include "vm/scanner.h" 7 #include "vm/scanner.h"
8 #include "vm/token.h" 8 #include "vm/token.h"
9 #include "vm/unit_test.h" 9 #include "vm/unit_test.h"
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 if (token_stream[index].position.line != line_number) { 81 if (token_stream[index].position.line != line_number) {
82 OS::PrintErr("Token %d: expected line number %d but got %d\n", 82 OS::PrintErr("Token %d: expected line number %d but got %d\n",
83 index, line_number, token_stream[index].position.line); 83 index, line_number, token_stream[index].position.line);
84 } 84 }
85 } 85 }
86 86
87 87
88 void CheckNumTokens(const Scanner::GrowableTokenStream& token_stream, 88 void CheckNumTokens(const Scanner::GrowableTokenStream& token_stream,
89 int index) { 89 int index) {
90 if (token_stream.length() != index) { 90 if (token_stream.length() != index) {
91 OS::PrintErr("Expected %d tokens but got only %d.\n", 91 OS::PrintErr("Expected %d tokens but got only %" Pd ".\n",
92 index, token_stream.length()); 92 index, token_stream.length());
93 } 93 }
94 } 94 }
95 95
96 96
97 const Scanner::GrowableTokenStream& Scan(const char* source) { 97 const Scanner::GrowableTokenStream& Scan(const char* source) {
98 Scanner scanner(String::Handle(String::New(source)), 98 Scanner scanner(String::Handle(String::New(source)),
99 String::Handle(String::New(""))); 99 String::Handle(String::New("")));
100 100
101 OS::Print("\nScanning: <%s>\n", source); 101 OS::Print("\nScanning: <%s>\n", source);
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 RawString(); 454 RawString();
455 MultilineString(); 455 MultilineString();
456 EmptyString(); 456 EmptyString();
457 EmptyMultilineString(); 457 EmptyMultilineString();
458 NumberLiteral(); 458 NumberLiteral();
459 InvalidText(); 459 InvalidText();
460 NewlinesTest(); 460 NewlinesTest();
461 } 461 }
462 462
463 } // namespace dart 463 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/os_linux.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698