Issue #2161: unify test input locations

This commit is contained in:
rnveach 2015-10-10 23:11:37 -04:00 committed by Roman Ivanov
parent 59ca05e73c
commit 82767dbe68
2 changed files with 9 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -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.