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

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

Issue 103233003: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 // 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 3
4 library engine.scanner_test; 4 library engine.scanner_test;
5 5
6 import 'package:analyzer/src/generated/java_core.dart'; 6 import 'package:analyzer/src/generated/java_core.dart';
7 import 'package:analyzer/src/generated/java_junit.dart'; 7 import 'package:analyzer/src/generated/java_junit.dart';
8 import 'package:analyzer/src/generated/source.dart'; 8 import 'package:analyzer/src/generated/source.dart';
9 import 'package:analyzer/src/generated/error.dart'; 9 import 'package:analyzer/src/generated/error.dart';
10 import 'package:analyzer/src/generated/scanner.dart'; 10 import 'package:analyzer/src/generated/scanner.dart';
(...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after
1872 * invoked. 1872 * invoked.
1873 */ 1873 */
1874 IncrementalScanner _incrementalScanner; 1874 IncrementalScanner _incrementalScanner;
1875 1875
1876 /** 1876 /**
1877 * The first token from the token stream resulting from performing an incremen tal scan, or 1877 * The first token from the token stream resulting from performing an incremen tal scan, or
1878 * `null` if [scan] has not been invoked. 1878 * `null` if [scan] has not been invoked.
1879 */ 1879 */
1880 Token _incrementalTokens; 1880 Token _incrementalTokens;
1881 1881
1882 void fail_delete_identifier_beginning() { 1882 void test_delete_identifier_beginning() {
1883 scan("", "ab", "", "s + b;"); 1883 scan("", "ab", "", "s + b;");
1884 assertTokens(0, 0, ["s", "+", "b", ";"]); 1884 assertTokens(-1, 1, ["s", "+", "b", ";"]);
1885 } 1885 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1886
1887 void fail_delete_mergeTokens() {
1888 scan("a", " + b + ", "", "c;");
1889 assertTokens(0, 0, ["ac", ";"]);
1890 }
1891
1892 void fail_replace_multiple_partialFirstAndLast() {
1893 scan("a", "a + b", "b * a", "b;");
1894 assertTokens(0, 2, ["ab", "*", "ab", ";"]);
1895 } 1886 }
1896 1887
1897 void test_delete_identifier_end() { 1888 void test_delete_identifier_end() {
1898 scan("a", "bs", "", " + b;"); 1889 scan("a", "bs", "", " + b;");
1899 assertTokens(0, 0, ["a", "+", "b", ";"]); 1890 assertTokens(-1, 1, ["a", "+", "b", ";"]);
1891 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1900 } 1892 }
1901 1893
1902 void test_delete_identifier_middle() { 1894 void test_delete_identifier_middle() {
1903 scan("a", "b", "", "s + b;"); 1895 scan("a", "b", "", "s + b;");
1904 assertTokens(0, 0, ["as", "+", "b", ";"]); 1896 assertTokens(-1, 1, ["as", "+", "b", ";"]);
1897 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1898 }
1899
1900 void test_delete_mergeTokens() {
1901 scan("a", " + b + ", "", "c;");
1902 assertTokens(-1, 1, ["ac", ";"]);
1903 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1905 } 1904 }
1906 1905
1907 void test_insert_afterIdentifier1() { 1906 void test_insert_afterIdentifier1() {
1908 scan("a", "", "bs", " + b;"); 1907 scan("a", "", "bs", " + b;");
1909 assertTokens(0, 0, ["abs", "+", "b", ";"]); 1908 assertTokens(-1, 1, ["abs", "+", "b", ";"]);
1910 assertReplaced(1, "+"); 1909 assertReplaced(1, "+");
1910 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1911 } 1911 }
1912 1912
1913 void test_insert_afterIdentifier2() { 1913 void test_insert_afterIdentifier2() {
1914 scan("a + b", "", "y", ";"); 1914 scan("a + b", "", "y", ";");
1915 assertTokens(2, 2, ["a", "+", "by", ";"]); 1915 assertTokens(1, 3, ["a", "+", "by", ";"]);
1916 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1916 } 1917 }
1917 1918
1918 void test_insert_beforeIdentifier() { 1919 void test_insert_beforeIdentifier() {
1919 scan("a + ", "", "x", "b;"); 1920 scan("a + ", "", "x", "b;");
1920 assertTokens(2, 2, ["a", "+", "xb", ";"]); 1921 assertTokens(1, 3, ["a", "+", "xb", ";"]);
1922 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1921 } 1923 }
1922 1924
1923 void test_insert_beforeIdentifier_firstToken() { 1925 void test_insert_beforeIdentifier_firstToken() {
1924 scan("", "", "x", "a + b;"); 1926 scan("", "", "x", "a + b;");
1925 assertTokens(0, 0, ["xa", "+", "b", ";"]); 1927 assertTokens(-1, 1, ["xa", "+", "b", ";"]);
1928 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1926 } 1929 }
1927 1930
1928 void test_insert_convertOneFunctionToTwo() { 1931 void test_insert_convertOneFunctionToTwo() {
1929 scan("f()", "", " => 0; g()", " {}"); 1932 scan("f()", "", " => 0; g()", " {}");
1930 assertTokens(3, 8, ["f", "(", ")", "=>", "0", ";", "g", "(", ")", "{", "}"]) ; 1933 assertTokens(2, 9, ["f", "(", ")", "=>", "0", ";", "g", "(", ")", "{", "}"]) ;
1934 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1935 }
1936
1937 void test_insert_end() {
1938 scan("class A {}", "", " class B {}", "");
1939 assertTokens(3, 8, ["class", "A", "{", "}", "class", "B", "{", "}"]);
1940 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1941 }
1942
1943 void test_insert_insideIdentifier() {
1944 scan("co", "", "w.", "b;");
1945 assertTokens(-1, 3, ["cow", ".", "b", ";"]);
1946 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1931 } 1947 }
1932 1948
1933 void test_insert_newIdentifier1() { 1949 void test_insert_newIdentifier1() {
1934 scan("a; ", "", "b", " c;"); 1950 scan("a; ", "", "b", " c;");
1935 assertTokens(2, 2, ["a", ";", "b", "c", ";"]); 1951 assertTokens(1, 3, ["a", ";", "b", "c", ";"]);
1952 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1936 } 1953 }
1937 1954
1938 void test_insert_newIdentifier2() { 1955 void test_insert_newIdentifier2() {
1939 scan("a;", "", "b", " c;"); 1956 scan("a;", "", "b", " c;");
1940 assertTokens(2, 2, ["a", ";", "b", "c", ";"]); 1957 assertTokens(1, 3, ["a", ";", "b", "c", ";"]);
1941 assertReplaced(1, ";"); 1958 assertReplaced(1, ";");
1959 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1942 } 1960 }
1943 1961
1944 void test_insert_period() { 1962 void test_insert_period() {
1945 scan("a + b", "", ".", ";"); 1963 scan("a + b", "", ".", ";");
1946 assertTokens(3, 3, ["a", "+", "b", ".", ";"]); 1964 assertTokens(2, 4, ["a", "+", "b", ".", ";"]);
1947 } 1965 }
1948 1966
1949 void test_insert_period_betweenIdentifiers1() { 1967 void test_insert_period_betweenIdentifiers1() {
1950 scan("a", "", ".", " b;"); 1968 scan("a", "", ".", " b;");
1951 assertTokens(1, 1, ["a", ".", "b", ";"]); 1969 assertTokens(0, 2, ["a", ".", "b", ";"]);
1970 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1952 } 1971 }
1953 1972
1954 void test_insert_period_betweenIdentifiers2() { 1973 void test_insert_period_betweenIdentifiers2() {
1955 scan("a ", "", ".", "b;"); 1974 scan("a ", "", ".", "b;");
1956 assertTokens(1, 1, ["a", ".", "b", ";"]); 1975 assertTokens(0, 2, ["a", ".", "b", ";"]);
1957 } 1976 }
1958 1977
1959 void test_insert_period_betweenIdentifiers3() { 1978 void test_insert_period_betweenIdentifiers3() {
1960 scan("a ", "", ".", " b;"); 1979 scan("a ", "", ".", " b;");
1961 assertTokens(1, 1, ["a", ".", "b", ";"]); 1980 assertTokens(0, 2, ["a", ".", "b", ";"]);
1981 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1962 } 1982 }
1963 1983
1964 void test_insert_period_insideExistingIdentifier() { 1984 void test_insert_period_insideExistingIdentifier() {
1965 scan("a", "", ".", "b;"); 1985 scan("a", "", ".", "b;");
1966 assertTokens(0, 2, ["a", ".", "b", ";"]); 1986 assertTokens(-1, 3, ["a", ".", "b", ";"]);
1987 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
1967 } 1988 }
1968 1989
1969 void test_insert_periodAndIdentifier() { 1990 void test_insert_periodAndIdentifier() {
1970 scan("a + b", "", ".x", ";"); 1991 scan("a + b", "", ".x", ";");
1971 assertTokens(3, 4, ["a", "+", "b", ".", "x", ";"]); 1992 assertTokens(2, 5, ["a", "+", "b", ".", "x", ";"]);
1972 } 1993 }
1973 1994
1974 void test_insert_whitespace_beginning_beforeToken() { 1995 void test_insert_whitespace_beginning_beforeToken() {
1975 scan("", "", " ", "a + b;"); 1996 scan("", "", " ", "a + b;");
1976 assertTokens(-1, -1, ["a", "+", "b", ";"]); 1997 assertTokens(0, 1, ["a", "+", "b", ";"]);
1998 JUnitTestCase.assertFalse(_incrementalScanner.hasNonWhitespaceChange());
1977 } 1999 }
1978 2000
1979 void test_insert_whitespace_betweenTokens() { 2001 void test_insert_whitespace_betweenTokens() {
1980 scan("a ", "", " ", "+ b;"); 2002 scan("a ", "", " ", "+ b;");
1981 assertTokens(-1, -1, ["a", "+", "b", ";"]); 2003 assertTokens(1, 2, ["a", "+", "b", ";"]);
2004 JUnitTestCase.assertFalse(_incrementalScanner.hasNonWhitespaceChange());
1982 } 2005 }
1983 2006
1984 void test_insert_whitespace_end_afterToken() { 2007 void test_insert_whitespace_end_afterToken() {
1985 scan("a + b;", "", " ", ""); 2008 scan("a + b;", "", " ", "");
1986 assertTokens(-1, -1, ["a", "+", "b", ";"]); 2009 assertTokens(3, 4, ["a", "+", "b", ";"]);
2010 JUnitTestCase.assertFalse(_incrementalScanner.hasNonWhitespaceChange());
1987 } 2011 }
1988 2012
1989 void test_insert_whitespace_end_afterWhitespace() { 2013 void test_insert_whitespace_end_afterWhitespace() {
1990 scan("a + b; ", "", " ", ""); 2014 scan("a + b; ", "", " ", "");
1991 assertTokens(-1, -1, ["a", "+", "b", ";"]); 2015 assertTokens(3, 4, ["a", "+", "b", ";"]);
2016 JUnitTestCase.assertFalse(_incrementalScanner.hasNonWhitespaceChange());
1992 } 2017 }
1993 2018
1994 void test_insert_whitespace_withMultipleComments() { 2019 void test_insert_whitespace_withMultipleComments() {
1995 scan(EngineTestCase.createSource(["//comment", "//comment2", "a"]), "", " ", " + b;"); 2020 scan(EngineTestCase.createSource(["//comment", "//comment2", "a"]), "", " ", " + b;");
1996 assertTokens(-1, -1, ["a", "+", "b", ";"]); 2021 assertTokens(1, 2, ["a", "+", "b", ";"]);
2022 JUnitTestCase.assertFalse(_incrementalScanner.hasNonWhitespaceChange());
1997 } 2023 }
1998 2024
1999 void test_replace_identifier_beginning() { 2025 void test_replace_identifier_beginning() {
2000 scan("", "b", "f", "ell + b;"); 2026 scan("", "b", "f", "ell + b;");
2001 assertTokens(0, 0, ["fell", "+", "b", ";"]); 2027 assertTokens(-1, 1, ["fell", "+", "b", ";"]);
2028 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
2002 } 2029 }
2003 2030
2004 void test_replace_identifier_end() { 2031 void test_replace_identifier_end() {
2005 scan("bel", "l", "t", " + b;"); 2032 scan("bel", "l", "t", " + b;");
2006 assertTokens(0, 0, ["belt", "+", "b", ";"]); 2033 assertTokens(-1, 1, ["belt", "+", "b", ";"]);
2034 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
2007 } 2035 }
2008 2036
2009 void test_replace_identifier_middle() { 2037 void test_replace_identifier_middle() {
2010 scan("f", "ir", "ro", "st + b;"); 2038 scan("f", "ir", "ro", "st + b;");
2011 assertTokens(0, 0, ["frost", "+", "b", ";"]); 2039 assertTokens(-1, 1, ["frost", "+", "b", ";"]);
2040 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
2041 }
2042
2043 void test_replace_multiple_partialFirstAndLast() {
2044 scan("a", "a + b", "b * a", "b;");
2045 assertTokens(-1, 3, ["ab", "*", "ab", ";"]);
2046 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
2012 } 2047 }
2013 2048
2014 void test_replace_operator_oneForMany() { 2049 void test_replace_operator_oneForMany() {
2015 scan("a ", "+", "* c -", " b;"); 2050 scan("a ", "+", "* c -", " b;");
2016 assertTokens(1, 3, ["a", "*", "c", "-", "b", ";"]); 2051 assertTokens(0, 4, ["a", "*", "c", "-", "b", ";"]);
2052 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
2017 } 2053 }
2018 2054
2019 void test_replace_operator_oneForOne() { 2055 void test_replace_operator_oneForOne() {
2020 scan("a ", "+", "*", " b;"); 2056 scan("a ", "+", "*", " b;");
2021 assertTokens(1, 1, ["a", "*", "b", ";"]); 2057 assertTokens(0, 2, ["a", "*", "b", ";"]);
2058 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange());
2022 } 2059 }
2023 2060
2024 void test_tokenMap() { 2061 void test_tokenMap() {
2025 scan("main() {", "", " ", "a + b;}"); 2062 scan("main() {", "", " ", "a + b;}");
2026 TokenMap tokenMap = _incrementalScanner.tokenMap; 2063 TokenMap tokenMap = _incrementalScanner.tokenMap;
2027 Token oldToken = _originalTokens; 2064 Token oldToken = _originalTokens;
2028 while (oldToken.type != TokenType.EOF) { 2065 while (oldToken.type != TokenType.EOF) {
2029 Token newToken = tokenMap.get(oldToken); 2066 Token newToken = tokenMap.get(oldToken);
2030 JUnitTestCase.assertNotSame(oldToken, newToken); 2067 JUnitTestCase.assertNotSame(oldToken, newToken);
2031 JUnitTestCase.assertSame(oldToken.type, newToken.type); 2068 JUnitTestCase.assertSame(oldToken.type, newToken.type);
2032 JUnitTestCase.assertEquals(oldToken.lexeme, newToken.lexeme); 2069 JUnitTestCase.assertEquals(oldToken.lexeme, newToken.lexeme);
2033 oldToken = oldToken.next; 2070 oldToken = oldToken.next;
2034 } 2071 }
2072 JUnitTestCase.assertFalse(_incrementalScanner.hasNonWhitespaceChange());
2035 } 2073 }
2036 2074
2075 /**
2076 * Assert that the token at the given offset was replaced with a new token hav ing the given
2077 * lexeme.
2078 *
2079 * @param tokenOffset the offset of the token being tested
2080 * @param lexeme the expected lexeme of the new token
2081 */
2037 void assertReplaced(int tokenOffset, String lexeme) { 2082 void assertReplaced(int tokenOffset, String lexeme) {
2038 Token oldToken = _originalTokens; 2083 Token oldToken = _originalTokens;
2039 for (int i = 0; i < tokenOffset; i++) { 2084 for (int i = 0; i < tokenOffset; i++) {
2040 oldToken = oldToken.next; 2085 oldToken = oldToken.next;
2041 } 2086 }
2042 JUnitTestCase.assertEquals(lexeme, oldToken.lexeme); 2087 JUnitTestCase.assertEquals(lexeme, oldToken.lexeme);
2043 Token newToken = _incrementalScanner.tokenMap.get(oldToken); 2088 Token newToken = _incrementalScanner.tokenMap.get(oldToken);
2044 JUnitTestCase.assertNotNull(newToken); 2089 JUnitTestCase.assertNotNull(newToken);
2045 JUnitTestCase.assertEquals(lexeme, newToken.lexeme); 2090 JUnitTestCase.assertEquals(lexeme, newToken.lexeme);
2046 JUnitTestCase.assertNotSame(oldToken, newToken); 2091 JUnitTestCase.assertNotSame(oldToken, newToken);
2047 } 2092 }
2048 2093
2049 void assertTokens(int firstIndex, int lastIndex, List<String> lexemes) { 2094 /**
2050 Token firstToken = null; 2095 * Assert that the result of the incremental scan matches the given list of le xemes and that the
2051 Token lastToken = null; 2096 * left and right tokens correspond to the tokens at the given indices.
2097 *
2098 * @param leftIndex the expected index of the left token
2099 * @param rightIndex the expected index of the right token
2100 * @param lexemes the expected lexemes of the resulting tokens
2101 */
2102 void assertTokens(int leftIndex, int rightIndex, List<String> lexemes) {
2052 int count = lexemes.length; 2103 int count = lexemes.length;
2104 JUnitTestCase.assertTrueMsg("Invalid left index", leftIndex >= -1 && leftInd ex < count);
2105 JUnitTestCase.assertTrueMsg("Invalid right index", rightIndex >= 0 && rightI ndex <= count);
2106 Token leftToken = null;
2107 Token rightToken = null;
2053 Token token = _incrementalTokens; 2108 Token token = _incrementalTokens;
2109 if (leftIndex < 0) {
2110 leftToken = token.previous;
2111 }
2054 for (int i = 0; i < count; i++) { 2112 for (int i = 0; i < count; i++) {
2055 JUnitTestCase.assertEquals(lexemes[i], token.lexeme); 2113 JUnitTestCase.assertEquals(lexemes[i], token.lexeme);
2056 if (i == firstIndex) { 2114 if (i == leftIndex) {
2057 firstToken = token; 2115 leftToken = token;
2058 } 2116 }
2059 if (i == lastIndex) { 2117 if (i == rightIndex) {
2060 lastToken = token; 2118 rightToken = token;
2061 } 2119 }
2062 token = token.next; 2120 token = token.next;
2063 } 2121 }
2122 if (rightIndex >= count) {
2123 rightToken = token;
2124 }
2064 JUnitTestCase.assertSameMsg("Too many tokens", TokenType.EOF, token.type); 2125 JUnitTestCase.assertSameMsg("Too many tokens", TokenType.EOF, token.type);
2065 if (firstIndex >= 0) { 2126 if (leftIndex >= 0) {
2066 JUnitTestCase.assertNotNull(firstToken); 2127 JUnitTestCase.assertNotNull(leftToken);
2067 } 2128 }
2068 JUnitTestCase.assertSame(firstToken, _incrementalScanner.firstToken); 2129 JUnitTestCase.assertSameMsg("Invalid left token", leftToken, _incrementalSca nner.leftToken);
2069 if (lastIndex >= 0) { 2130 if (rightIndex >= 0) {
2070 JUnitTestCase.assertNotNull(lastToken); 2131 JUnitTestCase.assertNotNull(rightToken);
2071 } 2132 }
2072 JUnitTestCase.assertSame(lastToken, _incrementalScanner.lastToken); 2133 JUnitTestCase.assertSameMsg("Invalid right token", rightToken, _incrementalS canner.rightToken);
2073 } 2134 }
2074 2135
2075 /** 2136 /**
2076 * Given a description of the original and modified contents, perform an incre mental scan of the 2137 * Given a description of the original and modified contents, perform an incre mental scan of the
2077 * two pieces of text. 2138 * two pieces of text. Verify that the incremental scan produced the same toke ns as those that
2139 * would be produced by a full scan of the new contents.
2078 * 2140 *
2079 * @param prefix the unchanged text before the edit region 2141 * @param prefix the unchanged text before the edit region
2080 * @param removed the text that was removed from the original contents 2142 * @param removed the text that was removed from the original contents
2081 * @param added the text that was added to the modified contents 2143 * @param added the text that was added to the modified contents
2082 * @param suffix the unchanged text after the edit region 2144 * @param suffix the unchanged text after the edit region
2083 */ 2145 */
2084 void scan(String prefix, String removed, String added, String suffix) { 2146 void scan(String prefix, String removed, String added, String suffix) {
2085 String originalContents = "${prefix}${removed}${suffix}"; 2147 String originalContents = "${prefix}${removed}${suffix}";
2086 String modifiedContents = "${prefix}${added}${suffix}"; 2148 String modifiedContents = "${prefix}${added}${suffix}";
2087 int replaceStart = prefix.length; 2149 int replaceStart = prefix.length;
(...skipping 18 matching lines...) Expand all
2106 JUnitTestCase.assertEqualsMsg("Wrong lexeme for token", modifiedTokens.lex eme, incrementalToken.lexeme); 2168 JUnitTestCase.assertEqualsMsg("Wrong lexeme for token", modifiedTokens.lex eme, incrementalToken.lexeme);
2107 incrementalToken = incrementalToken.next; 2169 incrementalToken = incrementalToken.next;
2108 modifiedTokens = modifiedTokens.next; 2170 modifiedTokens = modifiedTokens.next;
2109 } 2171 }
2110 JUnitTestCase.assertSameMsg("Too many tokens", TokenType.EOF, incrementalTok en.type); 2172 JUnitTestCase.assertSameMsg("Too many tokens", TokenType.EOF, incrementalTok en.type);
2111 JUnitTestCase.assertSameMsg("Not enough tokens", TokenType.EOF, modifiedToke ns.type); 2173 JUnitTestCase.assertSameMsg("Not enough tokens", TokenType.EOF, modifiedToke ns.type);
2112 } 2174 }
2113 2175
2114 static dartSuite() { 2176 static dartSuite() {
2115 _ut.group('IncrementalScannerTest', () { 2177 _ut.group('IncrementalScannerTest', () {
2178 _ut.test('test_delete_identifier_beginning', () {
2179 final __test = new IncrementalScannerTest();
2180 runJUnitTest(__test, __test.test_delete_identifier_beginning);
2181 });
2116 _ut.test('test_delete_identifier_end', () { 2182 _ut.test('test_delete_identifier_end', () {
2117 final __test = new IncrementalScannerTest(); 2183 final __test = new IncrementalScannerTest();
2118 runJUnitTest(__test, __test.test_delete_identifier_end); 2184 runJUnitTest(__test, __test.test_delete_identifier_end);
2119 }); 2185 });
2120 _ut.test('test_delete_identifier_middle', () { 2186 _ut.test('test_delete_identifier_middle', () {
2121 final __test = new IncrementalScannerTest(); 2187 final __test = new IncrementalScannerTest();
2122 runJUnitTest(__test, __test.test_delete_identifier_middle); 2188 runJUnitTest(__test, __test.test_delete_identifier_middle);
2123 }); 2189 });
2190 _ut.test('test_delete_mergeTokens', () {
2191 final __test = new IncrementalScannerTest();
2192 runJUnitTest(__test, __test.test_delete_mergeTokens);
2193 });
2124 _ut.test('test_insert_afterIdentifier1', () { 2194 _ut.test('test_insert_afterIdentifier1', () {
2125 final __test = new IncrementalScannerTest(); 2195 final __test = new IncrementalScannerTest();
2126 runJUnitTest(__test, __test.test_insert_afterIdentifier1); 2196 runJUnitTest(__test, __test.test_insert_afterIdentifier1);
2127 }); 2197 });
2128 _ut.test('test_insert_afterIdentifier2', () { 2198 _ut.test('test_insert_afterIdentifier2', () {
2129 final __test = new IncrementalScannerTest(); 2199 final __test = new IncrementalScannerTest();
2130 runJUnitTest(__test, __test.test_insert_afterIdentifier2); 2200 runJUnitTest(__test, __test.test_insert_afterIdentifier2);
2131 }); 2201 });
2132 _ut.test('test_insert_beforeIdentifier', () { 2202 _ut.test('test_insert_beforeIdentifier', () {
2133 final __test = new IncrementalScannerTest(); 2203 final __test = new IncrementalScannerTest();
2134 runJUnitTest(__test, __test.test_insert_beforeIdentifier); 2204 runJUnitTest(__test, __test.test_insert_beforeIdentifier);
2135 }); 2205 });
2136 _ut.test('test_insert_beforeIdentifier_firstToken', () { 2206 _ut.test('test_insert_beforeIdentifier_firstToken', () {
2137 final __test = new IncrementalScannerTest(); 2207 final __test = new IncrementalScannerTest();
2138 runJUnitTest(__test, __test.test_insert_beforeIdentifier_firstToken); 2208 runJUnitTest(__test, __test.test_insert_beforeIdentifier_firstToken);
2139 }); 2209 });
2140 _ut.test('test_insert_convertOneFunctionToTwo', () { 2210 _ut.test('test_insert_convertOneFunctionToTwo', () {
2141 final __test = new IncrementalScannerTest(); 2211 final __test = new IncrementalScannerTest();
2142 runJUnitTest(__test, __test.test_insert_convertOneFunctionToTwo); 2212 runJUnitTest(__test, __test.test_insert_convertOneFunctionToTwo);
2143 }); 2213 });
2214 _ut.test('test_insert_end', () {
2215 final __test = new IncrementalScannerTest();
2216 runJUnitTest(__test, __test.test_insert_end);
2217 });
2218 _ut.test('test_insert_insideIdentifier', () {
2219 final __test = new IncrementalScannerTest();
2220 runJUnitTest(__test, __test.test_insert_insideIdentifier);
2221 });
2144 _ut.test('test_insert_newIdentifier1', () { 2222 _ut.test('test_insert_newIdentifier1', () {
2145 final __test = new IncrementalScannerTest(); 2223 final __test = new IncrementalScannerTest();
2146 runJUnitTest(__test, __test.test_insert_newIdentifier1); 2224 runJUnitTest(__test, __test.test_insert_newIdentifier1);
2147 }); 2225 });
2148 _ut.test('test_insert_newIdentifier2', () { 2226 _ut.test('test_insert_newIdentifier2', () {
2149 final __test = new IncrementalScannerTest(); 2227 final __test = new IncrementalScannerTest();
2150 runJUnitTest(__test, __test.test_insert_newIdentifier2); 2228 runJUnitTest(__test, __test.test_insert_newIdentifier2);
2151 }); 2229 });
2152 _ut.test('test_insert_period', () { 2230 _ut.test('test_insert_period', () {
2153 final __test = new IncrementalScannerTest(); 2231 final __test = new IncrementalScannerTest();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
2198 runJUnitTest(__test, __test.test_replace_identifier_beginning); 2276 runJUnitTest(__test, __test.test_replace_identifier_beginning);
2199 }); 2277 });
2200 _ut.test('test_replace_identifier_end', () { 2278 _ut.test('test_replace_identifier_end', () {
2201 final __test = new IncrementalScannerTest(); 2279 final __test = new IncrementalScannerTest();
2202 runJUnitTest(__test, __test.test_replace_identifier_end); 2280 runJUnitTest(__test, __test.test_replace_identifier_end);
2203 }); 2281 });
2204 _ut.test('test_replace_identifier_middle', () { 2282 _ut.test('test_replace_identifier_middle', () {
2205 final __test = new IncrementalScannerTest(); 2283 final __test = new IncrementalScannerTest();
2206 runJUnitTest(__test, __test.test_replace_identifier_middle); 2284 runJUnitTest(__test, __test.test_replace_identifier_middle);
2207 }); 2285 });
2286 _ut.test('test_replace_multiple_partialFirstAndLast', () {
2287 final __test = new IncrementalScannerTest();
2288 runJUnitTest(__test, __test.test_replace_multiple_partialFirstAndLast);
2289 });
2208 _ut.test('test_replace_operator_oneForMany', () { 2290 _ut.test('test_replace_operator_oneForMany', () {
2209 final __test = new IncrementalScannerTest(); 2291 final __test = new IncrementalScannerTest();
2210 runJUnitTest(__test, __test.test_replace_operator_oneForMany); 2292 runJUnitTest(__test, __test.test_replace_operator_oneForMany);
2211 }); 2293 });
2212 _ut.test('test_replace_operator_oneForOne', () { 2294 _ut.test('test_replace_operator_oneForOne', () {
2213 final __test = new IncrementalScannerTest(); 2295 final __test = new IncrementalScannerTest();
2214 runJUnitTest(__test, __test.test_replace_operator_oneForOne); 2296 runJUnitTest(__test, __test.test_replace_operator_oneForOne);
2215 }); 2297 });
2216 _ut.test('test_tokenMap', () { 2298 _ut.test('test_tokenMap', () {
2217 final __test = new IncrementalScannerTest(); 2299 final __test = new IncrementalScannerTest();
2218 runJUnitTest(__test, __test.test_tokenMap); 2300 runJUnitTest(__test, __test.test_tokenMap);
2219 }); 2301 });
2220 }); 2302 });
2221 } 2303 }
2222 } 2304 }
2223 2305
2224 main() { 2306 main() {
2225 CharSequenceReaderTest.dartSuite(); 2307 CharSequenceReaderTest.dartSuite();
2226 IncrementalScannerTest.dartSuite(); 2308 IncrementalScannerTest.dartSuite();
2227 KeywordStateTest.dartSuite(); 2309 KeywordStateTest.dartSuite();
2228 ScannerTest.dartSuite(); 2310 ScannerTest.dartSuite();
2229 TokenTypeTest.dartSuite(); 2311 TokenTypeTest.dartSuite();
2230 } 2312 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/resolver_test.dart ('k') | pkg/analyzer/test/generated/test_support.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698