mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46:02 +02:00
parent
b3003b7fa7
commit
542e8b474e
5 changed files with 22 additions and 18 deletions
|
@ -16,6 +16,8 @@ package org.eclipse.cdt.make.builder.tests;
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||||
|
import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
|
||||||
|
import org.eclipse.cdt.core.testplugin.util.BaseTestCase5;
|
||||||
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IProjectDescription;
|
import org.eclipse.core.resources.IProjectDescription;
|
||||||
|
@ -28,11 +30,10 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
|
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
import junit.framework.TestCase;
|
|
||||||
import junit.framework.TestSuite;
|
import junit.framework.TestSuite;
|
||||||
|
|
||||||
@SuppressWarnings("nls")
|
@SuppressWarnings("nls")
|
||||||
public class CDataProviderTests extends TestCase {
|
public class CDataProviderTests extends BaseTestCase {
|
||||||
/**
|
/**
|
||||||
* @param name
|
* @param name
|
||||||
*/
|
*/
|
||||||
|
@ -41,18 +42,14 @@ public class CDataProviderTests extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
TestSuite suite = new TestSuite(CDataProviderTests.class);
|
return new TestSuite(CDataProviderTests.class);
|
||||||
|
}
|
||||||
|
|
||||||
// // Add the relevant tests to the suite
|
@Override
|
||||||
// suite.addTest(new StandardBuildTests("testProjectCreation"));
|
protected void tearDown() throws Exception {
|
||||||
// suite.addTest(new StandardBuildTests("testProjectSettings"));
|
BaseTestCase5.removeLeftOverProjects();
|
||||||
// suite.addTest(new StandardBuildTests("testProjectConversion"));
|
|
||||||
// suite.addTest(new StandardBuildTests("testProjectCleanup"));
|
|
||||||
//
|
|
||||||
// suite.addTestSuite(ScannerConfigConsoleParserTests.class);
|
|
||||||
// suite.addTestSuite(ScannerConfigDiscoveryTests.class);
|
|
||||||
|
|
||||||
return suite;
|
super.tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testCData() throws Exception {
|
public void testCData() throws Exception {
|
||||||
|
|
|
@ -66,7 +66,6 @@ public class GCCPerFileBOPConsoleParserTests extends BaseBOPConsoleParserTests {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
super.tearDown();
|
|
||||||
if (fOutputParser != null) {
|
if (fOutputParser != null) {
|
||||||
fOutputParser.shutdown();
|
fOutputParser.shutdown();
|
||||||
}
|
}
|
||||||
|
@ -74,6 +73,7 @@ public class GCCPerFileBOPConsoleParserTests extends BaseBOPConsoleParserTests {
|
||||||
if (fCProject != null) {
|
if (fCProject != null) {
|
||||||
CProjectHelper.delete(fCProject);
|
CProjectHelper.delete(fCProject);
|
||||||
}
|
}
|
||||||
|
super.tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testParsingIfStatement_bug197930() throws Exception {
|
public void testParsingIfStatement_bug197930() throws Exception {
|
||||||
|
|
|
@ -46,8 +46,8 @@ public class GCCScannerInfoConsoleParserTests extends BaseBOPConsoleParserTests
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
super.tearDown();
|
|
||||||
fOutputParser.shutdown();
|
fOutputParser.shutdown();
|
||||||
|
super.tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -21,6 +21,7 @@ import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.parser.IScannerInfo;
|
import org.eclipse.cdt.core.parser.IScannerInfo;
|
||||||
import org.eclipse.cdt.core.testplugin.ResourceHelper;
|
import org.eclipse.cdt.core.testplugin.ResourceHelper;
|
||||||
import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
|
import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
|
||||||
|
import org.eclipse.cdt.core.testplugin.util.BaseTestCase5;
|
||||||
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
||||||
import org.eclipse.cdt.make.core.MakeProjectNature;
|
import org.eclipse.cdt.make.core.MakeProjectNature;
|
||||||
import org.eclipse.cdt.make.core.scannerconfig.ScannerConfigNature;
|
import org.eclipse.cdt.make.core.scannerconfig.ScannerConfigNature;
|
||||||
|
@ -53,9 +54,11 @@ public class ScannerConfigDiscoveryTests extends BaseTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
|
super.setUp();
|
||||||
fMonitor = new NullProgressMonitor();
|
fMonitor = new NullProgressMonitor();
|
||||||
|
|
||||||
fCProject = StandardBuildTestHelper.createProject("SCD", (IPath) null, MakeCorePlugin.MAKE_PROJECT_ID);
|
fCProject = StandardBuildTestHelper.createProject("SCD" + getName(), (IPath) null,
|
||||||
|
MakeCorePlugin.MAKE_PROJECT_ID);
|
||||||
fCFile = fCProject.getProject().getFile("main.c");
|
fCFile = fCProject.getProject().getFile("main.c");
|
||||||
if (!fCFile.exists()) {
|
if (!fCFile.exists()) {
|
||||||
fCFile.create(new ByteArrayInputStream(" \n".getBytes()), false, fMonitor);
|
fCFile.create(new ByteArrayInputStream(" \n".getBytes()), false, fMonitor);
|
||||||
|
@ -65,7 +68,8 @@ public class ScannerConfigDiscoveryTests extends BaseTestCase {
|
||||||
@Override
|
@Override
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
ResourceHelper.cleanUp(getName());
|
ResourceHelper.cleanUp(getName());
|
||||||
StandardBuildTestHelper.removeProject("SCDC");
|
fCProject.getProject().delete(true, true, null);
|
||||||
|
super.tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetCCompilerBuiltins() throws CoreException {
|
public void testGetCCompilerBuiltins() throws CoreException {
|
||||||
|
|
|
@ -38,7 +38,9 @@ public class ScannerConfigProfileTests extends BaseTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
fCProject = StandardBuildTestHelper.createProject("SCD", (IPath) null, MakeCorePlugin.MAKE_PROJECT_ID);
|
super.setUp();
|
||||||
|
fCProject = StandardBuildTestHelper.createProject("SCD" + getName(), (IPath) null,
|
||||||
|
MakeCorePlugin.MAKE_PROJECT_ID);
|
||||||
fCFile = fCProject.getProject().getFile("main.c");
|
fCFile = fCProject.getProject().getFile("main.c");
|
||||||
if (!fCFile.exists()) {
|
if (!fCFile.exists()) {
|
||||||
fCFile.create(new ByteArrayInputStream(" \n".getBytes()), false, new NullProgressMonitor());
|
fCFile.create(new ByteArrayInputStream(" \n".getBytes()), false, new NullProgressMonitor());
|
||||||
|
@ -48,7 +50,8 @@ public class ScannerConfigProfileTests extends BaseTestCase {
|
||||||
@Override
|
@Override
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
ResourceHelper.cleanUp(getName());
|
ResourceHelper.cleanUp(getName());
|
||||||
StandardBuildTestHelper.removeProject("SCDC");
|
fCProject.delete(true, true, null);
|
||||||
|
super.tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue