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

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

Issue 17103002: Remove support for + prefix in number literals (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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/scanner.cc ('k') | runtime/vm/token.h » ('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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 void NumberLiteral() { 320 void NumberLiteral() {
321 const Scanner::GrowableTokenStream& tokens = 321 const Scanner::GrowableTokenStream& tokens =
322 Scan("5 0x5d 0.3 0.33 1E+12 .42 +5"); 322 Scan("5 0x5d 0.3 0.33 1E+12 .42 +5");
323 323
324 CheckKind(tokens, 0, Token::kINTEGER); 324 CheckKind(tokens, 0, Token::kINTEGER);
325 CheckKind(tokens, 1, Token::kINTEGER); 325 CheckKind(tokens, 1, Token::kINTEGER);
326 CheckKind(tokens, 2, Token::kDOUBLE); 326 CheckKind(tokens, 2, Token::kDOUBLE);
327 CheckKind(tokens, 3, Token::kDOUBLE); 327 CheckKind(tokens, 3, Token::kDOUBLE);
328 CheckKind(tokens, 4, Token::kDOUBLE); 328 CheckKind(tokens, 4, Token::kDOUBLE);
329 CheckKind(tokens, 5, Token::kDOUBLE); 329 CheckKind(tokens, 5, Token::kDOUBLE);
330 CheckKind(tokens, 6, Token::kTIGHTADD); 330 CheckKind(tokens, 6, Token::kADD);
331 CheckKind(tokens, 7, Token::kINTEGER); 331 CheckKind(tokens, 7, Token::kINTEGER);
332 CheckKind(tokens, 8, Token::kEOS); 332 CheckKind(tokens, 8, Token::kEOS);
333 } 333 }
334 334
335 335
336 void ScanLargeText() { 336 void ScanLargeText() {
337 const char* dart_source = 337 const char* dart_source =
338 "// This source is not meant to be valid Dart code. The text is used to" 338 "// This source is not meant to be valid Dart code. The text is used to"
339 "// test the Dart scanner." 339 "// test the Dart scanner."
340 "" 340 ""
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 RawString(); 440 RawString();
441 MultilineString(); 441 MultilineString();
442 EmptyString(); 442 EmptyString();
443 EmptyMultilineString(); 443 EmptyMultilineString();
444 NumberLiteral(); 444 NumberLiteral();
445 InvalidText(); 445 InvalidText();
446 FindLineTest(); 446 FindLineTest();
447 } 447 }
448 448
449 } // namespace dart 449 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/scanner.cc ('k') | runtime/vm/token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698