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

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

Issue 535543003: 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
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 5807 matching lines...) Expand 10 before | Expand all | Expand 10 after
5818 } 5818 }
5819 5819
5820 void test_parseAwaitExpression_asStatement_inSync() { 5820 void test_parseAwaitExpression_asStatement_inSync() {
5821 MethodDeclaration method = ParserTestCase.parse("parseClassMember", <Object> ["C"], EngineTestCase.createSource(["m() { await x; }"])); 5821 MethodDeclaration method = ParserTestCase.parse("parseClassMember", <Object> ["C"], EngineTestCase.createSource(["m() { await x; }"]));
5822 FunctionBody body = method.body; 5822 FunctionBody body = method.body;
5823 EngineTestCase.assertInstanceOf((obj) => obj is BlockFunctionBody, BlockFunc tionBody, body); 5823 EngineTestCase.assertInstanceOf((obj) => obj is BlockFunctionBody, BlockFunc tionBody, body);
5824 Statement statement = (body as BlockFunctionBody).block.statements[0]; 5824 Statement statement = (body as BlockFunctionBody).block.statements[0];
5825 EngineTestCase.assertInstanceOf((obj) => obj is VariableDeclarationStatement , VariableDeclarationStatement, statement); 5825 EngineTestCase.assertInstanceOf((obj) => obj is VariableDeclarationStatement , VariableDeclarationStatement, statement);
5826 } 5826 }
5827 5827
5828 void test_parseAwaitExpression_inSync() {
5829 MethodDeclaration method = ParserTestCase.parse("parseClassMember", <Object> ["C"], EngineTestCase.createSource(["m() { return await x + await y; }"]));
5830 FunctionBody body = method.body;
5831 EngineTestCase.assertInstanceOf((obj) => obj is BlockFunctionBody, BlockFunc tionBody, body);
5832 Statement statement = (body as BlockFunctionBody).block.statements[0];
5833 EngineTestCase.assertInstanceOf((obj) => obj is ReturnStatement, ReturnState ment, statement);
5834 Expression expression = (statement as ReturnStatement).expression;
5835 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr ession, expression);
5836 EngineTestCase.assertInstanceOf((obj) => obj is AwaitExpression, AwaitExpres sion, (expression as BinaryExpression).leftOperand);
5837 EngineTestCase.assertInstanceOf((obj) => obj is AwaitExpression, AwaitExpres sion, (expression as BinaryExpression).rightOperand);
5838 }
5839
5828 void test_parseBitwiseAndExpression_normal() { 5840 void test_parseBitwiseAndExpression_normal() {
5829 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseAndExpressi on", "x & y", []); 5841 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseAndExpressi on", "x & y", []);
5830 JUnitTestCase.assertNotNull(expression.leftOperand); 5842 JUnitTestCase.assertNotNull(expression.leftOperand);
5831 JUnitTestCase.assertNotNull(expression.operator); 5843 JUnitTestCase.assertNotNull(expression.operator);
5832 JUnitTestCase.assertEquals(TokenType.AMPERSAND, expression.operator.type); 5844 JUnitTestCase.assertEquals(TokenType.AMPERSAND, expression.operator.type);
5833 JUnitTestCase.assertNotNull(expression.rightOperand); 5845 JUnitTestCase.assertNotNull(expression.rightOperand);
5834 } 5846 }
5835 5847
5836 void test_parseBitwiseAndExpression_super() { 5848 void test_parseBitwiseAndExpression_super() {
5837 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseAndExpressi on", "super & y", []); 5849 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseAndExpressi on", "super & y", []);
(...skipping 4697 matching lines...) Expand 10 before | Expand all | Expand 10 after
10535 runJUnitTest(__test, __test.test_parseAwaitExpression); 10547 runJUnitTest(__test, __test.test_parseAwaitExpression);
10536 }); 10548 });
10537 _ut.test('test_parseAwaitExpression_asStatement_inAsync', () { 10549 _ut.test('test_parseAwaitExpression_asStatement_inAsync', () {
10538 final __test = new SimpleParserTest(); 10550 final __test = new SimpleParserTest();
10539 runJUnitTest(__test, __test.test_parseAwaitExpression_asStatement_inAsyn c); 10551 runJUnitTest(__test, __test.test_parseAwaitExpression_asStatement_inAsyn c);
10540 }); 10552 });
10541 _ut.test('test_parseAwaitExpression_asStatement_inSync', () { 10553 _ut.test('test_parseAwaitExpression_asStatement_inSync', () {
10542 final __test = new SimpleParserTest(); 10554 final __test = new SimpleParserTest();
10543 runJUnitTest(__test, __test.test_parseAwaitExpression_asStatement_inSync ); 10555 runJUnitTest(__test, __test.test_parseAwaitExpression_asStatement_inSync );
10544 }); 10556 });
10557 _ut.test('test_parseAwaitExpression_inSync', () {
10558 final __test = new SimpleParserTest();
10559 runJUnitTest(__test, __test.test_parseAwaitExpression_inSync);
10560 });
10545 _ut.test('test_parseBitwiseAndExpression_normal', () { 10561 _ut.test('test_parseBitwiseAndExpression_normal', () {
10546 final __test = new SimpleParserTest(); 10562 final __test = new SimpleParserTest();
10547 runJUnitTest(__test, __test.test_parseBitwiseAndExpression_normal); 10563 runJUnitTest(__test, __test.test_parseBitwiseAndExpression_normal);
10548 }); 10564 });
10549 _ut.test('test_parseBitwiseAndExpression_super', () { 10565 _ut.test('test_parseBitwiseAndExpression_super', () {
10550 final __test = new SimpleParserTest(); 10566 final __test = new SimpleParserTest();
10551 runJUnitTest(__test, __test.test_parseBitwiseAndExpression_super); 10567 runJUnitTest(__test, __test.test_parseBitwiseAndExpression_super);
10552 }); 10568 });
10553 _ut.test('test_parseBitwiseOrExpression_normal', () { 10569 _ut.test('test_parseBitwiseOrExpression_normal', () {
10554 final __test = new SimpleParserTest(); 10570 final __test = new SimpleParserTest();
(...skipping 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after
12460 12476
12461 main() { 12477 main() {
12462 ComplexParserTest.dartSuite(); 12478 ComplexParserTest.dartSuite();
12463 ErrorParserTest.dartSuite(); 12479 ErrorParserTest.dartSuite();
12464 IncrementalParserTest.dartSuite(); 12480 IncrementalParserTest.dartSuite();
12465 NonErrorParserTest.dartSuite(); 12481 NonErrorParserTest.dartSuite();
12466 RecoveryParserTest.dartSuite(); 12482 RecoveryParserTest.dartSuite();
12467 ResolutionCopierTest.dartSuite(); 12483 ResolutionCopierTest.dartSuite();
12468 SimpleParserTest.dartSuite(); 12484 SimpleParserTest.dartSuite();
12469 } 12485 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698