Search in sources :

Example 1 with HighlightTestInfo

use of com.intellij.testFramework.HighlightTestInfo in project intellij-community by JetBrains.

the class DaemonAnalyzerTestCase method testFile.

@NotNull
@SuppressWarnings("TestMethodWithIncorrectSignature")
protected HighlightTestInfo testFile(@NonNls @NotNull String... filePath) {
    return new HighlightTestInfo(getTestRootDisposable(), filePath) {

        @Override
        public HighlightTestInfo doTest() {
            try {
                configureByFiles(projectRoot, filePaths);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
            ExpectedHighlightingData data = new JavaExpectedHighlightingData(myEditor.getDocument(), checkWarnings, checkWeakWarnings, checkInfos, myFile);
            if (checkSymbolNames)
                data.checkSymbolNames();
            checkHighlighting(data);
            return this;
        }
    };
}
Also used : HighlightTestInfo(com.intellij.testFramework.HighlightTestInfo) ExpectedHighlightingData(com.intellij.testFramework.ExpectedHighlightingData) IOException(java.io.IOException) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with HighlightTestInfo

use of com.intellij.testFramework.HighlightTestInfo in project intellij-community by JetBrains.

the class LightDaemonAnalyzerTestCase method doTestFile.

protected HighlightTestInfo doTestFile(@NonNls @NotNull String filePath) {
    return new HighlightTestInfo(getTestRootDisposable(), filePath) {

        @Override
        public HighlightTestInfo doTest() {
            String path = assertOneElement(filePaths);
            configureByFile(path);
            ExpectedHighlightingData data = new JavaExpectedHighlightingData(myEditor.getDocument(), checkWarnings, checkWeakWarnings, checkInfos, myFile);
            if (checkSymbolNames)
                data.checkSymbolNames();
            checkHighlighting(data, composeLocalPath(path));
            return this;
        }
    };
}
Also used : HighlightTestInfo(com.intellij.testFramework.HighlightTestInfo) ExpectedHighlightingData(com.intellij.testFramework.ExpectedHighlightingData)

Aggregations

ExpectedHighlightingData (com.intellij.testFramework.ExpectedHighlightingData)2 HighlightTestInfo (com.intellij.testFramework.HighlightTestInfo)2 IOException (java.io.IOException)1 NotNull (org.jetbrains.annotations.NotNull)1