use of com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture in project intellij by bazelbuild.
the class CcTestTest method testCcTest.
@Test
public void testCcTest() throws Exception {
IntellijAspectTestFixture testFixture = loadTestFixture(":simple_fixture");
TargetIdeInfo target = findTarget(testFixture, ":simple");
assertThat(target.getKindString()).isEqualTo("cc_test");
assertThat(target.hasCIdeInfo()).isTrue();
assertThat(target.hasJavaIdeInfo()).isFalse();
assertThat(target.hasAndroidIdeInfo()).isFalse();
CIdeInfo cTargetIdeInfo = target.getCIdeInfo();
assertThat(cTargetIdeInfo.getTargetCoptList()).isEmpty();
assertThat(cTargetIdeInfo.getTargetDefineList()).isEmpty();
assertThat(cTargetIdeInfo.getTargetIncludeList()).isEmpty();
// Can't test for this because the cc code stuffs source
// artifacts into the output group
// assertThat(testFixture.getIntellijResolveFilesList()).isEmpty();
assertThat(getOutputGroupFiles(testFixture, "intellij-info-cpp")).contains(testRelative("simple.intellij-info.txt"));
assertThat(getOutputGroupFiles(testFixture, "intellij-info-generic")).isEmpty();
}
use of com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture in project intellij by bazelbuild.
the class AliasTest method testAlias.
@Test
public void testAlias() throws Exception {
IntellijAspectTestFixture testFixture = loadTestFixture(":alias_fixture");
TargetIdeInfo target = findTarget(testFixture, ":test");
assertThat(dependenciesForTarget(target)).contains(dep(":real"));
assertThat(findTarget(testFixture, ":real")).isNotNull();
}
use of com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture in project intellij by bazelbuild.
the class ArtifactTest method testSourceFilesAreCorrectlyMarkedAsSourceOrGenerated.
@Test
public void testSourceFilesAreCorrectlyMarkedAsSourceOrGenerated() throws Exception {
IntellijAspectTestFixture testFixture = loadTestFixture(":gen_sources_fixture");
TargetIdeInfo source = findTarget(testFixture, ":source");
TargetIdeInfo gen = findTarget(testFixture, ":gen");
assertThat(getOnlyElement(source.getJavaIdeInfo().getSourcesList()).getIsSource()).isTrue();
assertThat(getOnlyElement(gen.getJavaIdeInfo().getSourcesList()).getIsSource()).isFalse();
}
use of com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture in project intellij by bazelbuild.
the class BuildFileTest method testBuildFile.
@Test
public void testBuildFile() throws Exception {
IntellijAspectTestFixture testFixture = loadTestFixture(":simple_fixture");
TargetIdeInfo target = findTarget(testFixture, ":simple");
assertThat(target.getBuildFileArtifactLocation().getRelativePath()).isEqualTo(testRelative("BUILD"));
assertThat(target.getBuildFileArtifactLocation().getIsSource()).isTrue();
}
use of com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture in project intellij by bazelbuild.
the class PyTestTest method testPyTest.
@Test
public void testPyTest() throws Exception {
IntellijAspectTestFixture testFixture = loadTestFixture(":simple_fixture");
TargetIdeInfo target = findTarget(testFixture, ":simple");
assertThat(target.getKindString()).isEqualTo("py_test");
assertThat(relativePathsForArtifacts(target.getPyIdeInfo().getSourcesList())).containsExactly(testRelative("simple.py"));
assertThat(getOutputGroupFiles(testFixture, "intellij-info-py")).containsExactly(testRelative("simple.intellij-info.txt"));
assertThat(getOutputGroupFiles(testFixture, "intellij-info-generic")).isEmpty();
}
Aggregations