File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 32
32
* an exception. If it doesn't throw an exception or if it throws a different exception
33
33
* than the one declared, the test fails. For example, the following test succeeds:
34
34
* <pre>
35
- * @Test(<b>expected=IndexOutOfBoundsException.class</b>) public void outOfBounds() {
35
+ * @Test(<b>expected=IndexOutOfBoundsException.class</b>)
36
+ * public void outOfBounds() {
36
37
* new ArrayList<Object>().get(1);
37
38
* }
38
39
* </pre>
46
47
* The parameter <code>timeout</code> causes a test to fail if it takes
47
48
* longer than a specified amount of clock time (measured in milliseconds). The following test fails:
48
49
* <pre>
49
- * @Test(<b>timeout=100</b>) public void infinity() {
50
+ * @Test(<b>timeout=100</b>)
51
+ * public void infinity() {
50
52
* while(true);
51
53
* }
52
54
* </pre>
55
57
* following test may or may not fail depending on how the operating system
56
58
* schedules threads:
57
59
* <pre>
58
- * @Test(<b>timeout=100</b>) public void sleep100() {
60
+ * @Test(<b>timeout=100</b>)
61
+ * public void sleep100() {
59
62
* Thread.sleep(100);
60
63
* }
61
64
* </pre>
You can’t perform that action at this time.
0 commit comments