| OLD | NEW |
| 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 library engine.parser_test; | 5 library engine.parser_test; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
| 8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
| 9 import 'package:analyzer/src/generated/error.dart'; | 9 import 'package:analyzer/src/generated/error.dart'; |
| 10 import 'package:analyzer/src/generated/incremental_scanner.dart'; | 10 import 'package:analyzer/src/generated/incremental_scanner.dart'; |
| (...skipping 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1914 } | 1914 } |
| 1915 | 1915 |
| 1916 void test_missingKeywordOperator_parseClassMember_afterVoid() { | 1916 void test_missingKeywordOperator_parseClassMember_afterVoid() { |
| 1917 ParserTestCase.parse3( | 1917 ParserTestCase.parse3( |
| 1918 "parseClassMember", | 1918 "parseClassMember", |
| 1919 <Object>["C"], | 1919 <Object>["C"], |
| 1920 "void +() {}", | 1920 "void +() {}", |
| 1921 [ParserErrorCode.MISSING_KEYWORD_OPERATOR]); | 1921 [ParserErrorCode.MISSING_KEYWORD_OPERATOR]); |
| 1922 } | 1922 } |
| 1923 | 1923 |
| 1924 void test_missingMethodParameters_void_block() { |
| 1925 ParserTestCase.parse3( |
| 1926 "parseClassMember", |
| 1927 <Object>["C"], |
| 1928 "void m {} }", |
| 1929 [ParserErrorCode.MISSING_METHOD_PARAMETERS]); |
| 1930 } |
| 1931 |
| 1932 void test_missingMethodParameters_void_expression() { |
| 1933 ParserTestCase.parse3( |
| 1934 "parseClassMember", |
| 1935 <Object>["C"], |
| 1936 "void m => null; }", |
| 1937 [ParserErrorCode.MISSING_METHOD_PARAMETERS]); |
| 1938 } |
| 1939 |
| 1924 void test_missingNameInLibraryDirective() { | 1940 void test_missingNameInLibraryDirective() { |
| 1925 CompilationUnit unit = ParserTestCase.parseCompilationUnit( | 1941 CompilationUnit unit = ParserTestCase.parseCompilationUnit( |
| 1926 "library;", | 1942 "library;", |
| 1927 [ParserErrorCode.MISSING_NAME_IN_LIBRARY_DIRECTIVE]); | 1943 [ParserErrorCode.MISSING_NAME_IN_LIBRARY_DIRECTIVE]); |
| 1928 expect(unit, isNotNull); | 1944 expect(unit, isNotNull); |
| 1929 } | 1945 } |
| 1930 | 1946 |
| 1931 void test_missingNameInPartOfDirective() { | 1947 void test_missingNameInPartOfDirective() { |
| 1932 CompilationUnit unit = ParserTestCase.parseCompilationUnit( | 1948 CompilationUnit unit = ParserTestCase.parseCompilationUnit( |
| 1933 "part of;", | 1949 "part of;", |
| (...skipping 8988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10922 // Parse the source. | 10938 // Parse the source. |
| 10923 // | 10939 // |
| 10924 Parser parser = new Parser(null, listener); | 10940 Parser parser = new Parser(null, listener); |
| 10925 return invokeParserMethodImpl( | 10941 return invokeParserMethodImpl( |
| 10926 parser, | 10942 parser, |
| 10927 methodName, | 10943 methodName, |
| 10928 <Object>[tokenStream], | 10944 <Object>[tokenStream], |
| 10929 tokenStream) as Token; | 10945 tokenStream) as Token; |
| 10930 } | 10946 } |
| 10931 } | 10947 } |
| OLD | NEW |