mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
disable "call always fails according to method contract" in tests (IDEA-168613)
1. test might check precisely this failure 2. even if not, the test will fail anyway and the mistake will be obvious quite soon
This commit is contained in:
+17
@@ -76,4 +76,21 @@ class DataFlowInspectionHeavyTest extends JavaCodeInsightFixtureTestCase {
|
||||
public @interface Nullable {}
|
||||
"""
|
||||
}
|
||||
|
||||
void "test no always failing calls in tests"() {
|
||||
PsiTestUtil.addSourceRoot(myModule, myFixture.tempDirFixture.findOrCreateDir("test"), true)
|
||||
|
||||
myFixture.configureFromExistingVirtualFile(myFixture.addFileToProject("test/Foo.java", """
|
||||
class Foo {
|
||||
void foo() {
|
||||
assertTrue(false);
|
||||
}
|
||||
private void assertTrue(boolean b) {
|
||||
if (!b) throw new RuntimeException();
|
||||
}
|
||||
}
|
||||
""").virtualFile)
|
||||
myFixture.enableInspections(new DataFlowInspection())
|
||||
myFixture.checkHighlighting()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user