mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 11:25:35 +02:00
Marked failing tests as such and reopend bugzillas.
This commit is contained in:
parent
04f43e66f3
commit
d72e22ac05
1 changed files with 35 additions and 43 deletions
|
@ -19,27 +19,11 @@ import java.io.InputStream;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
|
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
import junit.framework.TestCase;
|
|
||||||
import junit.framework.TestSuite;
|
import junit.framework.TestSuite;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.CModelException;
|
|
||||||
import org.eclipse.cdt.core.model.CoreModel;
|
|
||||||
import org.eclipse.cdt.core.model.ICProject;
|
|
||||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
|
||||||
import org.eclipse.cdt.core.model.IWorkingCopy;
|
|
||||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
|
||||||
import org.eclipse.cdt.core.testplugin.FileManager;
|
|
||||||
import org.eclipse.cdt.internal.ui.CHelpProviderManager;
|
|
||||||
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
|
||||||
import org.eclipse.cdt.internal.ui.text.CHelpBookDescriptor;
|
|
||||||
import org.eclipse.cdt.internal.ui.text.contentassist.CCompletionProcessor2;
|
|
||||||
|
|
||||||
import org.eclipse.cdt.ui.text.ICHelpInvocationContext;
|
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.resources.IWorkspace;
|
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.jface.action.IAction;
|
import org.eclipse.jface.action.IAction;
|
||||||
|
@ -49,34 +33,43 @@ import org.eclipse.ui.IWorkbenchPage;
|
||||||
import org.eclipse.ui.PlatformUI;
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.part.FileEditorInput;
|
import org.eclipse.ui.part.FileEditorInput;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.model.CModelException;
|
||||||
|
import org.eclipse.cdt.core.model.CoreModel;
|
||||||
|
import org.eclipse.cdt.core.model.ICProject;
|
||||||
|
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||||
|
import org.eclipse.cdt.core.model.IWorkingCopy;
|
||||||
|
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||||
|
import org.eclipse.cdt.ui.tests.BaseTestCase;
|
||||||
|
import org.eclipse.cdt.ui.text.ICHelpInvocationContext;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.internal.ui.CHelpProviderManager;
|
||||||
|
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
||||||
|
import org.eclipse.cdt.internal.ui.text.CHelpBookDescriptor;
|
||||||
|
import org.eclipse.cdt.internal.ui.text.contentassist.CCompletionProcessor2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author aniefer
|
* @author aniefer
|
||||||
*/
|
*/
|
||||||
public class ContentAssistTests extends TestCase {
|
public class ContentAssistTests extends BaseTestCase {
|
||||||
static NullProgressMonitor monitor;
|
private NullProgressMonitor monitor= new NullProgressMonitor();
|
||||||
static IWorkspace workspace;
|
|
||||||
static IProject project;
|
static IProject project;
|
||||||
static FileManager fileManager;
|
|
||||||
static boolean disabledHelpContributions = false;
|
static boolean disabledHelpContributions = false;
|
||||||
{
|
|
||||||
|
public void setUp() {
|
||||||
//(CCorePlugin.getDefault().getCoreModel().getIndexManager()).reset();
|
//(CCorePlugin.getDefault().getCoreModel().getIndexManager()).reset();
|
||||||
monitor = new NullProgressMonitor();
|
|
||||||
|
|
||||||
workspace = ResourcesPlugin.getWorkspace();
|
if (project == null) {
|
||||||
|
ICProject cPrj;
|
||||||
|
try {
|
||||||
|
cPrj = CProjectHelper.createCCProject("ContentAssistTestProject", "bin"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
|
||||||
ICProject cPrj;
|
project = cPrj.getProject();
|
||||||
try {
|
} catch ( CoreException e ) {
|
||||||
cPrj = CProjectHelper.createCCProject("ContentAssistTestProject", "bin"); //$NON-NLS-1$ //$NON-NLS-2$
|
/*boo*/
|
||||||
|
}
|
||||||
project = cPrj.getProject();
|
if (project == null)
|
||||||
} catch ( CoreException e ) {
|
fail("Unable to create project"); //$NON-NLS-1$
|
||||||
/*boo*/
|
}
|
||||||
}
|
|
||||||
if (project == null)
|
|
||||||
fail("Unable to create project"); //$NON-NLS-1$
|
|
||||||
|
|
||||||
//Create file manager
|
|
||||||
fileManager = new FileManager();
|
|
||||||
}
|
}
|
||||||
public ContentAssistTests()
|
public ContentAssistTests()
|
||||||
{
|
{
|
||||||
|
@ -105,7 +98,7 @@ public class ContentAssistTests extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
TestSuite suite = new TestSuite( ContentAssistTests.class );
|
TestSuite suite= suite(ContentAssistTests.class, "_");
|
||||||
suite.addTest( new ContentAssistTests("cleanupProject") ); //$NON-NLS-1$
|
suite.addTest( new ContentAssistTests("cleanupProject") ); //$NON-NLS-1$
|
||||||
return suite;
|
return suite;
|
||||||
}
|
}
|
||||||
|
@ -133,6 +126,7 @@ public class ContentAssistTests extends TestCase {
|
||||||
/*boo*/
|
/*boo*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
project= null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IFile importFile(String fileName, String contents ) throws Exception{
|
protected IFile importFile(String fileName, String contents ) throws Exception{
|
||||||
|
@ -146,8 +140,6 @@ public class ContentAssistTests extends TestCase {
|
||||||
else
|
else
|
||||||
file.create( stream, false, monitor );
|
file.create( stream, false, monitor );
|
||||||
|
|
||||||
fileManager.addFile(file);
|
|
||||||
|
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +168,7 @@ public class ContentAssistTests extends TestCase {
|
||||||
return results ;
|
return results ;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug69334() throws Exception {
|
public void _testBug69334() throws Exception {
|
||||||
importFile( "test.h", "class Test{ public : Test( int ); }; \n" ); //$NON-NLS-1$//$NON-NLS-2$
|
importFile( "test.h", "class Test{ public : Test( int ); }; \n" ); //$NON-NLS-1$//$NON-NLS-2$
|
||||||
StringWriter writer = new StringWriter();
|
StringWriter writer = new StringWriter();
|
||||||
writer.write( "#include \"test.h\" \n"); //$NON-NLS-1$
|
writer.write( "#include \"test.h\" \n"); //$NON-NLS-1$
|
||||||
|
@ -194,7 +186,7 @@ public class ContentAssistTests extends TestCase {
|
||||||
assertEquals( "veryLongName : int", results[0].getDisplayString() ); //$NON-NLS-1$
|
assertEquals( "veryLongName : int", results[0].getDisplayString() ); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug72824() throws Exception {
|
public void _testBug72824() throws Exception {
|
||||||
StringWriter writer = new StringWriter();
|
StringWriter writer = new StringWriter();
|
||||||
writer.write( "class Strategy { \n"); //$NON-NLS-1$
|
writer.write( "class Strategy { \n"); //$NON-NLS-1$
|
||||||
writer.write( "public : \n"); //$NON-NLS-1$
|
writer.write( "public : \n"); //$NON-NLS-1$
|
||||||
|
|
Loading…
Add table
Reference in a new issue