1 package com.puppycrawl.tools.checkstyle.checks.coding; 2 3 import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; 4 import com.puppycrawl.tools.checkstyle.DefaultConfiguration; 5 6 7 public class EmptyStatementCheckTest 8 extends BaseCheckTestCase 9 { 10 public void testEmptyStatements() 11 throws Exception 12 { 13 final DefaultConfiguration checkConfig = 14 createCheckConfig(EmptyStatementCheck.class); 15 final String [] expected = { 16 "12:7: Empty statement.", 17 "17:7: Empty statement.", 18 "22:19: Empty statement.", 19 "26:10: Empty statement.", 20 "29:16: Empty statement.", 21 "33:10: Empty statement.", 22 "43:10: Empty statement.", 23 "49:13: Empty statement.", 24 "51:13: Empty statement.", 25 "54:19: Empty statement.", 26 "58:10: Empty statement.", 27 "61:9: Empty statement.", 28 "66:10: Empty statement.", 29 "72:10: Empty statement.", 30 "76:10: Empty statement.", 31 "80:10: Empty statement.", 32 }; 33 34 verify(checkConfig, getPath("InputEmptyStatement.java"), expected); 35 } 36 } 37 | Popular Tags |