Examples of Checker


Examples of com.puppycrawl.tools.checkstyle.Checker

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

Examples of com.puppycrawl.tools.checkstyle.Checker

        throws Exception
    {
        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
        checkConfig.addAttribute("arrayInitIndent", Integer.valueOf(8).toString());

        final Checker c = createChecker(checkConfig);
        final String fname = getPath("indentation/InputValidArrayInitIndent.java");
        final String[] expected = {};
        verify(c, fname, expected);
    }
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.Checker

    @Test
    public void testInvalidArrayInitWithChecker()
        throws Exception
    {
        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
        final Checker c = createChecker(checkConfig);
        final String fname = getPath("indentation/InputInvalidArrayInitIndent.java");
        final String[] expected = {
            "17: 'member def type' have incorrect indentation level 2, expected level should be 4.",
            "18: 'member def type' have incorrect indentation level 6, expected level should be 4.",
            "20: 'member def type' have incorrect indentation level 2, expected level should be 4.",
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.Checker

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

Examples of com.puppycrawl.tools.checkstyle.Checker

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

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

Examples of com.puppycrawl.tools.checkstyle.Checker

    @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

Examples of com.puppycrawl.tools.checkstyle.Checker

    @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

Examples of com.puppycrawl.tools.checkstyle.Checker

    @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

Examples of com.puppycrawl.tools.checkstyle.Checker

    @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
TOP
Copyright © 2018 www.massapi.com. 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.