Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: e236ea17bbc46b15256f15368ff9db10fb0b0c45 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*******************************************************************************
 * Copyright (c) 2011, 2012 Anton Gorenkov
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     Anton Gorenkov - initial API and implementation
 *******************************************************************************/
package org.eclipse.cdt.testsrunner.model;

/**
 * Describes the message that was produced during the testing process.
 *
 * @noextend This interface is not intended to be extended by clients.
 * @noimplement This interface is not intended to be implemented by clients.
 */
public interface ITestMessage {

	/**
	 * The level of the test message.
	 */
	public enum Level {
		Info(ModelMessages.MessageLevel_info), Message(ModelMessages.MessageLevel_message),
		Warning(ModelMessages.MessageLevel_warning), Error(ModelMessages.MessageLevel_error),
		FatalError(ModelMessages.MessageLevel_fatal_error), Exception(ModelMessages.MessageLevel_exception);

		String stringRepr;

		Level(String stringRepr) {
			this.stringRepr = stringRepr;
		}

		@Override
		public String toString() {
			return stringRepr;
		}
	}

	/**
	 * Returns the location of the test message.
	 *
	 * @return message location
	 */
	public ITestLocation getLocation();

	/**
	 * Returns the level of the test message.
	 *
	 * @return message level
	 */
	public Level getLevel();

	/**
	 * Returns the text of the test message.
	 *
	 * @return message text
	 */
	public String getText();

	/**
	 * Visitor pattern support for the tests hierarchy.
	 *
	 * @param visitor - any object that supports visitor interface
	 */
	public void visit(IModelVisitor visitor);

}

Back to the top