Multifile tests supported
Example of a multifile test: you create a single file under the "quick" directory and put text of all your test files into it, prepending each file with a comment as follows: // FILE: foo class foo // FILE: bar class <!FOO!>bar<!>
This commit is contained in:
@@ -116,11 +116,16 @@ public abstract class JetLiteFixture extends UsefulTestCase {
|
||||
}
|
||||
|
||||
protected void createAndCheckPsiFile(String name, String text) {
|
||||
myFile = createPsiFile(name, text);
|
||||
myFile = createCheckAndReturnPsiFile(name, text);
|
||||
}
|
||||
|
||||
protected JetFile createCheckAndReturnPsiFile(String name, String text) {
|
||||
JetFile myFile = createPsiFile(name, text);
|
||||
ensureParsed(myFile);
|
||||
assertEquals("light virtual file text mismatch", text, ((LightVirtualFile) myFile.getVirtualFile()).getContent().toString());
|
||||
assertEquals("virtual file text mismatch", text, LoadTextUtil.loadText(myFile.getVirtualFile()));
|
||||
assertEquals("doc text mismatch", text, myFile.getViewProvider().getDocument().getText());
|
||||
assertEquals("psi text mismatch", text, myFile.getText());
|
||||
return myFile;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user