Skip to content

Commit

Permalink
Fix a couple of JCC findings arising in unknown commit.
Browse files Browse the repository at this point in the history
_static_ test fields. Phwoar. Good thing we don't parallelise tests.

PiperOrigin-RevId: 683109476
  • Loading branch information
graememorgan authored and Error Prone Team committed Oct 7, 2024
1 parent 81ae61d commit a659be5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package com.google.errorprone.bugpatterns;

import com.google.errorprone.CompilationTestHelper;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
Expand All @@ -26,13 +25,8 @@
*/
@RunWith(JUnit4.class)
public class IncrementInForLoopAndHeaderTest {
private static CompilationTestHelper compilationTestHelper;

@Before
public void setup() {
compilationTestHelper =
CompilationTestHelper.newInstance(IncrementInForLoopAndHeader.class, getClass());
}
private final CompilationTestHelper compilationTestHelper =
CompilationTestHelper.newInstance(IncrementInForLoopAndHeader.class, getClass());

@Test
public void positiveCases() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import com.google.errorprone.BugCheckerRefactoringTestHelper;
import com.google.errorprone.BugCheckerRefactoringTestHelper.TestMode;
import com.google.errorprone.CompilationTestHelper;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
Expand All @@ -29,12 +28,8 @@
@RunWith(JUnit4.class)
public class ThreadJoinLoopTest {

private static CompilationTestHelper compilationTestHelper;

@Before
public void setup() {
compilationTestHelper = CompilationTestHelper.newInstance(ThreadJoinLoop.class, getClass());
}
private final CompilationTestHelper compilationTestHelper =
CompilationTestHelper.newInstance(ThreadJoinLoop.class, getClass());

@Test
public void positiveCases() {
Expand Down

0 comments on commit a659be5

Please sign in to comment.