File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 3232 * an exception. If it doesn't throw an exception or if it throws a different exception
3333 * than the one declared, the test fails. For example, the following test succeeds:
3434 * <pre>
35- * @Test(<b>expected=IndexOutOfBoundsException.class</b>) public void outOfBounds() {
35+ * @Test(<b>expected=IndexOutOfBoundsException.class</b>)
36+ * public void outOfBounds() {
3637 * new ArrayList<Object>().get(1);
3738 * }
3839 * </pre>
4647 * The parameter <code>timeout</code> causes a test to fail if it takes
4748 * longer than a specified amount of clock time (measured in milliseconds). The following test fails:
4849 * <pre>
49- * @Test(<b>timeout=100</b>) public void infinity() {
50+ * @Test(<b>timeout=100</b>)
51+ * public void infinity() {
5052 * while(true);
5153 * }
5254 * </pre>
5557 * following test may or may not fail depending on how the operating system
5658 * schedules threads:
5759 * <pre>
58- * @Test(<b>timeout=100</b>) public void sleep100() {
60+ * @Test(<b>timeout=100</b>)
61+ * public void sleep100() {
5962 * Thread.sleep(100);
6063 * }
6164 * </pre>
You can’t perform that action at this time.
0 commit comments