@Retention(value=RUNTIME)
@Target(value={ANNOTATION_TYPE,CONSTRUCTOR,METHOD,PACKAGE,TYPE})
public @interface WritesStdIo
System.setIn()
or System.setOut()
to set the static fields System.in
/System.out
.
During
parallel test execution,
all tests annotated with StdIo
, WritesStdIo
, 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.