Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 11:20:42 -0500
committerJonah Graham2018-11-22 16:47:02 -0500
commit170e654b4796bad1453ae85a427b97317d67a69a (patch)
tree6ca9b8a8fedd5fd25f97eb79c408312e256ff981 /testsrunner/org.eclipse.cdt.testsrunner.tests
parent35996a5c5ca5c254959ba48241eaada6dbf8628d (diff)
downloadorg.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.gz
org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.xz
org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.zip
Bug 540373: Cleanup: Format & Remove trailing whitespace
This was done by selecting all projects in Eclipse then Source -> Clean Up... -> choosing: - Format source code - Remove trailing white spaces on all lines and completing the wizard Change-Id: I63685372c6bcc67719bcf145123bcb72e5b00394
Diffstat (limited to 'testsrunner/org.eclipse.cdt.testsrunner.tests')
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/core/TestModelManagerBaseReorderingTestCase.java29
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/core/TestModelManagerCasesReorderingTestCase.java5
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/core/TestModelManagerSuitesReorderingTestCase.java3
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/test/AutomatedIntegrationSuite.java5
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/test/TestsRunnerTestActivator.java4
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/BaseTestCase.java19
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/BoostTestCase.java91
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/GoogleTestCase.java148
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/MockTestModelUpdater.java83
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/QtTestCase.java69
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/TAPTestCase.java46
11 files changed, 251 insertions, 251 deletions
diff --git a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/core/TestModelManagerBaseReorderingTestCase.java b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/core/TestModelManagerBaseReorderingTestCase.java
index cc0da54b72..580c8819f9 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/core/TestModelManagerBaseReorderingTestCase.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/core/TestModelManagerBaseReorderingTestCase.java
@@ -22,9 +22,8 @@ import org.eclipse.cdt.testsrunner.internal.model.TestModelManager;
import org.eclipse.cdt.testsrunner.model.ITestItem;
import org.eclipse.cdt.testsrunner.model.ITestSuite;
-
/**
- * Base test case for test suites & test cases reordering in TestModelManager.
+ * Base test case for test suites & test cases reordering in TestModelManager.
*/
@SuppressWarnings("nls")
public abstract class TestModelManagerBaseReorderingTestCase extends TestCase {
@@ -32,12 +31,10 @@ public abstract class TestModelManagerBaseReorderingTestCase extends TestCase {
protected TestModelManager modelManager;
protected List<String> expectedSuitesOrder = new ArrayList<String>();
-
protected abstract ITestSuite createTestsHierarchy();
protected abstract void visitTestItem(String name);
-
-
+
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -54,25 +51,25 @@ public abstract class TestModelManagerBaseReorderingTestCase extends TestCase {
assertEquals("Unexpected child name", expectedSuitesOrder.get(i), rootTestSuiteChildren[i].getName());
}
}
-
+
private void visitTestItemWithExpectation(String name) {
visitTestItem(name);
expectedSuitesOrder.add(name);
}
-
+
public void testNoReordering() {
visitTestItemWithExpectation("item1");
visitTestItemWithExpectation("item2");
visitTestItemWithExpectation("item3");
}
-
+
public void testItemAdd() {
visitTestItemWithExpectation("item1");
visitTestItemWithExpectation("itemNew");
visitTestItemWithExpectation("item2");
visitTestItemWithExpectation("item3");
}
-
+
public void testItemAddToBeginAndEnd() {
visitTestItemWithExpectation("itemNew");
visitTestItemWithExpectation("item1");
@@ -80,34 +77,34 @@ public abstract class TestModelManagerBaseReorderingTestCase extends TestCase {
visitTestItemWithExpectation("item3");
visitTestItemWithExpectation("itemNew2");
}
-
+
public void testItemRemove() {
visitTestItemWithExpectation("item1");
visitTestItemWithExpectation("item3");
}
-
+
public void testItemRemoveFromBeginAndEnd() {
visitTestItemWithExpectation("item2");
}
-
+
public void testItemRemoveAndAdd() {
visitTestItemWithExpectation("item1");
visitTestItemWithExpectation("itemNew");
visitTestItemWithExpectation("item3");
}
-
+
public void testItemOrderChange() {
visitTestItemWithExpectation("item1");
visitTestItemWithExpectation("item3");
visitTestItemWithExpectation("item2");
}
-
+
public void testItemReverse() {
visitTestItemWithExpectation("item3");
visitTestItemWithExpectation("item2");
visitTestItemWithExpectation("item1");
}
-
+
public void testItemVisitTwice() {
visitTestItem("item1");
visitTestItemWithExpectation("item2");
@@ -115,7 +112,7 @@ public abstract class TestModelManagerBaseReorderingTestCase extends TestCase {
visitTestItem("item3");
visitTestItemWithExpectation("item3");
}
-
+
public void testItemVisitTwiceAndReorder() {
visitTestItem("item3");
visitTestItemWithExpectation("item1");
diff --git a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/core/TestModelManagerCasesReorderingTestCase.java b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/core/TestModelManagerCasesReorderingTestCase.java
index f1621112ec..a5afcb5d89 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/core/TestModelManagerCasesReorderingTestCase.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/core/TestModelManagerCasesReorderingTestCase.java
@@ -18,13 +18,12 @@ import org.eclipse.cdt.testsrunner.internal.model.TestModelManager;
import org.eclipse.cdt.testsrunner.internal.model.TestSuite;
import org.eclipse.cdt.testsrunner.model.ITestSuite;
-
/**
* Tests on the test cases reordering in TestModelManager.
*/
@SuppressWarnings("nls")
public class TestModelManagerCasesReorderingTestCase extends TestModelManagerBaseReorderingTestCase {
-
+
@Override
protected ITestSuite createTestsHierarchy() {
TestSuite rootTestSuite = new TestSuite(TestModelManager.ROOT_TEST_SUITE_NAME, null);
@@ -39,5 +38,5 @@ public class TestModelManagerCasesReorderingTestCase extends TestModelManagerBas
modelManager.enterTestCase(name);
modelManager.exitTestCase();
}
-
+
}
diff --git a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/core/TestModelManagerSuitesReorderingTestCase.java b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/core/TestModelManagerSuitesReorderingTestCase.java
index 39dce97e85..2881ace577 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/core/TestModelManagerSuitesReorderingTestCase.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/core/TestModelManagerSuitesReorderingTestCase.java
@@ -17,7 +17,6 @@ import org.eclipse.cdt.testsrunner.internal.model.TestModelManager;
import org.eclipse.cdt.testsrunner.internal.model.TestSuite;
import org.eclipse.cdt.testsrunner.model.ITestSuite;
-
/**
* Tests on the test suites reordering in TestModelManager.
*/
@@ -38,5 +37,5 @@ public class TestModelManagerSuitesReorderingTestCase extends TestModelManagerBa
modelManager.enterTestSuite(name);
modelManager.exitTestSuite();
}
-
+
}
diff --git a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/test/AutomatedIntegrationSuite.java b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/test/AutomatedIntegrationSuite.java
index 9db0beddf0..925a6c2aea 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/test/AutomatedIntegrationSuite.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/test/AutomatedIntegrationSuite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2012 Anton Gorenkov
+ * 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
@@ -23,12 +23,11 @@ import org.eclipse.cdt.testsrunner.testsrunners.BoostTestCase;
import org.eclipse.cdt.testsrunner.testsrunners.GoogleTestCase;
import org.eclipse.cdt.testsrunner.testsrunners.QtTestCase;
-
/**
* Test suite with all the tests on Tests Runner.
*/
public class AutomatedIntegrationSuite extends TestSuite {
-
+
public AutomatedIntegrationSuite() {
}
diff --git a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/test/TestsRunnerTestActivator.java b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/test/TestsRunnerTestActivator.java
index 54bceab762..98f1bdc459 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/test/TestsRunnerTestActivator.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/test/TestsRunnerTestActivator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2012 Anton Gorenkov
+ * 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
@@ -41,7 +41,7 @@ public class TestsRunnerTestActivator extends Plugin {
/**
* Returns the shared plug-in instance.
- *
+ *
* @return the plug-in instance
*/
public static TestsRunnerTestActivator getDefault() {
diff --git a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/BaseTestCase.java b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/BaseTestCase.java
index 0348708719..f09be3b7d5 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/BaseTestCase.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/BaseTestCase.java
@@ -26,7 +26,6 @@ import org.eclipse.cdt.testsrunner.model.TestingException;
import org.eclipse.cdt.testsrunner.test.TestsRunnerTestActivator;
import org.eclipse.core.runtime.Plugin;
-
/**
* Base test case for Tests Runner provider plug-ins testing.
*/
@@ -38,8 +37,7 @@ public abstract class BaseTestCase extends TestCase {
protected MockTestModelUpdater mockModelUpdater = new MockTestModelUpdater();
protected ITestsRunnerProvider testsRunner = createTestsRunner();
protected boolean expectTestingException = false;
-
-
+
protected abstract ITestsRunnerProvider createTestsRunner();
protected String getAboveComment() {
@@ -48,7 +46,8 @@ public abstract class BaseTestCase extends TestCase {
private StringBuilder[] getContents(int sections) {
try {
- return TestSourceReader.getContentsForTest(getPlugin().getBundle(), getSourcePrefix(), getClass(), getName(), sections);
+ return TestSourceReader.getContentsForTest(getPlugin().getBundle(), getSourcePrefix(), getClass(),
+ getName(), sections);
} catch (IOException e) {
fail(e.getMessage());
return null;
@@ -62,7 +61,7 @@ public abstract class BaseTestCase extends TestCase {
protected String getSourcePrefix() {
return "src";
}
-
+
protected void runTestsRunner() throws TestingException {
try {
mockModelUpdater.replay();
@@ -72,24 +71,24 @@ public abstract class BaseTestCase extends TestCase {
String exceptionMessage = null;
try {
testsRunner.run(mockModelUpdater, inStream);
-
+
} catch (TestingException e) {
testingExceptionHappen = true;
exceptionMessage = e.getMessage();
}
if (expectTestingException != testingExceptionHappen) {
if (testingExceptionHappen) {
- fail("Unexpected exception: "+exceptionMessage);
+ fail("Unexpected exception: " + exceptionMessage);
} else {
fail("TestingException is expected, but did not happen!");
}
}
-
+
} catch (UnsupportedEncodingException e) {
fail(e.getMessage());
}
}
-
+
protected void expectTestingException() {
expectTestingException = true;
}
@@ -98,5 +97,5 @@ public abstract class BaseTestCase extends TestCase {
protected void tearDown() throws Exception {
runTestsRunner();
}
-
+
}
diff --git a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/BoostTestCase.java b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/BoostTestCase.java
index d37ade04e9..7d84aabcbb 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/BoostTestCase.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/BoostTestCase.java
@@ -19,7 +19,6 @@ import org.eclipse.cdt.testsrunner.launcher.ITestsRunnerProvider;
import org.eclipse.cdt.testsrunner.model.ITestItem;
import org.eclipse.cdt.testsrunner.model.ITestMessage;
-
/**
* Tests for {@see BoostTestsRunner} class
*/
@@ -29,12 +28,11 @@ public class BoostTestCase extends BaseTestCase {
private static final String DEFAULT_LOCATION_FILE = null;
private static final int DEFAULT_LOCATION_LINE = -1;
private static final String EXCEPTION_CHECKPOINT_SUFFIX = "\nLast check point was here.";
-
+
@Override
public ITestsRunnerProvider createTestsRunner() {
return new BoostTestsRunnerProvider();
}
-
//<TestLog>
// <TestSuite name="MainTS">
@@ -43,13 +41,12 @@ public class BoostTestCase extends BaseTestCase {
//</TestLog>
public void testTheOnlyTestCase() {
mockModelUpdater.skipCalls("setTestStatus");
-
+
mockModelUpdater.enterTestSuite("MainTS");
mockModelUpdater.enterTestCase("test");
mockModelUpdater.exitTestCase();
mockModelUpdater.exitTestSuite();
}
-
//<TestLog>
// <TestSuite name="MainTS">
@@ -60,7 +57,7 @@ public class BoostTestCase extends BaseTestCase {
//</TestLog>
public void testAFewTestCases() {
mockModelUpdater.skipCalls("setTestStatus");
-
+
mockModelUpdater.enterTestSuite("MainTS");
mockModelUpdater.enterTestCase("test1");
mockModelUpdater.exitTestCase();
@@ -70,7 +67,6 @@ public class BoostTestCase extends BaseTestCase {
mockModelUpdater.exitTestCase();
mockModelUpdater.exitTestSuite();
}
-
//<TestLog>
// <TestSuite name="MainTS">
@@ -84,7 +80,6 @@ public class BoostTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
mockModelUpdater.exitTestSuite();
}
-
//<TestLog>
// <TestSuite name="MainTS">
@@ -98,7 +93,7 @@ public class BoostTestCase extends BaseTestCase {
public void testAFewTestCasesInTestSuite() {
// NOTE: This is impossible input data (at least, for current version of Boost), but we check it anyway
mockModelUpdater.skipCalls("setTestStatus");
-
+
mockModelUpdater.enterTestSuite("MainTS");
mockModelUpdater.enterTestSuite("InnerTS");
mockModelUpdater.enterTestCase("test1");
@@ -111,7 +106,6 @@ public class BoostTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
}
-
//<TestLog>
// <TestSuite name="MainTS">
// <TestSuite name="InnerTS">
@@ -128,7 +122,6 @@ public class BoostTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
mockModelUpdater.exitTestSuite();
}
-
//<TestLog>
// <TestSuite name="MainTS">
@@ -146,7 +139,7 @@ public class BoostTestCase extends BaseTestCase {
public void testSimpleTestsHierarchy() {
// NOTE: This is impossible input data (at least, for current version of Boost), but we check it anyway
mockModelUpdater.skipCalls("setTestStatus");
-
+
mockModelUpdater.enterTestSuite("MainTS");
mockModelUpdater.enterTestSuite("InnerTS");
mockModelUpdater.enterTestSuite("InnerInnerTS");
@@ -162,7 +155,6 @@ public class BoostTestCase extends BaseTestCase {
mockModelUpdater.enterTestCase("test4");
mockModelUpdater.exitTestCase();
}
-
//<TestLog>
// <TestSuite name="MainTS">
@@ -194,7 +186,7 @@ public class BoostTestCase extends BaseTestCase {
//</TestLog>
public void testDifferentTestStatuses() {
mockModelUpdater.skipCalls("addTestMessage");
-
+
mockModelUpdater.enterTestSuite("MainTS");
mockModelUpdater.enterTestCase("testPass");
mockModelUpdater.setTestStatus(ITestItem.Status.Passed);
@@ -219,7 +211,6 @@ public class BoostTestCase extends BaseTestCase {
mockModelUpdater.exitTestCase();
mockModelUpdater.exitTestSuite();
}
-
//<TestLog>
// <TestSuite name="MainTS">
@@ -231,7 +222,7 @@ public class BoostTestCase extends BaseTestCase {
//</TestLog>
public void testEmptyMessage() {
mockModelUpdater.skipCalls("setTestStatus");
-
+
mockModelUpdater.enterTestSuite("MainTS");
mockModelUpdater.enterTestCase("test");
mockModelUpdater.addTestMessage("file.cpp", 22, ITestMessage.Level.Info, "");
@@ -240,7 +231,6 @@ public class BoostTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
}
-
//<TestLog>
// <TestSuite name="MainTS">
// <TestCase name="test">
@@ -252,16 +242,16 @@ public class BoostTestCase extends BaseTestCase {
public void testSpacesInBeginAndEndOfMessage() {
// NOTE: Last checkpoint tag cannot be in the middle of exception (at least, for current version of Boost), but we check it anyway
mockModelUpdater.skipCalls("setTestStatus");
-
+
mockModelUpdater.enterTestSuite("MainTS");
mockModelUpdater.enterTestCase("test");
mockModelUpdater.addTestMessage("file", 42, ITestMessage.Level.Warning, " Custom warning ");
- mockModelUpdater.addTestMessage("file2", 47, ITestMessage.Level.Exception, " Exception message end "+EXCEPTION_CHECKPOINT_SUFFIX);
+ mockModelUpdater.addTestMessage("file2", 47, ITestMessage.Level.Exception,
+ " Exception message end " + EXCEPTION_CHECKPOINT_SUFFIX);
mockModelUpdater.exitTestCase();
mockModelUpdater.exitTestSuite();
}
-
//<TestLog>
// <TestSuite name="MainTS">
// <TestCase name="test">
@@ -272,16 +262,17 @@ public class BoostTestCase extends BaseTestCase {
//</TestLog>
public void testMessageWithoutLocation() {
mockModelUpdater.skipCalls("setTestStatus");
-
+
mockModelUpdater.enterTestSuite("MainTS");
mockModelUpdater.enterTestCase("test");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Warning, "Custom warning");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Exception, "Exceptions should be located by pass point");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Warning,
+ "Custom warning");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Exception,
+ "Exceptions should be located by pass point");
mockModelUpdater.exitTestCase();
mockModelUpdater.exitTestSuite();
}
-
//<TestLog>
// <TestSuite name="MainTS">
// <TestCase name="test">
@@ -297,21 +288,23 @@ public class BoostTestCase extends BaseTestCase {
public void testMessageWithLocation() {
// NOTE: This is impossible input data (at least, for current version of Boost), but we check it anyway
mockModelUpdater.skipCalls("setTestStatus");
-
+
mockModelUpdater.enterTestSuite("MainTS");
mockModelUpdater.enterTestCase("test");
- mockModelUpdater.addTestMessage("file.cpp", DEFAULT_LOCATION_LINE, ITestMessage.Level.Warning, "No line number");
+ mockModelUpdater.addTestMessage("file.cpp", DEFAULT_LOCATION_LINE, ITestMessage.Level.Warning,
+ "No line number");
mockModelUpdater.addTestMessage("", 1, ITestMessage.Level.Warning, "Empty file name");
mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, 2, ITestMessage.Level.Warning, "No file name");
- // NOTE: Last check point is not available, so EXCEPTION_CHECKPOINT_SUFFIX should not be added
- mockModelUpdater.addTestMessage("file2.cpp", DEFAULT_LOCATION_LINE, ITestMessage.Level.Exception, "Exception without line number");
+ // NOTE: Last check point is not available, so EXCEPTION_CHECKPOINT_SUFFIX should not be added
+ mockModelUpdater.addTestMessage("file2.cpp", DEFAULT_LOCATION_LINE, ITestMessage.Level.Exception,
+ "Exception without line number");
mockModelUpdater.addTestMessage("", 3, ITestMessage.Level.Exception, "Exception with empty file name");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, 4, ITestMessage.Level.Exception, "Exception without file name");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, 4, ITestMessage.Level.Exception,
+ "Exception without file name");
mockModelUpdater.exitTestCase();
mockModelUpdater.exitTestSuite();
}
-
//<TestLog>
// <TestSuite name="MainTS">
// <TestCase name="test1">
@@ -335,28 +328,33 @@ public class BoostTestCase extends BaseTestCase {
public void testMessagesWithAndWithoutLocation() {
// NOTE: This is impossible input data (at least, for current version of Boost), but we check it anyway
mockModelUpdater.skipCalls("setTestStatus");
-
+
mockModelUpdater.enterTestSuite("MainTS");
mockModelUpdater.enterTestCase("test1");
mockModelUpdater.addTestMessage("file1.cpp", 1, ITestMessage.Level.Error, "Message with location");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Error, "Message without location");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Error,
+ "Message without location");
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("test2");
- mockModelUpdater.addTestMessage("file2.cpp", 2, ITestMessage.Level.Exception, "Exception with location"+EXCEPTION_CHECKPOINT_SUFFIX);
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Exception, "Exception without location");
+ mockModelUpdater.addTestMessage("file2.cpp", 2, ITestMessage.Level.Exception,
+ "Exception with location" + EXCEPTION_CHECKPOINT_SUFFIX);
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Exception,
+ "Exception without location");
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("test3");
mockModelUpdater.addTestMessage("file3.cpp", 3, ITestMessage.Level.Error, "Another message with location");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Exception, "Another exception without location");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Exception,
+ "Another exception without location");
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("test4");
- mockModelUpdater.addTestMessage("file4.cpp", 4, ITestMessage.Level.Exception, "Another exception with location"+EXCEPTION_CHECKPOINT_SUFFIX);
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Error, "Another message without location");
+ mockModelUpdater.addTestMessage("file4.cpp", 4, ITestMessage.Level.Exception,
+ "Another exception with location" + EXCEPTION_CHECKPOINT_SUFFIX);
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Error,
+ "Another message without location");
mockModelUpdater.exitTestCase();
mockModelUpdater.exitTestSuite();
}
-
//<TestLog>
// <TestSuite name="MainTS">
// <TestCase name="testPass">
@@ -384,7 +382,7 @@ public class BoostTestCase extends BaseTestCase {
//</TestLog>
public void testExecutionTimePresence() {
mockModelUpdater.skipCalls("setTestStatus");
-
+
mockModelUpdater.enterTestSuite("MainTS");
mockModelUpdater.enterTestCase("testPass");
mockModelUpdater.addTestMessage("file.cpp", 22, ITestMessage.Level.Info, "check 1 passed");
@@ -395,29 +393,30 @@ public class BoostTestCase extends BaseTestCase {
mockModelUpdater.setTestingTime(2);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("testAbortedOnException");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Exception, "exception message");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Exception,
+ "exception message");
mockModelUpdater.setTestingTime(3);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("testAbortedOnNullDereference");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Exception, "another exception message");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Exception,
+ "another exception message");
mockModelUpdater.addTestMessage("file3.h", 164, ITestMessage.Level.Message, "Test is aborted");
mockModelUpdater.setTestingTime(4);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("testAbortedOnExceptionWithLocation");
- mockModelUpdater.addTestMessage("file4.cpp", 47, ITestMessage.Level.Exception, "yet another exception message"+EXCEPTION_CHECKPOINT_SUFFIX);
+ mockModelUpdater.addTestMessage("file4.cpp", 47, ITestMessage.Level.Exception,
+ "yet another exception message" + EXCEPTION_CHECKPOINT_SUFFIX);
mockModelUpdater.setTestingTime(5);
mockModelUpdater.exitTestCase();
mockModelUpdater.exitTestSuite();
}
-
//
public void testNoInput() {
// NOTE: The comment above is left blank intentionally
expectTestingException();
}
-
//<TestLog>
// <TestSuite name="MainTS">
// <TestCase name="testPass">
@@ -430,7 +429,6 @@ public class BoostTestCase extends BaseTestCase {
expectTestingException();
}
-
//<TestLog>
// <TestSuite name="MainTS">
// <TestCase name="testPass">
@@ -440,7 +438,6 @@ public class BoostTestCase extends BaseTestCase {
expectTestingException();
}
-
//<TestLog>
// <TestSuite name="MainTS">
// <UnexpectedXmlElement name="testPass">
@@ -454,7 +451,6 @@ public class BoostTestCase extends BaseTestCase {
expectTestingException();
}
-
//<TestLog>
// <TestSuite name="MainTS">
// <TestCase name="testPass">
@@ -468,7 +464,6 @@ public class BoostTestCase extends BaseTestCase {
expectTestingException();
}
-
//<TestLog>
// <TestSuite name="MainTS">
// <TestCase name="testPass">
diff --git a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/GoogleTestCase.java b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/GoogleTestCase.java
index ffd74526cc..1607a9bfb5 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/GoogleTestCase.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/GoogleTestCase.java
@@ -18,7 +18,6 @@ import org.eclipse.cdt.testsrunner.launcher.ITestsRunnerProvider;
import org.eclipse.cdt.testsrunner.model.ITestItem;
import org.eclipse.cdt.testsrunner.model.ITestMessage;
-
/**
* Tests for {@see GoogleTestsRunner} class
*/
@@ -39,8 +38,7 @@ public class GoogleTestCase extends BaseTestCase {
//[ PASSED ] 0 tests.
public void testNoTestCases() {
}
-
-
+
//Running main() from gtest_main.cc
//[==========] Running 1 test from 1 test case.
//[----------] Global test environment set-up.
@@ -55,14 +53,13 @@ public class GoogleTestCase extends BaseTestCase {
public void testTheOnlyTestCase() {
mockModelUpdater.skipCalls("setTestStatus");
mockModelUpdater.skipCalls("setTestingTime");
-
+
mockModelUpdater.enterTestSuite("DemoTestCase");
mockModelUpdater.enterTestCase("DemoTest");
mockModelUpdater.exitTestCase();
mockModelUpdater.exitTestSuite();
}
-
//Running main() from gtest_main.cc
//[==========] Running 3 tests from 1 test case.
//[----------] Global test environment set-up.
@@ -81,7 +78,7 @@ public class GoogleTestCase extends BaseTestCase {
public void testAFewTestCasesInTheOnlyTestSuites() {
mockModelUpdater.skipCalls("setTestStatus");
mockModelUpdater.skipCalls("setTestingTime");
-
+
mockModelUpdater.enterTestSuite("DemoTestCase");
mockModelUpdater.enterTestCase("DemoTest1");
mockModelUpdater.exitTestCase();
@@ -91,8 +88,7 @@ public class GoogleTestCase extends BaseTestCase {
mockModelUpdater.exitTestCase();
mockModelUpdater.exitTestSuite();
}
-
-
+
//Running main() from gtest_main.cc
//[==========] Running 2 tests from 2 test cases.
//[----------] Global test environment set-up.
@@ -112,7 +108,7 @@ public class GoogleTestCase extends BaseTestCase {
public void testTheOnlyTestCasesInAFewTestSuites() {
mockModelUpdater.skipCalls("setTestStatus");
mockModelUpdater.skipCalls("setTestingTime");
-
+
mockModelUpdater.enterTestSuite("DemoTestCase");
mockModelUpdater.enterTestCase("DemoTest");
mockModelUpdater.exitTestCase();
@@ -123,7 +119,6 @@ public class GoogleTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
}
-
//Running main() from gtest_main.cc
//[==========] Running 4 tests from 2 test cases.
//[----------] Global test environment set-up.
@@ -147,7 +142,7 @@ public class GoogleTestCase extends BaseTestCase {
public void testAFewTestCasesWithTheSameNameInDifferentTestSuites() {
mockModelUpdater.skipCalls("setTestStatus");
mockModelUpdater.skipCalls("setTestingTime");
-
+
mockModelUpdater.enterTestSuite("DemoTestCase1");
mockModelUpdater.enterTestCase("DemoTest1");
mockModelUpdater.exitTestCase();
@@ -162,7 +157,6 @@ public class GoogleTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
}
-
//Running main() from gtest_main.cc
//[==========] Running 4 tests from 1 test case.
//[----------] Global test environment set-up.
@@ -208,28 +202,33 @@ public class GoogleTestCase extends BaseTestCase {
mockModelUpdater.skipCalls("enterTestSuite");
mockModelUpdater.skipCalls("exitTestSuite");
mockModelUpdater.skipCalls("setTestingTime");
-
+
mockModelUpdater.enterTestCase("TestPass");
mockModelUpdater.setTestStatus(ITestItem.Status.Passed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("TestFail");
- mockModelUpdater.addTestMessage("demo_file.cc", 38, ITestMessage.Level.Error, "Value of: 2"+EOL+"Expected: 1");
+ mockModelUpdater.addTestMessage("demo_file.cc", 38, ITestMessage.Level.Error,
+ "Value of: 2" + EOL + "Expected: 1");
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("TestAFewFails");
- mockModelUpdater.addTestMessage("demo_file.cc", 42, ITestMessage.Level.Error, "Value of: 2"+EOL+"Expected: 1");
- mockModelUpdater.addTestMessage("demo_file.cc", 43, ITestMessage.Level.Error, "Value of: 2"+EOL+"Expected: 1");
+ mockModelUpdater.addTestMessage("demo_file.cc", 42, ITestMessage.Level.Error,
+ "Value of: 2" + EOL + "Expected: 1");
+ mockModelUpdater.addTestMessage("demo_file.cc", 43, ITestMessage.Level.Error,
+ "Value of: 2" + EOL + "Expected: 1");
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("TestCustomFails");
- mockModelUpdater.addTestMessage("demo_file.cc", 47, ITestMessage.Level.Error, "Failed"+EOL+"Custom fatal fail!");
- mockModelUpdater.addTestMessage("demo_file.cc", 48, ITestMessage.Level.Error, "Failed"+EOL+"Another custom fatal fail!");
- mockModelUpdater.addTestMessage("demo_file.cc", 49, ITestMessage.Level.Error, "Failed"+EOL+"Yet another custom fatal fail!");
+ mockModelUpdater.addTestMessage("demo_file.cc", 47, ITestMessage.Level.Error,
+ "Failed" + EOL + "Custom fatal fail!");
+ mockModelUpdater.addTestMessage("demo_file.cc", 48, ITestMessage.Level.Error,
+ "Failed" + EOL + "Another custom fatal fail!");
+ mockModelUpdater.addTestMessage("demo_file.cc", 49, ITestMessage.Level.Error,
+ "Failed" + EOL + "Yet another custom fatal fail!");
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
}
-
//Running main() from gtest_main.cc
//[==========] Running 2 tests from 1 test case.
//[----------] Global test environment set-up.
@@ -272,20 +271,27 @@ public class GoogleTestCase extends BaseTestCase {
mockModelUpdater.skipCalls("setTestStatus");
mockModelUpdater.enterTestCase("TestWithSimpleTrace");
- mockModelUpdater.addTestMessage("demo_file.cc", 36, ITestMessage.Level.Error, "Value of: 2"+EOL+"Expected: 1");
- mockModelUpdater.addTestMessage("demo_file.cc", 41, ITestMessage.Level.Info, "Trace point #2 in TestWithSimpleTrace");
- mockModelUpdater.addTestMessage("demo_file.cc", 40, ITestMessage.Level.Info, "Trace point #1 in TestWithSimpleTrace");
+ mockModelUpdater.addTestMessage("demo_file.cc", 36, ITestMessage.Level.Error,
+ "Value of: 2" + EOL + "Expected: 1");
+ mockModelUpdater.addTestMessage("demo_file.cc", 41, ITestMessage.Level.Info,
+ "Trace point #2 in TestWithSimpleTrace");
+ mockModelUpdater.addTestMessage("demo_file.cc", 40, ITestMessage.Level.Info,
+ "Trace point #1 in TestWithSimpleTrace");
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("TestTraceForMultipleFails");
- mockModelUpdater.addTestMessage("demo_file.cc", 36, ITestMessage.Level.Error, "Value of: 2"+EOL+"Expected: 1");
- mockModelUpdater.addTestMessage("demo_file.cc", 46, ITestMessage.Level.Info, "Trace point #1 in TestTraceForMultipleFails");
- mockModelUpdater.addTestMessage("demo_file.cc", 36, ITestMessage.Level.Error, "Value of: 2"+EOL+"Expected: 1");
- mockModelUpdater.addTestMessage("demo_file.cc", 48, ITestMessage.Level.Info, "Trace point #2 in TestTraceForMultipleFails");
- mockModelUpdater.addTestMessage("demo_file.cc", 46, ITestMessage.Level.Info, "Trace point #1 in TestTraceForMultipleFails");
+ mockModelUpdater.addTestMessage("demo_file.cc", 36, ITestMessage.Level.Error,
+ "Value of: 2" + EOL + "Expected: 1");
+ mockModelUpdater.addTestMessage("demo_file.cc", 46, ITestMessage.Level.Info,
+ "Trace point #1 in TestTraceForMultipleFails");
+ mockModelUpdater.addTestMessage("demo_file.cc", 36, ITestMessage.Level.Error,
+ "Value of: 2" + EOL + "Expected: 1");
+ mockModelUpdater.addTestMessage("demo_file.cc", 48, ITestMessage.Level.Info,
+ "Trace point #2 in TestTraceForMultipleFails");
+ mockModelUpdater.addTestMessage("demo_file.cc", 46, ITestMessage.Level.Info,
+ "Trace point #1 in TestTraceForMultipleFails");
mockModelUpdater.exitTestCase();
}
-
//Running main() from gtest_main.cc
//[==========] Running 1 test from 1 test case.
//[----------] Global test environment set-up.
@@ -321,15 +327,20 @@ public class GoogleTestCase extends BaseTestCase {
mockModelUpdater.skipCalls("setTestingTime");
mockModelUpdater.skipCalls("setTestStatus");
- mockModelUpdater.addTestMessage("demo_file_name2.cpp", 40, ITestMessage.Level.Error, "Standard format with file name & line number");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, 41, ITestMessage.Level.Error, "Standard format with unknown file name");
- mockModelUpdater.addTestMessage("demo_file_name2.cpp", 42, ITestMessage.Level.Error, "VS-like format with file name & line number");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, 43, ITestMessage.Level.Error, "VS-like format with unknown file name");
- mockModelUpdater.addTestMessage("demo_file_name2.cpp", DEFAULT_LOCATION_LINE, ITestMessage.Level.Error, "Location with unknown line number");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Error, "Location with unknown file name & line number");
+ mockModelUpdater.addTestMessage("demo_file_name2.cpp", 40, ITestMessage.Level.Error,
+ "Standard format with file name & line number");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, 41, ITestMessage.Level.Error,
+ "Standard format with unknown file name");
+ mockModelUpdater.addTestMessage("demo_file_name2.cpp", 42, ITestMessage.Level.Error,
+ "VS-like format with file name & line number");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, 43, ITestMessage.Level.Error,
+ "VS-like format with unknown file name");
+ mockModelUpdater.addTestMessage("demo_file_name2.cpp", DEFAULT_LOCATION_LINE, ITestMessage.Level.Error,
+ "Location with unknown line number");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Error,
+ "Location with unknown file name & line number");
}
-
//Running main() from gtest_main.cc
//[==========] Running 1 test from 1 test case.
//[----------] Global test environment set-up.
@@ -359,15 +370,20 @@ public class GoogleTestCase extends BaseTestCase {
mockModelUpdater.skipCalls("setTestingTime");
mockModelUpdater.skipCalls("setTestStatus");
- mockModelUpdater.addTestMessage("demo_file_name2.cpp", 40, ITestMessage.Level.Error, "Standard format with file name & line number");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, 41, ITestMessage.Level.Error, "Standard format with unknown file name");
- mockModelUpdater.addTestMessage("demo_file_name2.cpp", 42, ITestMessage.Level.Error, "VS-like format with file name & line number");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, 43, ITestMessage.Level.Error, "VS-like format with unknown file name");
- mockModelUpdater.addTestMessage("demo_file_name2.cpp", DEFAULT_LOCATION_LINE, ITestMessage.Level.Error, "Location with unknown line number");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Error, "Location with unknown file name & line number");
+ mockModelUpdater.addTestMessage("demo_file_name2.cpp", 40, ITestMessage.Level.Error,
+ "Standard format with file name & line number");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, 41, ITestMessage.Level.Error,
+ "Standard format with unknown file name");
+ mockModelUpdater.addTestMessage("demo_file_name2.cpp", 42, ITestMessage.Level.Error,
+ "VS-like format with file name & line number");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, 43, ITestMessage.Level.Error,
+ "VS-like format with unknown file name");
+ mockModelUpdater.addTestMessage("demo_file_name2.cpp", DEFAULT_LOCATION_LINE, ITestMessage.Level.Error,
+ "Location with unknown line number");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Error,
+ "Location with unknown file name & line number");
}
-
//Running main() from gtest_main.cc
//[==========] Running 1 test from 1 test case.
//[----------] Global test environment set-up.
@@ -394,11 +410,11 @@ public class GoogleTestCase extends BaseTestCase {
mockModelUpdater.skipCalls("setTestStatus");
mockModelUpdater.enterTestCase("TestMultiLineMessage");
- mockModelUpdater.addTestMessage("demo_file.cc", 40, ITestMessage.Level.Error, "Line 1"+EOL+"Line 2"+EOL+"Line 3");
+ mockModelUpdater.addTestMessage("demo_file.cc", 40, ITestMessage.Level.Error,
+ "Line 1" + EOL + "Line 2" + EOL + "Line 3");
mockModelUpdater.exitTestCase();
}
-
-
+
//Running main() from gtest_main.cc
//[==========] Running 2 tests from 2 test cases.
//[----------] Global test environment set-up.
@@ -435,7 +451,6 @@ public class GoogleTestCase extends BaseTestCase {
mockModelUpdater.exitTestCase();
}
-
//Running main() from gtest_main.cc
//[==========] Running 3 tests from 1 test case.
//[----------] Global test environment set-up.
@@ -465,8 +480,9 @@ public class GoogleTestCase extends BaseTestCase {
public void testParametrizedTestsSupport() {
mockModelUpdater.enterTestSuite("Inst/DemoTestCase");
mockModelUpdater.enterTestCase("Test/0");
- mockModelUpdater.addTestMessage("demo_file.cc", 50, ITestMessage.Level.Error, "Failed"+EOL+"Param1");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Info, "Instantiated with GetParam() = \"Param1\"");
+ mockModelUpdater.addTestMessage("demo_file.cc", 50, ITestMessage.Level.Error, "Failed" + EOL + "Param1");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Info,
+ "Instantiated with GetParam() = \"Param1\"");
mockModelUpdater.setTestingTime(0);
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
@@ -475,15 +491,15 @@ public class GoogleTestCase extends BaseTestCase {
mockModelUpdater.setTestStatus(ITestItem.Status.Passed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("Test/2");
- mockModelUpdater.addTestMessage("demo_file.cc", 50, ITestMessage.Level.Error, "Failed"+EOL+"Param3");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Info, "Instantiated with GetParam() = \"Param3\"");
+ mockModelUpdater.addTestMessage("demo_file.cc", 50, ITestMessage.Level.Error, "Failed" + EOL + "Param3");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Info,
+ "Instantiated with GetParam() = \"Param3\"");
mockModelUpdater.setTestingTime(0);
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
mockModelUpdater.exitTestSuite();
}
-
//Running main() from gtest_main.cc
//[==========] Running 1 test from 1 test case.
//[----------] Global test environment set-up.
@@ -505,14 +521,14 @@ public class GoogleTestCase extends BaseTestCase {
mockModelUpdater.enterTestSuite("Inst/DemoTestCase");
mockModelUpdater.enterTestCase("Test/0");
mockModelUpdater.addTestMessage("demo_file.cc", 50, ITestMessage.Level.Error, "Failed");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Info, "Instantiated with GetParam() = 0x4f50cc");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Info,
+ "Instantiated with GetParam() = 0x4f50cc");
mockModelUpdater.setTestingTime(0);
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
mockModelUpdater.exitTestSuite();
}
-
//Running main() from gtest_main.cc
//[==========] Running 3 tests from 3 test cases.
//[----------] Global test environment set-up.
@@ -548,7 +564,7 @@ public class GoogleTestCase extends BaseTestCase {
public void testTypedTestsSupport() {
mockModelUpdater.enterTestSuite("DemoTestCase/0(char)");
mockModelUpdater.enterTestCase("Test");
- mockModelUpdater.addTestMessage("demo_file.cc", 60, ITestMessage.Level.Error, "Failed"+EOL+"char type");
+ mockModelUpdater.addTestMessage("demo_file.cc", 60, ITestMessage.Level.Error, "Failed" + EOL + "char type");
mockModelUpdater.setTestingTime(0);
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
@@ -561,14 +577,14 @@ public class GoogleTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
mockModelUpdater.enterTestSuite("DemoTestCase/2(unsigned int)");
mockModelUpdater.enterTestCase("Test");
- mockModelUpdater.addTestMessage("demo_file.cc", 60, ITestMessage.Level.Error, "Failed"+EOL+"unsigned int type");
+ mockModelUpdater.addTestMessage("demo_file.cc", 60, ITestMessage.Level.Error,
+ "Failed" + EOL + "unsigned int type");
mockModelUpdater.setTestingTime(0);
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
mockModelUpdater.exitTestSuite();
}
-
//Running main() from gtest_main.cc
//Unknown line in the output
//[==========] Running 1 test from 1 test case.
@@ -594,20 +610,17 @@ public class GoogleTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
}
-
//
public void testNoInput() {
// NOTE: The comment above is left blank intentionally
expectTestingException();
}
-
// This is not an input from a Google Test Module
public void testAbsolutelyIncorrectInput() {
expectTestingException();
}
-
//Running main() from gtest_main.cc
//[==========] Running 1 test from 1 test case.
//[----------] Global test environment set-up.
@@ -616,11 +629,10 @@ public class GoogleTestCase extends BaseTestCase {
public void testUnexpectedOutputEnd() {
mockModelUpdater.skipCalls("enterTestSuite");
mockModelUpdater.skipCalls("enterTestCase");
-
+
expectTestingException();
}
-
//Running main() from gtest_main.cc
//[==========] Running 1 test from 1 test case.
//[----------] Global test environment set-up.
@@ -634,11 +646,10 @@ public class GoogleTestCase extends BaseTestCase {
//[ PASSED ] 1 test.
public void testTestSuiteNameMismatch1() {
mockModelUpdater.skipCalls("enterTestSuite");
-
+
expectTestingException();
}
-
//Running main() from gtest_main.cc
//[==========] Running 1 test from 1 test case.
//[----------] Global test environment set-up.
@@ -653,11 +664,10 @@ public class GoogleTestCase extends BaseTestCase {
public void testTestSuiteNameMismatch2() {
mockModelUpdater.skipCalls("enterTestSuite");
mockModelUpdater.skipCalls("enterTestCase");
-
+
expectTestingException();
}
-
//Running main() from gtest_main.cc
//[==========] Running 1 test from 1 test case.
//[----------] Global test environment set-up.
@@ -675,11 +685,10 @@ public class GoogleTestCase extends BaseTestCase {
mockModelUpdater.skipCalls("setTestingTime");
mockModelUpdater.skipCalls("setTestStatus");
mockModelUpdater.skipCalls("exitTestCase");
-
+
expectTestingException();
}
-
//Running main() from gtest_main.cc
//[==========] Running 1 test from 1 test case.
//[----------] Global test environment set-up.
@@ -694,11 +703,10 @@ public class GoogleTestCase extends BaseTestCase {
public void testTestCaseNameMismatch() {
mockModelUpdater.skipCalls("enterTestSuite");
mockModelUpdater.skipCalls("enterTestCase");
-
+
expectTestingException();
}
-
//Running main() from gtest_main.cc
//[==========] Running 1 test from 1 test case.
//[----------] Global test environment set-up.
diff --git a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/MockTestModelUpdater.java b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/MockTestModelUpdater.java
index c921a8ca0e..0507f8fc1e 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/MockTestModelUpdater.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/MockTestModelUpdater.java
@@ -37,11 +37,11 @@ public class MockTestModelUpdater implements ITestModelUpdater {
private class FakeTestItem implements ITestItem {
private String name = null;
-
+
protected void unexpectedMethodCall() {
Assert.fail("Unexpected method call");
}
-
+
@Override
public String getName() {
return name;
@@ -50,45 +50,69 @@ public class MockTestModelUpdater implements ITestModelUpdater {
public void setName(String name) {
this.name = name;
}
-
+
public void resetName() {
name = null;
}
-
+
// Unimplemented methods
@Override
- public Status getStatus() { unexpectedMethodCall(); return null; }
+ public Status getStatus() {
+ unexpectedMethodCall();
+ return null;
+ }
+
@Override
- public int getTestingTime() { unexpectedMethodCall(); return 0; }
+ public int getTestingTime() {
+ unexpectedMethodCall();
+ return 0;
+ }
+
@Override
- public ITestSuite getParent() { unexpectedMethodCall(); return null; }
+ public ITestSuite getParent() {
+ unexpectedMethodCall();
+ return null;
+ }
+
@Override
- public boolean hasChildren() { unexpectedMethodCall(); return false; }
+ public boolean hasChildren() {
+ unexpectedMethodCall();
+ return false;
+ }
+
@Override
- public ITestItem[] getChildren() { unexpectedMethodCall(); return null; }
+ public ITestItem[] getChildren() {
+ unexpectedMethodCall();
+ return null;
+ }
+
@Override
- public void visit(IModelVisitor visitor) { unexpectedMethodCall(); }
+ public void visit(IModelVisitor visitor) {
+ unexpectedMethodCall();
+ }
}
-
+
private class FakeTestCase extends FakeTestItem implements ITestCase {
@Override
- public ITestMessage[] getTestMessages() { unexpectedMethodCall(); return null; }
+ public ITestMessage[] getTestMessages() {
+ unexpectedMethodCall();
+ return null;
+ }
}
-
+
private class FakeTestSuite extends FakeTestItem implements ITestSuite {
}
-
-
+
private class MethodInfo {
-
+
private String methodName;
private Object[] args;
-
+
MethodInfo(String methodName, Object[] args) {
this.methodName = methodName;
this.args = args;
}
-
+
private String genArgs(String methodName, Object[] args) {
StringBuilder sb = new StringBuilder();
sb.append(methodName);
@@ -114,8 +138,8 @@ public class MockTestModelUpdater implements ITestModelUpdater {
public void check(String methodName, Object[] args) {
if (!this.methodName.equals(methodName)) {
- Assert.failNotEquals("Unexpected method call. ",
- genArgs(this.methodName, this.args), genArgs(methodName, args));
+ Assert.failNotEquals("Unexpected method call. ", genArgs(this.methodName, this.args),
+ genArgs(methodName, args));
}
boolean compareFailed = (this.args.length != args.length);
if (!compareFailed) {
@@ -132,13 +156,12 @@ public class MockTestModelUpdater implements ITestModelUpdater {
}
}
if (compareFailed) {
- Assert.failNotEquals("Unexpected parameters of method "+this.methodName+"(). ",
+ Assert.failNotEquals("Unexpected parameters of method " + this.methodName + "(). ",
genArgs(this.methodName, this.args), genArgs(methodName, args));
}
}
}
-
-
+
private LinkedList<MethodInfo> methodCalls = new LinkedList<MethodInfo>();
private boolean replayMode = false;
private Set<String> skippedMethods = new HashSet<String>();
@@ -146,8 +169,7 @@ public class MockTestModelUpdater implements ITestModelUpdater {
// NOTE: Test suites nesting is not supported yet cause there is no need in it
private FakeTestSuite currentTestSuite = new FakeTestSuite();
private FakeTestCase currentTestCase = new FakeTestCase();
-
-
+
@Override
public void enterTestSuite(String name) {
genericImpl("enterTestSuite", name);
@@ -167,7 +189,6 @@ public class MockTestModelUpdater implements ITestModelUpdater {
currentTestCase.setName(name);
}
-
@Override
public void setTestStatus(Status status) {
genericImpl("setTestStatus", status);
@@ -188,7 +209,7 @@ public class MockTestModelUpdater implements ITestModelUpdater {
public void addTestMessage(String file, int line, Level level, String text) {
genericImpl("addTestMessage", file, line, level, text);
}
-
+
@Override
public ITestSuite currentTestSuite() {
return currentTestSuite;
@@ -198,20 +219,20 @@ public class MockTestModelUpdater implements ITestModelUpdater {
public ITestCase currentTestCase() {
return currentTestCase;
}
-
+
public void skipCalls(String methodName) {
skippedMethods.add(methodName);
}
-
+
public void replay() {
replayMode = true;
}
-
+
private void genericImpl(String methodName, Object... args) {
if (!skippedMethods.contains(methodName)) {
if (replayMode) {
if (methodCalls.isEmpty()) {
- Assert.fail("Unexpected method call "+methodName+"()");
+ Assert.fail("Unexpected method call " + methodName + "()");
} else {
methodCalls.pollFirst().check(methodName, args);
}
diff --git a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/QtTestCase.java b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/QtTestCase.java
index e055551295..167507d409 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/QtTestCase.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/QtTestCase.java
@@ -20,7 +20,6 @@ import org.eclipse.cdt.testsrunner.launcher.ITestsRunnerProvider;
import org.eclipse.cdt.testsrunner.model.ITestItem;
import org.eclipse.cdt.testsrunner.model.ITestMessage;
-
/**
* Test for {@see QtTestsRunner} class
*/
@@ -29,20 +28,17 @@ public class QtTestCase extends BaseTestCase {
private static final String DEFAULT_LOCATION_FILE = "";
private static final int DEFAULT_LOCATION_LINE = 0;
-
+
@Override
protected ITestsRunnerProvider createTestsRunner() {
return new QtTestsRunnerProvider();
}
-
private void addStandardBenchmarkMessage(int value, String units, int iterations) {
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Info,
- MessageFormat.format("{0,number,#.####} {1} per iteration (total: {2}, iterations: {3})",
- ((float)value)/iterations, units, value, iterations)
- );
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Info,
+ MessageFormat.format("{0,number,#.####} {1} per iteration (total: {2}, iterations: {3})",
+ ((float) value) / iterations, units, value, iterations));
}
-
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
@@ -68,7 +64,6 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
}
-
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -99,7 +94,6 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
}
-
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -126,8 +120,8 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.setTestStatus(ITestItem.Status.Passed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("testDemo");
- mockModelUpdater.addTestMessage("qt_test_demo.cpp", 6, ITestMessage.Level.FatalError,
- "Compared values are not the same\n Actual (1): 1\n Expected (2): 2");
+ mockModelUpdater.addTestMessage("qt_test_demo.cpp", 6, ITestMessage.Level.FatalError,
+ "Compared values are not the same\n Actual (1): 1\n Expected (2): 2");
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("cleanupTestCase");
@@ -136,7 +130,6 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
}
-
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -158,15 +151,14 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.setTestStatus(ITestItem.Status.Passed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("testDemo");
- mockModelUpdater.addTestMessage("qtestcase.cpp", 1675, ITestMessage.Level.FatalError,
- "Caught unhandled exception");
+ mockModelUpdater.addTestMessage("qtestcase.cpp", 1675, ITestMessage.Level.FatalError,
+ "Caught unhandled exception");
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
// NOTE: Qt.Test does not run any other test cases after exception throwing in a test case
mockModelUpdater.exitTestSuite();
}
-
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -232,7 +224,8 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.setTestStatus(ITestItem.Status.Passed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("testWarning");
- mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Warning, "Test warning!");
+ mockModelUpdater.addTestMessage(DEFAULT_LOCATION_FILE, DEFAULT_LOCATION_LINE, ITestMessage.Level.Warning,
+ "Test warning!");
mockModelUpdater.setTestStatus(ITestItem.Status.Passed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("testFailure");
@@ -244,12 +237,14 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.setTestStatus(ITestItem.Status.Skipped);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("testExpectedFailWithContinue");
- mockModelUpdater.addTestMessage("qt_test_demo.cpp", 60, ITestMessage.Level.Error, "Will fix in the next release");
+ mockModelUpdater.addTestMessage("qt_test_demo.cpp", 60, ITestMessage.Level.Error,
+ "Will fix in the next release");
mockModelUpdater.addTestMessage("qt_test_demo.cpp", 61, ITestMessage.Level.FatalError, "Failed!");
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("testExpectedFailWithAbort");
- mockModelUpdater.addTestMessage("qt_test_demo.cpp", 68, ITestMessage.Level.Error, "Will fix in the next release");
+ mockModelUpdater.addTestMessage("qt_test_demo.cpp", 68, ITestMessage.Level.Error,
+ "Will fix in the next release");
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("testExpectedFailPassed");
@@ -257,11 +252,13 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("testUnknownIncidentType");
- mockModelUpdater.addTestMessage("qt_test_demo.cpp", 72, ITestMessage.Level.FatalError, "Unknown incident test!");
+ mockModelUpdater.addTestMessage("qt_test_demo.cpp", 72, ITestMessage.Level.FatalError,
+ "Unknown incident test!");
mockModelUpdater.setTestStatus(ITestItem.Status.Aborted);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("testUnknownMessageType");
- mockModelUpdater.addTestMessage("qt_test_demo.cpp", 80, ITestMessage.Level.FatalError, "Unknown message type test!");
+ mockModelUpdater.addTestMessage("qt_test_demo.cpp", 80, ITestMessage.Level.FatalError,
+ "Unknown message type test!");
mockModelUpdater.setTestStatus(ITestItem.Status.Passed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("cleanupTestCase");
@@ -270,7 +267,6 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
}
-
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -303,7 +299,6 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
}
-
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -341,7 +336,6 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
}
-
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -397,8 +391,7 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.exitTestCase();
mockModelUpdater.exitTestSuite();
}
-
-
+
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -432,13 +425,13 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.setTestStatus(ITestItem.Status.Passed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("testDemo(all lower)");
- mockModelUpdater.addTestMessage("qt_test_demo.cpp", 20, ITestMessage.Level.FatalError,
- "Compared values are not the same\n Actual (string.toUpper()): HELLO\n Expected (result): HELLO2");
+ mockModelUpdater.addTestMessage("qt_test_demo.cpp", 20, ITestMessage.Level.FatalError,
+ "Compared values are not the same\n Actual (string.toUpper()): HELLO\n Expected (result): HELLO2");
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("testDemo(mixed)");
- mockModelUpdater.addTestMessage("qt_test_demo.cpp", 20, ITestMessage.Level.FatalError,
- "Compared values are not the same\n Actual (string.toUpper()): HELLO\n Expected (result): HELLO3");
+ mockModelUpdater.addTestMessage("qt_test_demo.cpp", 20, ITestMessage.Level.FatalError,
+ "Compared values are not the same\n Actual (string.toUpper()): HELLO\n Expected (result): HELLO3");
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("cleanupTestCase");
@@ -446,8 +439,7 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.exitTestCase();
mockModelUpdater.exitTestSuite();
}
-
-
+
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -491,7 +483,7 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("testDemo(mixed)");
mockModelUpdater.addTestMessage("", 0, ITestMessage.Level.Warning, "Hello");
- mockModelUpdater.addTestMessage("qt_test_demo.cpp", 66, ITestMessage.Level.FatalError, "HELLO3");
+ mockModelUpdater.addTestMessage("qt_test_demo.cpp", 66, ITestMessage.Level.FatalError, "HELLO3");
mockModelUpdater.setTestStatus(ITestItem.Status.Failed);
mockModelUpdater.exitTestCase();
mockModelUpdater.enterTestCase("cleanupTestCase");
@@ -500,7 +492,6 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
}
-
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -544,7 +535,6 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
}
-
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -574,14 +564,12 @@ public class QtTestCase extends BaseTestCase {
mockModelUpdater.exitTestSuite();
}
-
//
public void testNoInput() {
// NOTE: The comment above is left blank intentionally
expectTestingException();
}
-
-
+
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -594,7 +582,6 @@ public class QtTestCase extends BaseTestCase {
expectTestingException();
}
-
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -605,7 +592,6 @@ public class QtTestCase extends BaseTestCase {
expectTestingException();
}
-
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -622,7 +608,6 @@ public class QtTestCase extends BaseTestCase {
expectTestingException();
}
-
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -641,7 +626,6 @@ public class QtTestCase extends BaseTestCase {
expectTestingException();
}
-
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
@@ -658,7 +642,6 @@ public class QtTestCase extends BaseTestCase {
expectTestingException();
}
-
//<?xml version="1.0" encoding="ISO-8859-1"?>
//<TestCase name="MainTS">
//<Environment>
diff --git a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/TAPTestCase.java b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/TAPTestCase.java
index c17ba601fc..a162707392 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/TAPTestCase.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner.tests/src/org/eclipse/cdt/testsrunner/testsrunners/TAPTestCase.java
@@ -29,24 +29,24 @@ public class TAPTestCase extends BaseTestCase {
//
public void testNoTestCases() {
}
-
+
//TAP version 1
- public void testIgnoreVersion() {
+ public void testIgnoreVersion() {
}
-
+
//
//TAP version 1
- public void testVersionMustBeOnFirstLine() {
+ public void testVersionMustBeOnFirstLine() {
expectTestingException();
}
-
+
//ok
//not ok
//ok # skip
//not ok # SKiPped
//ok # todo
//not ok # toDO
- public void testBasicTestCases() {
+ public void testBasicTestCases() {
mockModelUpdater.enterTestCase("1");
mockModelUpdater.setTestStatus(Status.Passed);
mockModelUpdater.exitTestCase();
@@ -70,11 +70,11 @@ public class TAPTestCase extends BaseTestCase {
mockModelUpdater.setTestStatus(Status.NotRun);
mockModelUpdater.exitTestCase();
}
-
+
//1..3
//ok
//not ok
- public void testMorePlannedThanExecutedTestCases() {
+ public void testMorePlannedThanExecutedTestCases() {
mockModelUpdater.enterTestCase("1");
mockModelUpdater.setTestStatus(Status.Passed);
mockModelUpdater.exitTestCase();
@@ -85,10 +85,10 @@ public class TAPTestCase extends BaseTestCase {
mockModelUpdater.setTestStatus(Status.Skipped);
mockModelUpdater.exitTestCase();
}
-
+
//ok
//ok 4
- public void testForwardJump() {
+ public void testForwardJump() {
mockModelUpdater.enterTestCase("1");
mockModelUpdater.setTestStatus(Status.Passed);
mockModelUpdater.exitTestCase();
@@ -102,19 +102,19 @@ public class TAPTestCase extends BaseTestCase {
mockModelUpdater.setTestStatus(Status.Passed);
mockModelUpdater.exitTestCase();
}
-
+
//ok
//ok 1
- public void testNoBackwardJump() {
+ public void testNoBackwardJump() {
mockModelUpdater.enterTestCase("1");
mockModelUpdater.setTestStatus(Status.Passed);
mockModelUpdater.exitTestCase();
expectTestingException();
}
-
+
//ok some test name
//not ok 3 other test name
- public void testTestCaseName() {
+ public void testTestCaseName() {
mockModelUpdater.enterTestCase("some test name");
mockModelUpdater.setTestStatus(Status.Passed);
mockModelUpdater.exitTestCase();
@@ -125,12 +125,12 @@ public class TAPTestCase extends BaseTestCase {
mockModelUpdater.setTestStatus(Status.Failed);
mockModelUpdater.exitTestCase();
}
-
+
//1..3
//ok 1
//Bail out! because I'm done with this testing
//Ignored trailing data
- public void testBailOut() {
+ public void testBailOut() {
mockModelUpdater.enterTestCase("1");
mockModelUpdater.setTestStatus(Status.Passed);
mockModelUpdater.exitTestCase();
@@ -147,15 +147,15 @@ public class TAPTestCase extends BaseTestCase {
//1..3
//ok
//1..2
- public void testAtMostOnePlan() {
+ public void testAtMostOnePlan() {
mockModelUpdater.enterTestCase("1");
mockModelUpdater.setTestStatus(Status.Passed);
mockModelUpdater.exitTestCase();
expectTestingException();
}
-
+
//1..2 # skipped for some reason
- public void testSkippedAllTestsWithReason() {
+ public void testSkippedAllTestsWithReason() {
mockModelUpdater.enterTestCase("1");
mockModelUpdater.addTestMessage(null, 0, Level.Message, "skipped for some reason");
mockModelUpdater.setTestStatus(Status.Skipped);
@@ -165,7 +165,7 @@ public class TAPTestCase extends BaseTestCase {
mockModelUpdater.setTestStatus(Status.Skipped);
mockModelUpdater.exitTestCase();
}
-
+
//output for 1 (1)
//output for 1 (2)
//ok
@@ -173,7 +173,7 @@ public class TAPTestCase extends BaseTestCase {
//output for 2 (2)
//not ok second test # skipped for some reason
//ignored output
- public void testOutput() {
+ public void testOutput() {
mockModelUpdater.enterTestCase("1");
mockModelUpdater.addTestMessage(null, 0, Level.Message, "output for 1 (1)");
mockModelUpdater.addTestMessage(null, 0, Level.Message, "output for 1 (2)");
@@ -186,12 +186,12 @@ public class TAPTestCase extends BaseTestCase {
mockModelUpdater.setTestStatus(Status.Skipped);
mockModelUpdater.exitTestCase();
}
-
+
//filenameA: info: info text
//filenameB: warning: warning text
//filenameC:17: error: error text
//ok
- public void testGCCDiagnosticOutput() {
+ public void testGCCDiagnosticOutput() {
mockModelUpdater.enterTestCase("1");
mockModelUpdater.addTestMessage("filenameA", 0, Level.Info, "info text");
mockModelUpdater.addTestMessage("filenameB", 0, Level.Warning, "warning text");

Back to the top