Package com.puppycrawl.tools.checkstyle

Examples of com.puppycrawl.tools.checkstyle.DefaultConfiguration


public class UnusedLocalVariableCheckTest
    extends BaseCheckTestCase
{
    public void testDefault() throws Exception
    {
        final DefaultConfiguration checkConfig =
            createCheckConfig(UnusedLocalVariableCheck.class);
        final String[] expected = {
            "13:13: Unused local variable 'mUnreadPrimitive'.",
            "24:16: Unused local variable 'unreadObject'.",
            "36:15: Unused local variable 'unreadArray'.",
View Full Code Here


        verify(checkConfig, getPath("usage/InputUnusedLocal.java"), expected);
    }
   
    public void testIgnoreFormat() throws Exception
        {
            final DefaultConfiguration checkConfig =
                createCheckConfig(UnusedLocalVariableCheck.class);
            checkConfig.addAttribute("ignoreFormat", "Array$");
            final String[] expected = {
                "13:13: Unused local variable 'mUnreadPrimitive'.",
                "24:16: Unused local variable 'unreadObject'.",
                "45:13: Unused local variable 'java'.",
            };
View Full Code Here

    extends BaseCheckTestSupport
{
    @Test
    public void testUnexpectedChar() throws IOException, Exception
    {
        final DefaultConfiguration checkConfig =
            createCheckConfig(MemberNameCheck.class);
        final String[] expected = {
            "8:10: Got an exception - Unexpected character 0xa9 in identifier",
        };
        verify(checkConfig, getPath("grammars/InputGrammar.java"), expected);
View Full Code Here

{
    @Test
    public void testCanParse()
        throws Exception
    {
        final DefaultConfiguration checkConfig =
            createCheckConfig(MemberNameCheck.class);
        final String[] expected = {};
        verify(checkConfig, getPath("grammars/InputJava7MultiCatch.java"), expected);
    }
View Full Code Here

    }

    @Test
    public void testCompareExpectedTreeWithInput_1() throws Exception
    {
        DefaultConfiguration checkConfig = createCheckConfig(CompareTreesWithComments.class);
        CompareTreesWithComments.expectedTree = buildInput_1();
        final String[] expected = {};
        verify(checkConfig, getPath("comments" + File.separator
                + "InputCommentsTest_1.java"), expected);
    }
View Full Code Here

{
    @Test
    public void testCanParse()
        throws Exception
    {
        final DefaultConfiguration checkConfig =
            createCheckConfig(MemberNameCheck.class);
        final String[] expected = {};
        verify(checkConfig, getPath("grammars/LineCommentAtTheEndOfFile.java"),
            expected);
    }
View Full Code Here

    }

    @Test
    public void testCompareExpectedTreeWithInput_2() throws Exception
    {
        DefaultConfiguration checkConfig = createCheckConfig(CompareTreesWithComments.class);
        CompareTreesWithComments.expectedTree = buildInput_2();
        final String[] expected = {};
        verify(checkConfig, getPath("comments" + File.separator
                + "InputCommentsTest_2.java"), expected);
    }
View Full Code Here

{
    @Test
    public void testCanParse()
        throws Exception
    {
        final DefaultConfiguration checkConfig =
            createCheckConfig(MemberNameCheck.class);
        final String[] expected = {};
        verify(checkConfig, getPath("grammars/InputJava7TryWithResources.java"), expected);
    }
View Full Code Here

{
    @Test
    public void testCanParse()
        throws Exception
    {
        final DefaultConfiguration checkConfig =
            createCheckConfig(MemberNameCheck.class);
        final String[] expected = {};
        verify(checkConfig, getPath("grammars/InputEmbeddedNullChar.java"), expected);
    }
View Full Code Here

{
    @Test
    public void testCanParse()
        throws Exception
    {
        final DefaultConfiguration checkConfig =
            createCheckConfig(MemberNameCheck.class);
        final String[] expected = {};
        verify(checkConfig, getPath("grammars/InputVararg.java"), expected);
    }
View Full Code Here

TOP

Related Classes of com.puppycrawl.tools.checkstyle.DefaultConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.