comparison truffle/com.oracle.truffle.tck/src/com/oracle/truffle/tck/TruffleVerboseTextListener.java @ 21951:9c8c0937da41

Moving all sources into truffle subdirectory
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Wed, 17 Jun 2015 10:58:08 +0200
parents graal/com.oracle.truffle.tck/src/com/oracle/truffle/tck/TruffleVerboseTextListener.java@0a6e10379b9b
children dc83cc1f94f2
comparison
equal deleted inserted replaced
21950:2a5011c7e641 21951:9c8c0937da41
1 /*
2 * Copyright (c) 2015, 2015, 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. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25 package com.oracle.truffle.tck;
26
27 import java.io.*;
28
29 import org.junit.internal.*;
30 import org.junit.runner.*;
31 import org.junit.runner.notification.*;
32
33 class TruffleVerboseTextListener extends TruffleTextListener {
34
35 public TruffleVerboseTextListener(JUnitSystem system) {
36 this(system.out());
37 }
38
39 public TruffleVerboseTextListener(PrintStream writer) {
40 super(writer);
41 }
42
43 @Override
44 public void testClassStarted(Class<?> clazz) {
45 getWriter().print(clazz.getName() + " started");
46 }
47
48 @Override
49 public void testClassFinished(Class<?> clazz) {
50 getWriter().print(clazz.getName() + " finished");
51 }
52
53 @Override
54 public void testStarted(Description description) {
55 getWriter().print(" " + description.getMethodName() + ": ");
56 }
57
58 @Override
59 public void testIgnored(Description description) {
60 getWriter().print("Ignored");
61 }
62
63 @Override
64 public void testSucceeded(Description description) {
65 getWriter().print("Passed");
66 }
67
68 @Override
69 public void testAssumptionFailure(Failure failure) {
70 getWriter().printf("(%s) ", failure.getMessage());
71 }
72
73 @Override
74 public void testFailed(Failure failure) {
75 getWriter().print("FAILED");
76 lastFailure = failure;
77 }
78
79 @Override
80 public void testClassFinishedDelimiter() {
81 getWriter().println();
82 }
83
84 @Override
85 public void testClassStartedDelimiter() {
86 getWriter().println();
87 }
88
89 @Override
90 public void testFinishedDelimiter() {
91 getWriter().println();
92 }
93
94 }