1 package com.puppycrawl.tools.checkstyle.checks; 2 3 import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; 4 import com.puppycrawl.tools.checkstyle.DefaultConfiguration; 5 6 public class TodoCommentCheckTest 7 extends BaseCheckTestCase 8 { 9 public void testIt() 10 throws Exception 11 { 12 final DefaultConfiguration checkConfig = 13 createCheckConfig(TodoCommentCheck.class); 14 checkConfig.addAttribute("format", "FIXME:"); 15 final String [] expected = { 16 "161: Comment matches to-do format 'FIXME:'.", 17 "162: Comment matches to-do format 'FIXME:'.", 18 "163: Comment matches to-do format 'FIXME:'.", 19 "167: Comment matches to-do format 'FIXME:'.", 20 }; 21 verify(checkConfig, getPath("InputSimple.java"), expected); 22 } 23 } 24 | Popular Tags |