1 | package jpacman; |
2 | |
3 | import org.junit.Test; |
4 | |
5 | /** |
6 | * Utility methods that help in testing. |
7 | * |
8 | * @author Arie van Deursen, TU Delft, 2006 |
9 | * @version $Id: TestUtils.java,v 1.6 2008/02/10 19:51:11 arie Exp $ |
10 | */ |
11 | |
12 | public final class TestUtils { |
13 | |
14 | /** |
15 | * Work around surefire 2.3 issue. |
16 | */ |
17 | @Test public void testDummy() { } |
18 | |
19 | /** |
20 | * A helper method that just tells us whether assertions are enabled |
21 | * or not. |
22 | * @return True iff assertions are enabled. |
23 | */ |
24 | public static boolean assertionsEnabled() { |
25 | boolean hasAssertEnabled = false; |
26 | //notice the intentional side effect! |
27 | assert hasAssertEnabled = true; |
28 | return hasAssertEnabled; |
29 | } |
30 | } |