@Retention(value=RUNTIME)
@Target(value={ANNOTATION_TYPE,CONSTRUCTOR,METHOD,PACKAGE,TYPE})
public @interface ReadsStdIo
System.in
or System.out
but don't call System.setIn()
or System.setOut()
.
During
parallel test execution,
all tests annotated with StdIo
, ReadsStdIo
, and WritesStdIo
are scheduled in a way that guarantees correctness under mutation of shared global state.
For more details and examples, see the documentation on Standard input/output.