Package com.puppycrawl.tools.checkstyle

Examples of com.puppycrawl.tools.checkstyle.Checker


    @Test
    public void testInvalidClassDefWithChecker()
        throws Exception
    {
        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
        final Checker c = createChecker(checkConfig);
        final String fname = getPath("indentation/InputInvalidClassDefIndent.java");
        final String[] expected = {
            "19: 'class def modifier' have incorrect indentation level 2, expected level should be 0.",
            "25: 'class def lcurly' have incorrect indentation level 2, expected level should be 0.",
            "28: 'class def rcurly' have incorrect indentation level 2, expected level should be 0.",
View Full Code Here


    @Test
    public void testInvalidBlockWithChecker()
        throws Exception
    {
        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
        final Checker c = createChecker(checkConfig);
        final String fname = getPath("indentation/InputInvalidBlockIndent.java");
        final String[] expected = {
            "22: 'block lcurly' have incorrect indentation level 7, expected level should be 8.",
            "23: 'block lcurly' have incorrect indentation level 9, expected level should be 8.",
            "25: 'block lcurly' have incorrect indentation level 9, expected level should be 8.",
View Full Code Here

    @Test
    public void testInvalidIfWithChecker()
        throws Exception
    {
        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
        final Checker c = createChecker(checkConfig);
        final String fname = getPath("indentation/InputInvalidIfIndent.java");
        final String[] expected = {
            "50: 'if' have incorrect indentation level 1, expected level should be 8.",
            "55: 'if' have incorrect indentation level 9, expected level should be 8.",
            "56: 'if lcurly' have incorrect indentation level 9, expected level should be 8.",
View Full Code Here

    @Test
    public void testInvalidWhileWithChecker()
        throws Exception
    {
        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
        final Checker c = createChecker(checkConfig);
        final String fname = getPath("indentation/InputInvalidWhileIndent.java");
        final String[] expected = {
            "21: 'while' have incorrect indentation level 9, expected level should be 8.",
            "22: 'while rcurly' have incorrect indentation level 7, expected level should be 8.",
            "24: 'while' have incorrect indentation level 7, expected level should be 8.",
View Full Code Here

    @Test
    public void testInvalidForWithChecker()
        throws Exception
    {
        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
        final Checker c = createChecker(checkConfig);
        final String fname = getPath("indentation/InputInvalidForIndent.java");
        final String[] expected = {
            "22: 'for' have incorrect indentation level 6, expected level should be 8.",
            "23: 'for rcurly' have incorrect indentation level 10, expected level should be 8.",
            "25: 'for' have incorrect indentation level 9, expected level should be 8.",
View Full Code Here

    @Test
    public void testValidForWithChecker()
        throws Exception
    {
        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
        final Checker c = createChecker(checkConfig);
        final String fname = getPath("indentation/InputValidForIndent.java");
        final String[] expected = {
        };
        verify(c, fname, expected);
    }
View Full Code Here

    @Test
    public void testValidDoWhileWithChecker()
        throws Exception
    {
        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
        final Checker c = createChecker(checkConfig);
        final String fname = getPath("indentation/InputValidDoWhileIndent.java");
        final String[] expected = {
        };
        verify(c, fname, expected);
    }
View Full Code Here

    @Test
    public void testValidBlockWithChecker()
        throws Exception
    {
        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
        final Checker c = createChecker(checkConfig);
        final String fname = getPath("indentation/InputValidBlockIndent.java");
        final String[] expected = {
        };
        verify(c, fname, expected);
    }
View Full Code Here

    @Test
    public void testValidWhileWithChecker()
        throws Exception
    {
        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
        final Checker c = createChecker(checkConfig);
        final String fname = getPath("indentation/InputValidWhileIndent.java");
        final String[] expected = {
        };
        verify(c, fname, expected);
    }
View Full Code Here

    @Test
    public void testValidClassDefWithChecker()
        throws Exception
    {
        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
        final Checker c = createChecker(checkConfig);
        final String fname = getPath("indentation/InputValidClassDefIndent.java");
        final String[] expected = {
            "46: 'class' have incorrect indentation level 0, expected level should be 4.",
            "68: 'int' have incorrect indentation level 8, expected level should be 12.",
        };
View Full Code Here

TOP

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

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.