OLD | NEW |
1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
3 library engine.scanner_test; | 3 library engine.scanner_test; |
4 import 'package:analyzer_experimental/src/generated/java_core.dart'; | 4 import 'package:analyzer_experimental/src/generated/java_core.dart'; |
5 import 'package:analyzer_experimental/src/generated/java_engine_io.dart'; | |
6 import 'package:analyzer_experimental/src/generated/java_junit.dart'; | 5 import 'package:analyzer_experimental/src/generated/java_junit.dart'; |
7 import 'package:analyzer_experimental/src/generated/source.dart'; | 6 import 'package:analyzer_experimental/src/generated/source.dart'; |
8 import 'package:analyzer_experimental/src/generated/error.dart'; | 7 import 'package:analyzer_experimental/src/generated/error.dart'; |
9 import 'package:analyzer_experimental/src/generated/scanner.dart'; | 8 import 'package:analyzer_experimental/src/generated/scanner.dart'; |
10 import 'package:unittest/unittest.dart' as _ut; | 9 import 'package:unittest/unittest.dart' as _ut; |
11 import 'test_support.dart'; | 10 import 'test_support.dart'; |
12 class KeywordStateTest extends JUnitTestCase { | 11 class KeywordStateTest extends JUnitTestCase { |
13 void test_KeywordState() { | 12 void test_KeywordState() { |
14 List<Keyword> keywords = Keyword.values; | 13 List<Keyword> keywords = Keyword.values; |
15 int keywordCount = keywords.length; | 14 int keywordCount = keywords.length; |
(...skipping 2125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2141 } | 2140 } |
2142 void test_tilde_slash_eq() { | 2141 void test_tilde_slash_eq() { |
2143 assertToken(TokenType.TILDE_SLASH_EQ, "~/="); | 2142 assertToken(TokenType.TILDE_SLASH_EQ, "~/="); |
2144 } | 2143 } |
2145 void test_unclosedPairInInterpolation() { | 2144 void test_unclosedPairInInterpolation() { |
2146 GatheringErrorListener listener = new GatheringErrorListener(); | 2145 GatheringErrorListener listener = new GatheringErrorListener(); |
2147 scan("'\${(}'", listener); | 2146 scan("'\${(}'", listener); |
2148 } | 2147 } |
2149 Token scan(String source, GatheringErrorListener listener); | 2148 Token scan(String source, GatheringErrorListener listener); |
2150 void assertComment(TokenType commentType, String source) { | 2149 void assertComment(TokenType commentType, String source) { |
2151 Token token = scan2("${source}${OSUtilities.LINE_SEPARATOR}"); | 2150 Token token = scan2("${source}\n"); |
2152 JUnitTestCase.assertNotNull(token); | 2151 JUnitTestCase.assertNotNull(token); |
2153 JUnitTestCase.assertEquals(TokenType.EOF, token.type); | 2152 JUnitTestCase.assertEquals(TokenType.EOF, token.type); |
2154 Token comment = token.precedingComments; | 2153 Token comment = token.precedingComments; |
2155 JUnitTestCase.assertNotNull(comment); | 2154 JUnitTestCase.assertNotNull(comment); |
2156 JUnitTestCase.assertEquals(commentType, comment.type); | 2155 JUnitTestCase.assertEquals(commentType, comment.type); |
2157 JUnitTestCase.assertEquals(0, comment.offset); | 2156 JUnitTestCase.assertEquals(0, comment.offset); |
2158 JUnitTestCase.assertEquals(source.length, comment.length); | 2157 JUnitTestCase.assertEquals(source.length, comment.length); |
2159 JUnitTestCase.assertEquals(source, comment.lexeme); | 2158 JUnitTestCase.assertEquals(source, comment.lexeme); |
2160 } | 2159 } |
2161 | 2160 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2287 this._lineNumber = lineNumber; | 2286 this._lineNumber = lineNumber; |
2288 this._columnNumber = columnNumber; | 2287 this._columnNumber = columnNumber; |
2289 } | 2288 } |
2290 } | 2289 } |
2291 main() { | 2290 main() { |
2292 CharBufferScannerTest.dartSuite(); | 2291 CharBufferScannerTest.dartSuite(); |
2293 KeywordStateTest.dartSuite(); | 2292 KeywordStateTest.dartSuite(); |
2294 StringScannerTest.dartSuite(); | 2293 StringScannerTest.dartSuite(); |
2295 TokenTypeTest.dartSuite(); | 2294 TokenTypeTest.dartSuite(); |
2296 } | 2295 } |
OLD | NEW |