mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Drop obsolete parser test
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
a>>2, a > > 3, a >>> 4
|
||||
------------------------------
|
||||
PsiIdentifier:a
|
||||
PsiJavaToken:GTGT
|
||||
PsiJavaToken:INTEGER_LITERAL
|
||||
PsiJavaToken:COMMA
|
||||
PsiIdentifier:a
|
||||
PsiJavaToken:GT
|
||||
PsiJavaToken:GT
|
||||
PsiJavaToken:INTEGER_LITERAL
|
||||
PsiJavaToken:COMMA
|
||||
PsiIdentifier:a
|
||||
PsiJavaToken:GTGTGT
|
||||
PsiJavaToken:INTEGER_LITERAL
|
||||
@@ -1,10 +0,0 @@
|
||||
a >>>= b ><xyz >>= 3
|
||||
------------------
|
||||
PsiIdentifier:a
|
||||
PsiJavaToken:GTGTGTEQ
|
||||
PsiIdentifier:b
|
||||
PsiJavaToken:GT
|
||||
PsiJavaToken:LT
|
||||
PsiIdentifier:xyz
|
||||
PsiJavaToken:GTGTEQ
|
||||
PsiJavaToken:INTEGER_LITERAL
|
||||
@@ -1,41 +0,0 @@
|
||||
package com.intellij.psi.impl.source.parsing;
|
||||
|
||||
import com.intellij.FileSetTestCase;
|
||||
import com.intellij.lang.ASTFactory;
|
||||
import com.intellij.lexer.FilterLexer;
|
||||
import com.intellij.lexer.JavaLexer;
|
||||
import com.intellij.lexer.Lexer;
|
||||
import com.intellij.openapi.application.ex.PathManagerEx;
|
||||
import com.intellij.pom.java.LanguageLevel;
|
||||
import com.intellij.psi.impl.source.tree.*;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import junit.framework.Test;
|
||||
|
||||
/**
|
||||
* @author dsl
|
||||
*/
|
||||
public class GTTokensTest extends FileSetTestCase {
|
||||
public GTTokensTest() {
|
||||
super(PathManagerEx.getTestDataPath(GTTokensTest.class) + "/psi/gt-tokens");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String transform(String testName, String[] data) throws Exception {
|
||||
final Lexer lexer = new FilterLexer(new JavaLexer(LanguageLevel.HIGHEST),
|
||||
new FilterLexer.SetFilter(StdTokenSets.WHITE_SPACE_OR_COMMENT_BIT_SET));
|
||||
StringBuffer result = new StringBuffer();
|
||||
lexer.start(data[0]);
|
||||
final CompositeElement parent = ASTFactory.composite(ElementType.CODE_FRAGMENT);
|
||||
while(true) {
|
||||
final IElementType tokenType = GTTokens.getTokenType(lexer);
|
||||
if (tokenType == null) break;
|
||||
TreeElement token = GTTokens.createTokenElementAndAdvance(tokenType, lexer, ((FileElement)parent).getCharTable());
|
||||
parent.rawAddChildren(token);
|
||||
result.append(token.toString());
|
||||
result.append('\n');
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
public static Test suite() throws Exception { return new GTTokensTest(); }
|
||||
}
|
||||
Reference in New Issue
Block a user