Issue #2161: unify test input locations
This commit is contained in:
parent
59ca05e73c
commit
82767dbe68
|
|
@ -22,6 +22,9 @@ package com.puppycrawl.tools.checkstyle.checks.blocks;
|
|||
import static com.puppycrawl.tools.checkstyle.checks.blocks.AvoidNestedBlocksCheck.MSG_KEY_BLOCK_NESTED;
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
|
||||
|
|
@ -30,6 +33,11 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes;
|
|||
|
||||
public class AvoidNestedBlocksCheckTest
|
||||
extends BaseCheckTestSupport {
|
||||
@Override
|
||||
protected String getPath(String filename) throws IOException {
|
||||
return super.getPath("checks" + File.separator
|
||||
+ "blocks" + File.separator + filename);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetRequiredTokens() {
|
||||
|
|
@ -74,5 +82,4 @@ public class AvoidNestedBlocksCheckTest
|
|||
int[] expected = {TokenTypes.SLIST };
|
||||
assertArrayEquals(expected, actual);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// Test case file for checkstyle.
|
||||
// Created: 2001
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
package com.puppycrawl.tools.checkstyle;
|
||||
package com.puppycrawl.tools.checkstyle.checks.blocks;
|
||||
|
||||
/**
|
||||
* Test case for finding nested blocks.
|
||||
Loading…
Reference in New Issue