[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] Some new JUnit tests
|
2003-06-10 Brent Nicolle
Added
some Interface tests of (IInclude, IMacro, IStructure).
Made
sure all the Test Suites have names in the JUnit hierarchy.
I also turned off the printStackFrame
in an exception-handler in the scanner, as it causes noise on the console
during testing.
There's a zip file for a new directory
to go in org.eclipse.cdt.ui.tests/model/org.eclipse.cdt.ui.tests.resources
Cheers,
Brent
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/ChangeLog,v
retrieving revision 1.56
diff -u -r1.56 ChangeLog
--- ChangeLog 10 Jun 2003 14:41:42 -0000 1.56
+++ ChangeLog 10 Jun 2003 22:31:26 -0000
@@ -1,3 +1,7 @@
+2003-06-10 Brent Nicolle
+ Added some Interface tests of (IInclude, IMacro, IStructure).
+ Made sure all the Test Suites have names in the JUnit hierarchy.
+
2003-06-09 Victor Mozgin
Moved testBug36769() from ACEFailedTest.java to DOMTests.java.
Removed ACEFailedTest.java as it is empty now.
Index: build/org/eclipse/cdt/core/build/managed/tests/AllBuildTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/build/org/eclipse/cdt/core/build/managed/tests/AllBuildTests.java,v
retrieving revision 1.10
diff -u -r1.10 AllBuildTests.java
--- build/org/eclipse/cdt/core/build/managed/tests/AllBuildTests.java 9 Jun 2003 19:22:21 -0000 1.10
+++ build/org/eclipse/cdt/core/build/managed/tests/AllBuildTests.java 10 Jun 2003 22:31:26 -0000
@@ -50,7 +50,7 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite();
+ TestSuite suite = new TestSuite(AllBuildTests.class.getName());
suite.addTest(new AllBuildTests("testExtensions"));
suite.addTest(new AllBuildTests("testProject"));
Index: failures/org/eclipse/cdt/core/model/failedTests/CModelElementsFailedTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/failures/org/eclipse/cdt/core/model/failedTests/CModelElementsFailedTests.java,v
retrieving revision 1.1
diff -u -r1.1 CModelElementsFailedTests.java
--- failures/org/eclipse/cdt/core/model/failedTests/CModelElementsFailedTests.java 26 May 2003 16:59:50 -0000 1.1
+++ failures/org/eclipse/cdt/core/model/failedTests/CModelElementsFailedTests.java 10 Jun 2003 22:31:26 -0000
@@ -49,7 +49,7 @@
private NullProgressMonitor monitor;
public static Test suite() {
- TestSuite suite= new TestSuite();
+ TestSuite suite= new TestSuite(CModelElementsFailedTests.class.getName());
suite.addTest(new CModelElementsFailedTests("testBug36379"));
return suite;
}
Index: failures/org/eclipse/cdt/core/parser/failedTests/ScannerFailedTest.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/failures/org/eclipse/cdt/core/parser/failedTests/Attic/ScannerFailedTest.java,v
retrieving revision 1.9
diff -u -r1.9 ScannerFailedTest.java
--- failures/org/eclipse/cdt/core/parser/failedTests/ScannerFailedTest.java 1 May 2003 20:04:43 -0000 1.9
+++ failures/org/eclipse/cdt/core/parser/failedTests/ScannerFailedTest.java 10 Jun 2003 22:31:26 -0000
@@ -33,7 +33,7 @@
public static Test suite()
{
- TestSuite suite = new TestSuite();
+ TestSuite suite = new TestSuite(ScannerFailedTest.class.getName());
suite.addTest( new ScannerFailedTest( "testBug36701" ) );
Index: model/org/eclipse/cdt/core/model/tests/AllCoreTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/AllCoreTests.java,v
retrieving revision 1.2
diff -u -r1.2 AllCoreTests.java
--- model/org/eclipse/cdt/core/model/tests/AllCoreTests.java 27 Sep 2002 13:46:54 -0000 1.2
+++ model/org/eclipse/cdt/core/model/tests/AllCoreTests.java 10 Jun 2003 22:31:26 -0000
@@ -25,16 +25,17 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite();
+ TestSuite suite = new TestSuite(AllCoreTests.class.getName());
// Just add more test cases here as you create them for
// each class being tested
-
+ suite.addTest(AllLanguageInterfaceTests.suite());
suite.addTest(CModelTests.suite());
suite.addTest(CModelExceptionTest.suite());
suite.addTest(FlagTests.suite());
suite.addTest(ArchiveTests.suite());
suite.addTest(TranslationUnitTests.suite());
+
return suite;
}
Index: model/org/eclipse/cdt/core/model/tests/AllLanguageInterfaceTests.java
===================================================================
RCS file: model/org/eclipse/cdt/core/model/tests/AllLanguageInterfaceTests.java
diff -N model/org/eclipse/cdt/core/model/tests/AllLanguageInterfaceTests.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ model/org/eclipse/cdt/core/model/tests/AllLanguageInterfaceTests.java 10 Jun 2003 22:31:26 -0000
@@ -0,0 +1,35 @@
+/*
+ * Created on Jun 9, 2003
+ * by bnicolle
+ */
+package org.eclipse.cdt.core.model.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * LanguageInterfaceTests
+ * lists all parts of the C/C++ language interface objects
+ * to be tested.
+ * @author bnicolle
+ *
+ */
+public class AllLanguageInterfaceTests {
+
+ /**
+ *
+ */
+ public static Test suite() {
+ TestSuite suite = new TestSuite(AllLanguageInterfaceTests.class.getName());
+
+ // Just add more test cases here as you create them for
+ // each class being tested
+
+ suite.addTest(IIncludeTests.suite());
+ suite.addTest(IMacroTests.suite());
+ suite.addTest(IStructureTests.suite());
+ return suite;
+
+ }
+
+}
Index: model/org/eclipse/cdt/core/model/tests/CModelElementsTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/CModelElementsTests.java,v
retrieving revision 1.9
diff -u -r1.9 CModelElementsTests.java
--- model/org/eclipse/cdt/core/model/tests/CModelElementsTests.java 26 May 2003 16:59:50 -0000 1.9
+++ model/org/eclipse/cdt/core/model/tests/CModelElementsTests.java 10 Jun 2003 22:31:26 -0000
@@ -59,7 +59,7 @@
private NullProgressMonitor monitor;
public static Test suite() {
- TestSuite suite= new TestSuite();
+ TestSuite suite= new TestSuite(CModelElementsTests.class.getName());
suite.addTest(new CModelElementsTests("testCModelElements"));
return suite;
}
Index: model/org/eclipse/cdt/core/model/tests/ElementDeltaTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/ElementDeltaTests.java,v
retrieving revision 1.5
diff -u -r1.5 ElementDeltaTests.java
--- model/org/eclipse/cdt/core/model/tests/ElementDeltaTests.java 26 May 2003 16:59:50 -0000 1.5
+++ model/org/eclipse/cdt/core/model/tests/ElementDeltaTests.java 10 Jun 2003 22:31:26 -0000
@@ -59,7 +59,7 @@
}
public static Test suite() {
- TestSuite suite= new TestSuite();
+ TestSuite suite= new TestSuite(ElementDeltaTests.class.getName());
suite.addTest(new ElementDeltaTests("testElementDeltas"));
return suite;
}
Index: model/org/eclipse/cdt/core/model/tests/IIncludeTests.java
===================================================================
RCS file: model/org/eclipse/cdt/core/model/tests/IIncludeTests.java
diff -N model/org/eclipse/cdt/core/model/tests/IIncludeTests.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ model/org/eclipse/cdt/core/model/tests/IIncludeTests.java 10 Jun 2003 22:31:26 -0000
@@ -0,0 +1,116 @@
+/*
+ * Created on Jun 4, 2003
+ * by bnicolle
+ */
+package org.eclipse.cdt.core.model.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.IInclude;
+import org.eclipse.cdt.core.model.tests.IntegratedCModelTest;
+
+/**
+ * @author bnicolle
+ *
+ */
+public class IIncludeTests extends IntegratedCModelTest {
+
+ /**
+ * @param string
+ */
+ public IIncludeTests(String string) {
+ super( string );
+ }
+
+ /**
+ * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+ */
+ public String getSourcefileSubdir() {
+ return "model/org.eclipse.cdt.core.model.tests.resources/";
+ }
+
+ /**
+ * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+ */
+ public String getSourcefileResource() {
+ return "IIncludeTest.h";
+ }
+
+ /**
+ * @returns a test suite named after this class
+ * containing all its public members named "test*"
+ */
+ public static Test suite() {
+ TestSuite suite= new TestSuite(IIncludeTests.class);
+ return suite;
+ }
+
+ public void testGetIncludeName()
+ {
+ ITranslationUnit tu = getTU();
+ IInclude[] theIncludes = null;
+ try {
+ theIncludes = tu.getIncludes();
+ }
+ catch( CModelException c )
+ {
+ assertNotNull("CModelException thrown",c);
+ }
+
+ String getIncludeNameList[] = new String[] {
+ new String("stdio.h"),
+ new String("whatever.h"),
+ new String("src/slash.h"),
+ new String("src\\backslash.h"), // that's a single backslash, escaped
+ new String("Program Files/space.h"),
+ new String("../up1dir.h"),
+ new String("./samedir.h"),
+ new String("different_extension1.hpp"),
+ new String("different_extension2.hh"),
+ new String("different_extension3.x"),
+ new String("no_extension"),
+ new String("whitespace_after_hash"),
+ new String("whitespace_before_hash"),
+ new String("resync_after_bad_parse_1"),
+ new String("resync_after_bad_parse_2"),
+ new String("one"), // C-spec does not allow this, but that's OK for our present purposes
+ new String("resync_after_bad_parse_3"),
+ new String("invalid.h"), // C-spec does not allow this, but that's OK for our present purposes
+ // TODO: expect new String("MYINCFILE"),
+ // TODO: expect new String("xstr(INCFILE(2)).h")
+ };
+ assertEquals( getIncludeNameList.length, theIncludes.length );
+ for( int i=0; i<getIncludeNameList.length; i++ )
+ {
+ IInclude inc1 = theIncludes[i];
+
+ assertEquals( getIncludeNameList[i], inc1.getIncludeName() );
+ }
+// checkLineNumbers((CElement)inc1, 2, 2);
+ }
+
+ public void testIsStandard()
+ {
+ ITranslationUnit tu = getTU();
+ IInclude[] theIncludes = null;
+ try {
+ theIncludes = tu.getIncludes();
+ }
+ catch( CModelException c )
+ {
+ assertNotNull("CModelException thrown",c);
+ }
+ boolean isStandardList[] = new boolean[] {
+ true, false
+ };
+ for( int i=0; i<isStandardList.length; i++ )
+ {
+ IInclude inc1 = theIncludes[i];
+ assertEquals( isStandardList[i], inc1.isStandard() );
+ }
+ }
+}
+
Index: model/org/eclipse/cdt/core/model/tests/IMacroTests.java
===================================================================
RCS file: model/org/eclipse/cdt/core/model/tests/IMacroTests.java
diff -N model/org/eclipse/cdt/core/model/tests/IMacroTests.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ model/org/eclipse/cdt/core/model/tests/IMacroTests.java 10 Jun 2003 22:31:26 -0000
@@ -0,0 +1,106 @@
+/*
+ * Created on Jun 6, 2003
+ * by bnicolle
+ */
+package org.eclipse.cdt.core.model.tests;
+
+import org.eclipse.cdt.core.model.IMacro;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import java.util.ArrayList;
+
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.model.tests.IntegratedCModelTest;
+
+/**
+ * IMacroTest - Class for testing IMacro
+ *
+ * @author bnicolle
+ *
+ */
+public class IMacroTests extends IntegratedCModelTest {
+ /**
+ * @returns a test suite named after this class
+ * containing all its public members named "test*"
+ */
+ public static Test suite() {
+ TestSuite suite= new TestSuite( IMacroTests.class.getName() );
+ suite.addTest( new IMacroTests("testGetElementName"));
+ // TODO: suite.addTest( new IMacroTest("testGetIdentifierList"));
+ // TODO: suite.addTest( new IMacroTest("testGetTokenSequence"));
+ return suite;
+ }
+
+ /**
+ * @param name
+ */
+ public IMacroTests(String name) {
+ super(name);
+ }
+
+ /**
+ * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+ */
+ public String getSourcefileSubdir() {
+ return "model/org.eclipse.cdt.core.model.tests.resources/";
+ }
+
+ /**
+ * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+ */
+ public String getSourcefileResource() {
+ return "IMacroTest.h";
+ }
+
+ public void testGetElementName() {
+ ITranslationUnit tu = getTU();
+ ArrayList arrayElements = tu.getChildrenOfType( ITranslationUnit.C_MACRO );
+
+ String expectedList[] = new String[] {
+ "SINGLETON",
+ "NUMBER",
+ "PRINT"
+ };
+ assertEquals( expectedList.length, arrayElements.size() );
+ for( int i=0; i<expectedList.length; i++ )
+ {
+ IMacro iMacro = (IMacro) arrayElements.get(i);
+ assertEquals( expectedList[i], iMacro.getElementName() );
+ }
+ }
+
+ public void testGetIdentifierList() {
+ ITranslationUnit tu = getTU();
+ ArrayList arrayElements = tu.getChildrenOfType( ITranslationUnit.C_MACRO );
+
+ String expectedList[] = new String[] {
+ "",
+ "",
+ "string,msg"
+ };
+ assertEquals( expectedList.length, arrayElements.size() );
+ for( int i=0; i<expectedList.length; i++ )
+ {
+ IMacro iMacro = (IMacro) arrayElements.get(i);
+ assertEquals( expectedList[i], iMacro.getIdentifierList() );
+ }
+ }
+
+ public void testGetTokenSequence() {
+ ITranslationUnit tu = getTU();
+ ArrayList arrayElements = tu.getChildrenOfType( ITranslationUnit.C_MACRO );
+
+ String expectedList[] = new String[] {
+ "",
+ "1",
+ "printf(string, msg)"
+ };
+ assertEquals( expectedList.length, arrayElements.size() );
+ for( int i=0; i<expectedList.length; i++ )
+ {
+ IMacro iMacro = (IMacro) arrayElements.get(i);
+ assertEquals( expectedList[i], iMacro.getTokenSequence() );
+ }
+ }
+}
Index: model/org/eclipse/cdt/core/model/tests/IStructureTests.java
===================================================================
RCS file: model/org/eclipse/cdt/core/model/tests/IStructureTests.java
diff -N model/org/eclipse/cdt/core/model/tests/IStructureTests.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ model/org/eclipse/cdt/core/model/tests/IStructureTests.java 10 Jun 2003 22:31:26 -0000
@@ -0,0 +1,95 @@
+/*
+ * Created on Jun 9, 2003
+ * by bnicolle
+ */
+package org.eclipse.cdt.core.model.tests;
+
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.model.IStructure;
+import org.eclipse.cdt.core.model.IField;
+
+import junit.framework.*;
+
+import java.util.ArrayList;
+
+/**
+ * @author bnicolle
+ *
+ */
+public class IStructureTests extends IntegratedCModelTest {
+ /**
+ * @param name
+ */
+ public IStructureTests(String name) {
+ super(name);
+ }
+
+ /**
+ * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+ */
+ public String getSourcefileSubdir() {
+ return "model/org.eclipse.cdt.core.model.tests.resources/";
+ }
+
+ /**
+ * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+ */
+ public String getSourcefileResource() {
+ return "IStructure.c";
+ }
+
+ /**
+ * @returns a test suite named after this class
+ * containing all its public members named "test*"
+ */
+ public static Test suite() {
+ TestSuite suite= new TestSuite( IStructureTests.class.getName() );
+ // TODO: suite.addTest( new IStructureTests("testGetField"));
+
+ // TODO: implement the other tests here once IStructure is properly implemented!
+ return suite;
+ }
+
+
+ public void testGetAccessControl() {
+ // test getAccessControl()
+ // test getAccessControl(int)
+ }
+ public void testGetBaseTypes() {
+ }
+ public void testGetField() {
+ ITranslationUnit tu = getTU();
+ ArrayList arrayStructs = tu.getChildrenOfType(ITranslationUnit.C_STRUCT);
+ ArrayList arrayClasses = tu.getChildrenOfType(ITranslationUnit.C_CLASS);
+ IStructure myIStruct = (IStructure) arrayStructs.get(0);
+ assertNotNull(myIStruct);
+ IField myIField = myIStruct.getField("bar");
+ assertNotNull(myIField);
+ }
+ public void testGetFields() {
+ }
+ public void testGetInitializer() {
+ }
+ public void testGetMethod() {
+ }
+ public void testGetMethods() {
+ }
+ public void testGetStructureInfo() {
+ }
+ public void testGetTypeName() {
+ }
+ public void testIsAbstract() {
+ }
+ public void testIsClass() {
+ }
+ public void testIsConst() {
+ }
+ public void testIsStatic() {
+ }
+ public void testIsStruct() {
+ }
+ public void testIsUnion() {
+ }
+ public void testIsVolatile() {
+ }
+}
Index: model/org/eclipse/cdt/core/model/tests/IntegratedCModelTest.java
===================================================================
RCS file: model/org/eclipse/cdt/core/model/tests/IntegratedCModelTest.java
diff -N model/org/eclipse/cdt/core/model/tests/IntegratedCModelTest.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ model/org/eclipse/cdt/core/model/tests/IntegratedCModelTest.java 10 Jun 2003 22:31:26 -0000
@@ -0,0 +1,104 @@
+/*
+ * Created on Jun 3, 2003
+ * by bnicolle
+ */
+package org.eclipse.cdt.core.model.tests;
+
+import junit.framework.TestCase;
+
+import java.io.FileInputStream;
+import java.util.Map;
+
+import org.eclipse.cdt.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.cdt.core.CCProjectNature;
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.internal.core.model.TranslationUnit;
+
+/**
+ * @author bnicolle
+ *
+ */
+public abstract class IntegratedCModelTest extends TestCase {
+
+ private ICProject fCProject;
+ private IFile sourceFile;
+ private NullProgressMonitor monitor;
+
+ /**
+ *
+ */
+ public IntegratedCModelTest() {
+ super();
+ }
+
+ /**
+ * @param name
+ */
+ public IntegratedCModelTest(String name) {
+ super(name);
+ }
+
+ /**
+ * @return the subdirectory (from the plugin root) containing the required
+ * test sourcefile (plus a trailing slash)
+ */
+ abstract public String getSourcefileSubdir();
+
+ /**
+ * @return the name of the test source-file
+ */
+ abstract public String getSourcefileResource();
+
+ public void setUp() throws Exception {
+ monitor = new NullProgressMonitor();
+ String pluginRoot=org.eclipse.core.runtime.Platform.getPlugin("org.eclipse.cdt.ui.tests").find(new Path("/")).getFile();
+
+ fCProject= CProjectHelper.createCProject("TestProject1", "bin");
+
+ sourceFile = fCProject.getProject().getFile( getSourcefileResource() );
+ if (!sourceFile.exists()) {
+ try{
+ FileInputStream fileIn = new FileInputStream(pluginRoot+ getSourcefileSubdir() + getSourcefileResource() );
+ sourceFile.create(fileIn,false, monitor);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+ if (!fCProject.getProject().hasNature(CCProjectNature.CC_NATURE_ID)) {
+ addNatureToProject(fCProject.getProject(), CCProjectNature.CC_NATURE_ID, null);
+ }
+
+ CCorePlugin.getDefault().setUseNewParser(true);
+ }
+
+ protected void tearDown() throws Exception {
+ CProjectHelper.delete(fCProject);
+ }
+
+ private static void addNatureToProject(IProject proj, String natureId, IProgressMonitor monitor) throws CoreException {
+ IProjectDescription description = proj.getDescription();
+ String[] prevNatures= description.getNatureIds();
+ String[] newNatures= new String[prevNatures.length + 1];
+ System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
+ newNatures[prevNatures.length]= natureId;
+ description.setNatureIds(newNatures);
+ proj.setDescription(description, monitor);
+ }
+
+ protected ITranslationUnit getTU() {
+ TranslationUnit tu = new TranslationUnit(fCProject, sourceFile);
+ // parse the translation unit to get the elements tree
+ Map newElement = tu.parse(false); // FALSE=require line numbers
+ return tu;
+ }
+}
Index: model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java,v
retrieving revision 1.7
diff -u -r1.7 TranslationUnitTests.java
--- model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java 5 Jun 2003 20:01:49 -0000 1.7
+++ model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java 10 Jun 2003 22:31:27 -0000
@@ -157,7 +157,14 @@
}
public static TestSuite suite() {
- return new TestSuite(TranslationUnitTests.class);
+ TestSuite suite= new TestSuite(TranslationUnitTests.class.getName());
+ suite.addTest(new TranslationUnitTests("testIsTranslationUnit"));
+ suite.addTest(new TranslationUnitTests("testGetChildren"));
+ suite.addTest(new TranslationUnitTests("testGetElement"));
+ suite.addTest(new TranslationUnitTests("testBug23478A"));
+ suite.addTest(new TranslationUnitTests("testBug23478B"));
+ // TODO: suite.addTest(new TranslationUnitTests("testGetElementAtLine"));
+ return suite;
}
public static void main (String[] args){
@@ -183,7 +190,7 @@
* Simple sanity tests to make sure TranslationUnit.getChildren seems to
* basicly work
*/
- public void testGetChildern() {
+ public void testGetChildren() {
ITranslationUnit myTranslationUnit;
ICElement[] elements;
int x;
Index: model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java,v
retrieving revision 1.3
diff -u -r1.3 WorkingCopyTests.java
--- model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java 16 Apr 2003 20:32:18 -0000 1.3
+++ model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java 10 Jun 2003 22:31:27 -0000
@@ -48,7 +48,7 @@
}
public static Test suite() {
- TestSuite suite= new TestSuite();
+ TestSuite suite= new TestSuite(WorkingCopyTests.class.getName());
suite.addTest(new WorkingCopyTests("testWorkingCopy"));
//suite.addTest(new WorkingCopyTests("testHashing"));
return suite;
Index: parser/org/eclipse/cdt/core/parser/tests/ParserTestSuite.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/parser/org/eclipse/cdt/core/parser/tests/ParserTestSuite.java,v
retrieving revision 1.4
diff -u -r1.4 ParserTestSuite.java
--- parser/org/eclipse/cdt/core/parser/tests/ParserTestSuite.java 5 May 2003 20:51:07 -0000 1.4
+++ parser/org/eclipse/cdt/core/parser/tests/ParserTestSuite.java 10 Jun 2003 22:31:27 -0000
@@ -24,7 +24,7 @@
*/
public class ParserTestSuite extends TestCase {
public static Test suite() {
- TestSuite suite= new TestSuite();
+ TestSuite suite= new TestSuite(ParserTestSuite.class.getName());
suite.addTestSuite(BranchTrackerTest.class);
suite.addTestSuite(ScannerTestCase.class);
suite.addTestSuite(ExprEvalTest.class);
Index: src/org/eclipse/cdt/testplugin/test/HelloWorld.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/testplugin/test/HelloWorld.java,v
retrieving revision 1.3
diff -u -r1.3 HelloWorld.java
--- src/org/eclipse/cdt/testplugin/test/HelloWorld.java 24 Apr 2003 17:36:42 -0000 1.3
+++ src/org/eclipse/cdt/testplugin/test/HelloWorld.java 10 Jun 2003 22:31:27 -0000
@@ -22,7 +22,7 @@
}
public static Test suite() {
- TestSuite suite= new TestSuite();
+ TestSuite suite= new TestSuite(HelloWorld.class.getName());
suite.addTest(new HelloWorld("test1"));
return suite;
}
Index: parser/org/eclipse/cdt/internal/core/parser/Parser.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java,v
retrieving revision 1.48
diff -u -r1.48 Parser.java
--- parser/org/eclipse/cdt/internal/core/parser/Parser.java 10 Jun 2003 14:41:40 -0000 1.48
+++ parser/org/eclipse/cdt/internal/core/parser/Parser.java 10 Jun 2003 22:23:12 -0000
@@ -2986,7 +2986,7 @@
} catch (EndOfFile e) {
throw e;
} catch (ScannerException e) {
- e.printStackTrace();
+// e.printStackTrace();
return fetchToken();
}
}
Attachment:
cdt-ui-tests-resources.zip
Description: Zip archive