| OLD | NEW |
| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 "" |
| 341 "// Cartesian point implemetation." | 341 "// Cartesian point implementation." |
| 342 "class Point {" | 342 "class Point {" |
| 343 "" | 343 "" |
| 344 " // Constructor" | 344 " // Constructor" |
| 345 " Point(Number x, Number y) : x(x), y(y) { }" | 345 " Point(Number x, Number y) : x(x), y(y) { }" |
| 346 "" | 346 "" |
| 347 " // Addition for points." | 347 " // Addition for points." |
| 348 " Point operator +(Point other) {" | 348 " Point operator +(Point other) {" |
| 349 " return new Point(x + other.x, y + other.y);" | 349 " return new Point(x + other.x, y + other.y);" |
| 350 " }" | 350 " }" |
| 351 "" | 351 "" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |