Skip to content

Commit

Permalink
Consistently use NixTestExecutionPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
JojOatXGME committed May 12, 2024
1 parent 4af0019 commit cfbb3a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/test/java/org/nixos/idea/lang/ParsingFailTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import com.intellij.lang.LanguageBraceMatching;
import com.intellij.testFramework.ParsingTestCase;
import com.intellij.testFramework.TestDataPath;
import com.intellij.testFramework.fixtures.IdeaTestExecutionPolicy;

import java.util.Objects;

@TestDataPath("$PROJECT_ROOT/src/test/testData/ParsingFailTest")
public final class ParsingFailTest extends ParsingTestCase {
Expand Down Expand Up @@ -99,7 +102,7 @@ protected void setUp() throws Exception {

@Override
protected String getTestDataPath() {
return "src/test/testData";
return Objects.requireNonNull(IdeaTestExecutionPolicy.current()).getHomePath();
}

@Override
Expand Down
6 changes: 4 additions & 2 deletions src/test/java/org/nixos/idea/lang/ParsingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import com.intellij.testFramework.ParsingTestCase;
import com.intellij.testFramework.TestDataPath;
import org.nixos.idea.lang.NixParserDefinition;
import com.intellij.testFramework.fixtures.IdeaTestExecutionPolicy;

import java.util.Objects;

@TestDataPath("$PROJECT_ROOT/src/test/testData/ParsingTest")
public final class ParsingTest extends ParsingTestCase {
Expand Down Expand Up @@ -156,7 +158,7 @@ protected void tearDown() throws Exception {

@Override
protected String getTestDataPath() {
return "src/test/testData";
return Objects.requireNonNull(IdeaTestExecutionPolicy.current()).getHomePath();
}

@Override
Expand Down

0 comments on commit cfbb3a6

Please sign in to comment.