Mercurial > hg > truffle
annotate graal/com.oracle.graal.test/src/com/oracle/graal/test/GraalJUnitRunListener.java @ 21400:33d3be2548d6
removed cache for intermediate graphs in ReplacementsImpl since graph building inlining is now used
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 15 May 2015 13:45:06 +0200 |
parents | c88ab4f1f04a |
children |
rev | line source |
---|---|
15500 | 1 /* |
2 * Copyright (c) 2014, 2014, Oracle and/or its affiliates. All rights reserved. | |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 * or visit www.oracle.com if you need additional information or have any | |
21 * questions. | |
22 */ | |
23 package com.oracle.graal.test; | |
24 | |
25 import java.io.*; | |
26 | |
27 import org.junit.internal.*; | |
28 import org.junit.runner.*; | |
29 import org.junit.runner.notification.*; | |
30 | |
31 public interface GraalJUnitRunListener { | |
32 | |
33 /** | |
34 * Called before any tests have been run. | |
35 * | |
36 * @param description describes the tests to be run | |
37 */ | |
18163
c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents:
15500
diff
changeset
|
38 void testRunStarted(Description description); |
15500 | 39 |
40 /** | |
18163
c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents:
15500
diff
changeset
|
41 * Called when all tests have finished. |
15500 | 42 * |
43 * @param result the summary of the test run, including all the tests that failed | |
44 */ | |
18163
c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents:
15500
diff
changeset
|
45 void testRunFinished(Result result); |
15500 | 46 |
47 /** | |
48 * Called when a test class is about to be started. | |
49 * | |
50 * @param clazz the test class | |
51 */ | |
52 void testClassStarted(Class<?> clazz); | |
53 | |
54 /** | |
55 * Called when all tests of a test class have finished. | |
56 * | |
57 * @param clazz the test class | |
58 */ | |
59 void testClassFinished(Class<?> clazz); | |
60 | |
61 /** | |
62 * Called when an atomic test is about to be started. This is also called for ignored tests. | |
63 * | |
64 * @param description the description of the test that is about to be run (generally a class and | |
65 * method name) | |
66 */ | |
67 void testStarted(Description description); | |
68 | |
69 /** | |
70 * Called when an atomic test has finished, whether the test succeeds, fails or is ignored. | |
71 * | |
72 * @param description the description of the test that just ran | |
73 */ | |
74 void testFinished(Description description); | |
75 | |
76 /** | |
77 * Called when an atomic test fails. | |
78 * | |
79 * @param failure describes the test that failed and the exception that was thrown | |
80 */ | |
81 void testFailed(Failure failure); | |
82 | |
83 /** | |
84 * Called when a test will not be run, generally because a test method is annotated with | |
85 * {@link org.junit.Ignore}. | |
86 * | |
87 * @param description describes the test that will not be run | |
88 */ | |
18163
c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents:
15500
diff
changeset
|
89 void testIgnored(Description description); |
15500 | 90 |
91 /** | |
92 * Called when an atomic test succeeds. | |
93 * | |
94 * @param description describes the test that will not be run | |
95 */ | |
96 void testSucceeded(Description description); | |
97 | |
98 /** | |
18163
c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents:
15500
diff
changeset
|
99 * Called when an atomic test flags that it assumes a condition that is false. |
15500 | 100 * |
101 * @param failure describes the test that failed and the {@link AssumptionViolatedException} | |
102 * that was thrown | |
103 */ | |
18163
c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents:
15500
diff
changeset
|
104 void testAssumptionFailure(Failure failure); |
15500 | 105 |
106 /** | |
107 * Called after {@link #testClassFinished(Class)}. | |
108 */ | |
18163
c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents:
15500
diff
changeset
|
109 void testClassFinishedDelimiter(); |
15500 | 110 |
111 /** | |
18163
c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents:
15500
diff
changeset
|
112 * Called after {@link #testClassStarted(Class)}. |
15500 | 113 */ |
18163
c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents:
15500
diff
changeset
|
114 void testClassStartedDelimiter(); |
15500 | 115 |
116 /** | |
18163
c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents:
15500
diff
changeset
|
117 * Called after {@link #testStarted(Description)}. |
15500 | 118 */ |
18163
c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents:
15500
diff
changeset
|
119 void testStartedDelimiter(); |
15500 | 120 |
121 /** | |
18163
c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents:
15500
diff
changeset
|
122 * Called after {@link #testFailed(Failure)}. |
15500 | 123 */ |
18163
c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents:
15500
diff
changeset
|
124 void testFinishedDelimiter(); |
15500 | 125 |
18163
c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents:
15500
diff
changeset
|
126 PrintStream getWriter(); |
15500 | 127 |
128 } |