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

Side by Side Diff: pkg/analyzer/test/generated/scanner_test.dart

Issue 351283003: Move Tokenfactory, AstFactory and ElementFactory from tests to the testing/ Folder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « pkg/analyzer/test/generated/resolver_test.dart ('k') | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.scanner_test; 8 library engine.scanner_test;
9 9
10 import 'package:analyzer/src/generated/java_core.dart'; 10 import 'package:analyzer/src/generated/java_core.dart';
(...skipping 2326 matching lines...) Expand 10 before | Expand all | Expand 10 after
2337 final int _offset; 2337 final int _offset;
2338 2338
2339 final int _lineNumber; 2339 final int _lineNumber;
2340 2340
2341 final int _columnNumber; 2341 final int _columnNumber;
2342 2342
2343 ScannerTest_ExpectedLocation(this._offset, this._lineNumber, this._columnNumbe r); 2343 ScannerTest_ExpectedLocation(this._offset, this._lineNumber, this._columnNumbe r);
2344 } 2344 }
2345 2345
2346 /** 2346 /**
2347 * The class `TokenFactory` defines utility methods that can be used to create t okens.
2348 */
2349 class TokenFactory {
2350 static Token tokenFromKeyword(Keyword keyword) => new KeywordToken(keyword, 0) ;
2351
2352 static Token tokenFromString(String lexeme) => new StringToken(TokenType.STRIN G, lexeme, 0);
2353
2354 static Token tokenFromType(TokenType type) => new Token(type, 0);
2355
2356 static Token tokenFromTypeAndString(TokenType type, String lexeme) => new Stri ngToken(type, lexeme, 0);
2357 }
2358
2359 /**
2360 * Instances of the class `TokenStreamValidator` are used to validate the correc t construction 2347 * Instances of the class `TokenStreamValidator` are used to validate the correc t construction
2361 * of a stream of tokens. 2348 * of a stream of tokens.
2362 */ 2349 */
2363 class TokenStreamValidator { 2350 class TokenStreamValidator {
2364 /** 2351 /**
2365 * Validate that the stream of tokens that starts with the given token is corr ect. 2352 * Validate that the stream of tokens that starts with the given token is corr ect.
2366 * 2353 *
2367 * @param token the first token in the stream of tokens to be validated 2354 * @param token the first token in the stream of tokens to be validated
2368 */ 2355 */
2369 void validate(Token token) { 2356 void validate(Token token) {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
2500 } 2487 }
2501 } 2488 }
2502 2489
2503 main() { 2490 main() {
2504 CharSequenceReaderTest.dartSuite(); 2491 CharSequenceReaderTest.dartSuite();
2505 IncrementalScannerTest.dartSuite(); 2492 IncrementalScannerTest.dartSuite();
2506 KeywordStateTest.dartSuite(); 2493 KeywordStateTest.dartSuite();
2507 ScannerTest.dartSuite(); 2494 ScannerTest.dartSuite();
2508 TokenTypeTest.dartSuite(); 2495 TokenTypeTest.dartSuite();
2509 } 2496 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/resolver_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698