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

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

Issue 10977027: Update all occurrences of raw strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't disable just yet. Created 8 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
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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 Scan("\"\\u{FFFFFF}\""); 238 Scan("\"\\u{FFFFFF}\"");
239 EXPECT_EQ(2, out_of_range_high.length()); 239 EXPECT_EQ(2, out_of_range_high.length());
240 CheckKind(out_of_range_high, 0, Token::kERROR); 240 CheckKind(out_of_range_high, 0, Token::kERROR);
241 EXPECT(out_of_range_high[0].literal->Equals("invalid code point")); 241 EXPECT(out_of_range_high[0].literal->Equals("invalid code point"));
242 CheckKind(out_of_range_high, 1, Token::kEOS); 242 CheckKind(out_of_range_high, 1, Token::kEOS);
243 } 243 }
244 244
245 245
246 void RawString() { 246 void RawString() {
247 // rs = @"\' \\" 247 // rs = @"\' \\"
248 const Scanner::GrowableTokenStream& tokens = Scan("rs = @\"\\\' \\\\\""); 248 const Scanner::GrowableTokenStream& tokens = Scan("rs = r\"\\\' \\\\\"");
249 249
250 EXPECT_EQ(4, tokens.length()); 250 EXPECT_EQ(4, tokens.length());
251 CheckIdent(tokens, 0, "rs"); 251 CheckIdent(tokens, 0, "rs");
252 CheckKind(tokens, 1, Token::kASSIGN); 252 CheckKind(tokens, 1, Token::kASSIGN);
253 CheckKind(tokens, 2, Token::kSTRING); 253 CheckKind(tokens, 2, Token::kSTRING);
254 CheckKind(tokens, 3, Token::kEOS); 254 CheckKind(tokens, 3, Token::kEOS);
255 CheckLineNumber(tokens, 2, 1); 255 CheckLineNumber(tokens, 2, 1);
256 const char* litchars = (tokens)[2].literal->ToCString(); 256 const char* litchars = (tokens)[2].literal->ToCString();
257 EXPECT_EQ(5, (tokens)[2].literal->Length()); 257 EXPECT_EQ(5, (tokens)[2].literal->Length());
258 258
(...skipping 181 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

Powered by Google App Engine
This is Rietveld 408576698