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

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

Issue 509073008: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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/pubspec.yaml ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('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) 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.parser_test; 8 library engine.parser_test;
9 9
10 import 'package:analyzer/src/generated/java_core.dart'; 10 import 'package:analyzer/src/generated/java_core.dart';
(...skipping 7387 matching lines...) Expand 10 before | Expand all | Expand 10 after
7398 } 7398 }
7399 7399
7400 void test_parseExpression_comparison() { 7400 void test_parseExpression_comparison() {
7401 BinaryExpression expression = ParserTestCase.parse4("parseExpression", "--a. b == c", []); 7401 BinaryExpression expression = ParserTestCase.parse4("parseExpression", "--a. b == c", []);
7402 JUnitTestCase.assertNotNull(expression.leftOperand); 7402 JUnitTestCase.assertNotNull(expression.leftOperand);
7403 JUnitTestCase.assertNotNull(expression.operator); 7403 JUnitTestCase.assertNotNull(expression.operator);
7404 JUnitTestCase.assertEquals(TokenType.EQ_EQ, expression.operator.type); 7404 JUnitTestCase.assertEquals(TokenType.EQ_EQ, expression.operator.type);
7405 JUnitTestCase.assertNotNull(expression.rightOperand); 7405 JUnitTestCase.assertNotNull(expression.rightOperand);
7406 } 7406 }
7407 7407
7408 void test_parseExpression_function_async() {
7409 FunctionExpression expression = ParserTestCase.parseExpression("() async {}" , []);
7410 JUnitTestCase.assertNotNull(expression.body);
7411 JUnitTestCase.assertTrue(expression.body.isAsynchronous);
7412 JUnitTestCase.assertFalse(expression.body.isGenerator);
7413 JUnitTestCase.assertNotNull(expression.parameters);
7414 }
7415
7416 void test_parseExpression_function_asyncStar() {
7417 FunctionExpression expression = ParserTestCase.parseExpression("() async* {} ", []);
7418 JUnitTestCase.assertNotNull(expression.body);
7419 JUnitTestCase.assertTrue(expression.body.isAsynchronous);
7420 JUnitTestCase.assertTrue(expression.body.isGenerator);
7421 JUnitTestCase.assertNotNull(expression.parameters);
7422 }
7423
7424 void test_parseExpression_function_sync() {
7425 FunctionExpression expression = ParserTestCase.parseExpression("() {}", []);
7426 JUnitTestCase.assertNotNull(expression.body);
7427 JUnitTestCase.assertFalse(expression.body.isAsynchronous);
7428 JUnitTestCase.assertFalse(expression.body.isGenerator);
7429 JUnitTestCase.assertNotNull(expression.parameters);
7430 }
7431
7432 void test_parseExpression_function_syncStar() {
7433 FunctionExpression expression = ParserTestCase.parseExpression("() sync* {}" , []);
7434 JUnitTestCase.assertNotNull(expression.body);
7435 JUnitTestCase.assertFalse(expression.body.isAsynchronous);
7436 JUnitTestCase.assertTrue(expression.body.isGenerator);
7437 JUnitTestCase.assertNotNull(expression.parameters);
7438 }
7439
7408 void test_parseExpression_invokeFunctionExpression() { 7440 void test_parseExpression_invokeFunctionExpression() {
7409 FunctionExpressionInvocation invocation = ParserTestCase.parse4("parseExpres sion", "(a) {return a + a;} (3)", []); 7441 FunctionExpressionInvocation invocation = ParserTestCase.parse4("parseExpres sion", "(a) {return a + a;} (3)", []);
7410 EngineTestCase.assertInstanceOf((obj) => obj is FunctionExpression, Function Expression, invocation.function); 7442 EngineTestCase.assertInstanceOf((obj) => obj is FunctionExpression, Function Expression, invocation.function);
7411 FunctionExpression expression = invocation.function as FunctionExpression; 7443 FunctionExpression expression = invocation.function as FunctionExpression;
7412 JUnitTestCase.assertNotNull(expression.parameters); 7444 JUnitTestCase.assertNotNull(expression.parameters);
7413 JUnitTestCase.assertNotNull(expression.body); 7445 JUnitTestCase.assertNotNull(expression.body);
7414 ArgumentList list = invocation.argumentList; 7446 ArgumentList list = invocation.argumentList;
7415 JUnitTestCase.assertNotNull(list); 7447 JUnitTestCase.assertNotNull(list);
7416 EngineTestCase.assertSizeOfList(1, list.arguments); 7448 EngineTestCase.assertSizeOfList(1, list.arguments);
7417 } 7449 }
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
8097 JUnitTestCase.assertNotNull(statement.functionDeclaration); 8129 JUnitTestCase.assertNotNull(statement.functionDeclaration);
8098 } 8130 }
8099 8131
8100 void test_parseFunctionExpression_body_inExpression() { 8132 void test_parseFunctionExpression_body_inExpression() {
8101 FunctionExpression expression = ParserTestCase.parse4("parseFunctionExpressi on", "(int i) => i++", []); 8133 FunctionExpression expression = ParserTestCase.parse4("parseFunctionExpressi on", "(int i) => i++", []);
8102 JUnitTestCase.assertNotNull(expression.body); 8134 JUnitTestCase.assertNotNull(expression.body);
8103 JUnitTestCase.assertNotNull(expression.parameters); 8135 JUnitTestCase.assertNotNull(expression.parameters);
8104 JUnitTestCase.assertNull((expression.body as ExpressionFunctionBody).semicol on); 8136 JUnitTestCase.assertNull((expression.body as ExpressionFunctionBody).semicol on);
8105 } 8137 }
8106 8138
8107 void test_parseFunctionExpression_minimal() {
8108 FunctionExpression expression = ParserTestCase.parse4("parseFunctionExpressi on", "() {}", []);
8109 JUnitTestCase.assertNotNull(expression.body);
8110 JUnitTestCase.assertNotNull(expression.parameters);
8111 }
8112
8113 void test_parseGetter_nonStatic() { 8139 void test_parseGetter_nonStatic() {
8114 Comment comment = Comment.createDocumentationComment(new List<Token>(0)); 8140 Comment comment = Comment.createDocumentationComment(new List<Token>(0));
8115 TypeName returnType = new TypeName(new SimpleIdentifier(null), null); 8141 TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
8116 MethodDeclaration method = ParserTestCase.parse("parseGetter", <Object> [com mentAndMetadata(comment, []), null, null, returnType], "get a;"); 8142 MethodDeclaration method = ParserTestCase.parse("parseGetter", <Object> [com mentAndMetadata(comment, []), null, null, returnType], "get a;");
8117 JUnitTestCase.assertNotNull(method.body); 8143 JUnitTestCase.assertNotNull(method.body);
8118 JUnitTestCase.assertEquals(comment, method.documentationComment); 8144 JUnitTestCase.assertEquals(comment, method.documentationComment);
8119 JUnitTestCase.assertNull(method.externalKeyword); 8145 JUnitTestCase.assertNull(method.externalKeyword);
8120 JUnitTestCase.assertNull(method.modifierKeyword); 8146 JUnitTestCase.assertNull(method.modifierKeyword);
8121 JUnitTestCase.assertNotNull(method.name); 8147 JUnitTestCase.assertNotNull(method.name);
8122 JUnitTestCase.assertNull(method.operatorKeyword); 8148 JUnitTestCase.assertNull(method.operatorKeyword);
(...skipping 3090 matching lines...) Expand 10 before | Expand all | Expand 10 after
11213 runJUnitTest(__test, __test.test_parseExpressionWithoutCascade_superMeth odInvocation); 11239 runJUnitTest(__test, __test.test_parseExpressionWithoutCascade_superMeth odInvocation);
11214 }); 11240 });
11215 _ut.test('test_parseExpression_assign', () { 11241 _ut.test('test_parseExpression_assign', () {
11216 final __test = new SimpleParserTest(); 11242 final __test = new SimpleParserTest();
11217 runJUnitTest(__test, __test.test_parseExpression_assign); 11243 runJUnitTest(__test, __test.test_parseExpression_assign);
11218 }); 11244 });
11219 _ut.test('test_parseExpression_comparison', () { 11245 _ut.test('test_parseExpression_comparison', () {
11220 final __test = new SimpleParserTest(); 11246 final __test = new SimpleParserTest();
11221 runJUnitTest(__test, __test.test_parseExpression_comparison); 11247 runJUnitTest(__test, __test.test_parseExpression_comparison);
11222 }); 11248 });
11249 _ut.test('test_parseExpression_function_async', () {
11250 final __test = new SimpleParserTest();
11251 runJUnitTest(__test, __test.test_parseExpression_function_async);
11252 });
11253 _ut.test('test_parseExpression_function_asyncStar', () {
11254 final __test = new SimpleParserTest();
11255 runJUnitTest(__test, __test.test_parseExpression_function_asyncStar);
11256 });
11257 _ut.test('test_parseExpression_function_sync', () {
11258 final __test = new SimpleParserTest();
11259 runJUnitTest(__test, __test.test_parseExpression_function_sync);
11260 });
11261 _ut.test('test_parseExpression_function_syncStar', () {
11262 final __test = new SimpleParserTest();
11263 runJUnitTest(__test, __test.test_parseExpression_function_syncStar);
11264 });
11223 _ut.test('test_parseExpression_invokeFunctionExpression', () { 11265 _ut.test('test_parseExpression_invokeFunctionExpression', () {
11224 final __test = new SimpleParserTest(); 11266 final __test = new SimpleParserTest();
11225 runJUnitTest(__test, __test.test_parseExpression_invokeFunctionExpressio n); 11267 runJUnitTest(__test, __test.test_parseExpression_invokeFunctionExpressio n);
11226 }); 11268 });
11227 _ut.test('test_parseExpression_superMethodInvocation', () { 11269 _ut.test('test_parseExpression_superMethodInvocation', () {
11228 final __test = new SimpleParserTest(); 11270 final __test = new SimpleParserTest();
11229 runJUnitTest(__test, __test.test_parseExpression_superMethodInvocation); 11271 runJUnitTest(__test, __test.test_parseExpression_superMethodInvocation);
11230 }); 11272 });
11231 _ut.test('test_parseExtendsClause', () { 11273 _ut.test('test_parseExtendsClause', () {
11232 final __test = new SimpleParserTest(); 11274 final __test = new SimpleParserTest();
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
11465 runJUnitTest(__test, __test.test_parseFunctionDeclaration_getter); 11507 runJUnitTest(__test, __test.test_parseFunctionDeclaration_getter);
11466 }); 11508 });
11467 _ut.test('test_parseFunctionDeclaration_setter', () { 11509 _ut.test('test_parseFunctionDeclaration_setter', () {
11468 final __test = new SimpleParserTest(); 11510 final __test = new SimpleParserTest();
11469 runJUnitTest(__test, __test.test_parseFunctionDeclaration_setter); 11511 runJUnitTest(__test, __test.test_parseFunctionDeclaration_setter);
11470 }); 11512 });
11471 _ut.test('test_parseFunctionExpression_body_inExpression', () { 11513 _ut.test('test_parseFunctionExpression_body_inExpression', () {
11472 final __test = new SimpleParserTest(); 11514 final __test = new SimpleParserTest();
11473 runJUnitTest(__test, __test.test_parseFunctionExpression_body_inExpressi on); 11515 runJUnitTest(__test, __test.test_parseFunctionExpression_body_inExpressi on);
11474 }); 11516 });
11475 _ut.test('test_parseFunctionExpression_minimal', () {
11476 final __test = new SimpleParserTest();
11477 runJUnitTest(__test, __test.test_parseFunctionExpression_minimal);
11478 });
11479 _ut.test('test_parseGetter_nonStatic', () { 11517 _ut.test('test_parseGetter_nonStatic', () {
11480 final __test = new SimpleParserTest(); 11518 final __test = new SimpleParserTest();
11481 runJUnitTest(__test, __test.test_parseGetter_nonStatic); 11519 runJUnitTest(__test, __test.test_parseGetter_nonStatic);
11482 }); 11520 });
11483 _ut.test('test_parseGetter_static', () { 11521 _ut.test('test_parseGetter_static', () {
11484 final __test = new SimpleParserTest(); 11522 final __test = new SimpleParserTest();
11485 runJUnitTest(__test, __test.test_parseGetter_static); 11523 runJUnitTest(__test, __test.test_parseGetter_static);
11486 }); 11524 });
11487 _ut.test('test_parseIdentifierList_multiple', () { 11525 _ut.test('test_parseIdentifierList_multiple', () {
11488 final __test = new SimpleParserTest(); 11526 final __test = new SimpleParserTest();
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
12422 12460
12423 main() { 12461 main() {
12424 ComplexParserTest.dartSuite(); 12462 ComplexParserTest.dartSuite();
12425 ErrorParserTest.dartSuite(); 12463 ErrorParserTest.dartSuite();
12426 IncrementalParserTest.dartSuite(); 12464 IncrementalParserTest.dartSuite();
12427 NonErrorParserTest.dartSuite(); 12465 NonErrorParserTest.dartSuite();
12428 RecoveryParserTest.dartSuite(); 12466 RecoveryParserTest.dartSuite();
12429 ResolutionCopierTest.dartSuite(); 12467 ResolutionCopierTest.dartSuite();
12430 SimpleParserTest.dartSuite(); 12468 SimpleParserTest.dartSuite();
12431 } 12469 }
OLDNEW
« no previous file with comments | « pkg/analyzer/pubspec.yaml ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698