use of org.jetbrains.jps.indices.impl.ModuleExcludeIndexImpl in project intellij-community by JetBrains.
the class ModuleExcludeIndexTest method testContentRootUnderExcluded.
public void testContentRootUnderExcluded() {
File contentRoot = new File(myRoot, "project");
File excluded = new File(contentRoot, "exc");
File unexcluded = new File(excluded, "src");
JpsModule module = addModule();
addContentRoot(module, contentRoot);
addExcludedRoot(module, excluded);
addContentRoot(module, unexcluded);
assertNotExcluded(contentRoot);
assertExcluded(excluded);
assertNotExcluded(unexcluded);
ModuleExcludeIndexImpl index = createIndex();
assertFalse(index.isExcludedFromModule(contentRoot, module));
assertTrue(index.isExcludedFromModule(excluded, module));
assertFalse(index.isExcludedFromModule(unexcluded, module));
}
use of org.jetbrains.jps.indices.impl.ModuleExcludeIndexImpl in project intellij-community by JetBrains.
the class ModuleExcludeIndexTest method testInnerModuleUnderExcludedRoot.
public void testInnerModuleUnderExcludedRoot() {
File outerRoot = new File(myRoot, "outer");
File exc = new File(outerRoot, "exc");
File innerRoot = new File(exc, "inner");
JpsModule outer = addModule("outer");
addContentRoot(outer, outerRoot);
addExcludedRoot(outer, exc);
JpsModule inner = addModule("inner");
addContentRoot(inner, innerRoot);
assertNotExcluded(outerRoot);
assertNotExcluded(innerRoot);
assertSameElements(getModuleExcludes(outer), exc, innerRoot);
assertEmpty(getModuleExcludes(inner));
ModuleExcludeIndexImpl index = createIndex();
assertTrue(index.isExcludedFromModule(innerRoot, outer));
assertFalse(index.isExcludedFromModule(innerRoot, inner));
}
Aggregations