Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/AbstractTest.java @ 8463:b2161263e9f2
Cleanup unit tests : they should not print to stdout/stderr
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Mon, 25 Mar 2013 19:22:03 +0100 |
parents | 5e3d1a68664e |
children | 07f8d136a05e |
comparison
equal
deleted
inserted
replaced
8462:149dee7367e0 | 8463:b2161263e9f2 |
---|---|
55 ByteArrayOutputStream out = new ByteArrayOutputStream(); | 55 ByteArrayOutputStream out = new ByteArrayOutputStream(); |
56 PrintStream printer = new PrintStream(useConsole ? new SplitOutputStream(out, System.err) : out); | 56 PrintStream printer = new PrintStream(useConsole ? new SplitOutputStream(out, System.err) : out); |
57 PrintStream origErr = System.err; | 57 PrintStream origErr = System.err; |
58 System.setErr(printer); | 58 System.setErr(printer); |
59 | 59 |
60 SimpleLanguage.run(in, printer, REPEATS, true); | 60 SimpleLanguage.run(in, printer, REPEATS, false); |
61 | 61 |
62 System.setErr(origErr); | 62 System.setErr(origErr); |
63 Assert.assertEquals(repeat(concat(expectedOutput), REPEATS), new String(out.toByteArray())); | 63 Assert.assertEquals(repeat(concat(expectedOutput), REPEATS), new String(out.toByteArray())); |
64 } | 64 } |
65 } | 65 } |