Skip to content

Commit 7270bbe

Browse files
committed
allow access to testdata path for tests
1 parent 6dc535f commit 7270bbe

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/test/java/com/intellij/plugins/haxe/HaxeCodeInsightFixtureTestCase.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import com.intellij.openapi.project.Project;
2828
import com.intellij.openapi.roots.LanguageLevelProjectExtension;
2929
import com.intellij.openapi.util.RecursionManager;
30+
import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess;
3031
import com.intellij.plugins.haxe.ide.module.HaxeModuleType;
3132
import com.intellij.plugins.haxe.util.HaxeTestUtils;
3233
import com.intellij.pom.java.LanguageLevel;
@@ -88,13 +89,15 @@ protected void setUp() throws Exception {
8889
moduleFixtureBuilder.addSourceContentRoot(myHaxeToolkit);
8990
}
9091

91-
moduleFixtureBuilder.addContentRoot(getTestDataPath());
92-
9392
tuneFixture(moduleFixtureBuilder);
9493

95-
myFixture.setTestDataPath(getTestDataPath());
94+
String path = getTestDataPath();
95+
myFixture.setTestDataPath(path);
9696
myFixture.setUp();
9797

98+
// required for tests that compare results to files in testdata
99+
VfsRootAccess.allowRootAccess(getProject(), path);
100+
98101
// disable RecursionPrevention assert as type inference will cause several RecursionPrevention events.
99102
RecursionManager.disableAssertOnRecursionPrevention(myFixture.getProjectDisposable());
100103
RecursionManager.disableMissedCacheAssertions(myFixture.getProjectDisposable());

0 commit comments

Comments
 (0)