KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > checks > coding > DoubleCheckedLockingCheckTest


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  * @author lkuehne
8  */

9 public class DoubleCheckedLockingCheckTest
10     extends BaseCheckTestCase
11 {
12     public void testIt() throws Exception JavaDoc
13     {
14         final DefaultConfiguration checkConfig =
15             createCheckConfig(DoubleCheckedLockingCheck.class);
16         final String JavaDoc[] expected = {
17             "34:17: The double-checked locking idiom is broken and should be avoided.",
18         };
19         verify(checkConfig, getPath("InputDoubleCheckedLocking.java"), expected);
20
21     }
22 }
23
Popular Tags