Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: Rejected: [cdt-patch] Some new Tests

Here is a new patch with some of the tests moved to a new file ACEFailedTest
 
-Andrew
-----Original Message-----
From: Douglas Schaefer [mailto:dschaefe@xxxxxxxxxx]
Sent: Wednesday, April 23, 2003 11:07 AM
To: cdt-patch@xxxxxxxxxxx
Subject: Rejected: [cdt-patch] Some new Tests


John and Andrew are duking out control of this file.  Rejected until they resolve their issues.

Doug Schaefer
Rational Software - IBM Software Group
Ottawa, Ontario, Canada



"Niefer, Andrew" <aniefer@xxxxxxxxxxxx>
Sent by: cdt-patch-admin@xxxxxxxxxxx

04/22/2003 05:28 PM
Please respond to cdt-patch

       
        To:        "'cdt-patch@xxxxxxxxxxx'" <cdt-patch@xxxxxxxxxxx>
        cc:        
        Subject:        [cdt-patch] Some new Tests




Added  DomFailedTest::testBug36769
Added  DomFailedTest::testBug36771
Fixed AutomatedTest to handle files  with commas in their names
Added  ScannerTestCase::testBug36770
 
I also  cleaned up the ChangeLog, somewhere along the line there was a bad  merge.
 
-Andrew
 
 
 
 


#### patch_04.22(2).03(cdt.ui.tests).txt has been removed from this note on April 23, 2003 by Douglas Schaefer
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/ChangeLog,v
retrieving revision 1.37
diff -u -r1.37 ChangeLog
--- ChangeLog	22 Apr 2003 15:22:26 -0000	1.37
+++ ChangeLog	23 Apr 2003 17:07:48 -0000
@@ -1,205 +1,15 @@
-<<<<<<< ChangeLog
+2003-04-23 Andrew Niefer
+	Added ACEFailedTest::testBug36769
+	Added ACEFailedTest::testBug36771
+	Fixed AutomatedTest to handle files with commas in their names
+	Added ScannerTestCase::testBug36770
+	Cleaned up this change log
+	
 2003-04-21 John Camelon
 	Updated DOMTests::testBug36247(). 
 	Moved testBug36692(), testBug36703(), testBug36708(), testBug36707(), testBug36689()
 	and testBug36690() from DOMFailedTests to DOMTests and updated them. 
 
-2003-04-20 John Camelon
-	Added DOMTests::testBug36551().
-	Adjusted AutomatedTest to turn on line numbering. 
-	Added DOMFailedTests and 11 failed test cases.  
-
-2003-04-17 Andrew Niefer
-	Added ScannerTestCase::testBug36695()
-	Moved ScannerFailedTest::testBug36521 to ScannerTestCase::testBug36521()
-	Moved ScannerFailedTest::testBug36509 to ScannerTestCase::testBug36509()
-	Moved ScannerFailedTest::testBug36475 to ScannerTestCase::testBug36475() 
-	Updated ScannerTestCase::testBug36047
-	Updated ScannerTestCase::testBug36045
-
-2003-04-17 John Camelon
-	Updated DOMTests::testBug36600().
-	Updated LineNumberTest::testDOMLineNos().  
-	Added DOMTests::testBug36559().  
-
-2003-04-17 Andrew Niefer
-	Added AutomatedTest
-	Added resources.cFiles
-	Added resources.cppFiles
-
-2003-04-16 John Camelon
-	Added DOMTests::testBug36532().
-	Added DOMTests::testBug36432(). 
-	Added DOMTests::testBug36594().
-	Added DOMTests::testBug36600(). 
-	Added DOMTests::testArrayOfPointerToFunctions(). 
-
-2003-04-15 John Camelon
-	Added ScannerTestCase::testBug36434().
-	Added ScannerTestCase::testMultipleLines(). 
-	Added ParserTestSuite. 
-	Added LineNumberTest.
-	Updated CModelElementsTests to set the Nature of the C++ project appropriately.
-
-2003-04-15 Andrew Niefer
-	Moved ScannerFailedTest::testBug36047 to ScannerTestCase::testBug36047
-	Added ScannerFailedTest::testBug36475
-
-2003-04-13 John Camelon
-	Added DOMTests::testPointersToFunctions.  
-
-2003-04-11 John Camelon
-	Added DOMTests::testBug36247().  
-
-2003-04-11 Andrew Niefer
-	Moved ScannerFailedTest::testBug36316 to ScannerTestCase::testBug36316
-	Added ScannerFailedTest::testBug36047
-	Added ScannerTestCase::testNestedRecursiveDefines
-
-2003-04-10 John Camelon
-	Added DOMTests::testBug36237().
-
-2003-04-09 John Camelon
-	Removed all the old Code Model Builder source that was no longer being used (NewModelBuilder.java, etc.). 
-	Moved all the files in parser.util directory to the dom.  
-	Organized imports. 
-	Added DOMTests::testTemplateDeclarationOfMethod().
-	Added DOMTests::testBug36250().  
-	Added DOMTests::testBug36240(). 
-	Added DOMTests::testBug36254().
-
-2003-04-09 John Camelon
-	Updated ScannerTest::testBug36045().
-	Added ScannerTest::testBug36287().
-	Added DOMTests::testBug36288(). 
-
-2003-04-06 Andrew Niefer
-	Added ParserSymbolTableTest::testOverloadRanking()
-
-2003-04-04 Alain Magloire
-	* src/org/eclipse/cdt/testplugin/util/VerifyDialog.java:
-	Remove some warnings.
-
-2003-04-03 John Camelon
-	Updated ScannerTest::testSimpleIfdef() for bug36019.  
-	Updated ScannerTest::testNumerics() for bug36020.  
-	Added ScannerTest::testBug36045().  
-	Updated DOMTests::testTemplateDeclaration() for template grammar updates.  
-
-2003-04-01 Andrew Niefer
-	ParserSymbolTableTest. modifications to using declaration tests to reflect changes in the
-	symbol table.  Also added testUserDefinedConversionSequences()
-
-2003-04-01 John Camelon
-	Added testBug35906() to DOMTests.
-
-2003-03-31 John Camelon
-	Added testStruct() to DOMTests.  
-	Added test35892()to ScannerTest. 
-
-2003-03-31 Andrew Niefer
-	In ParserSymbolTableTest, renamed testFunctionResolution_2() to testFunctionResolution_PointersAndBaseClasses(),
-	and modified to reflect changes in function resolution.  
-	Added testFunctionResolution_TypedefsAndPointers().
-	
-2003-03-31 John Camelon
-	Added testWeirdStrings() and testNumerics() to ScannerTestCase. 
-	Added testTemplateSpecialization(), testTemplateDeclaration(), testBug26467(), 
-	  testTypedef() and testTemplateInstantiation() to DOMTests.
-
-2003-03-28 John Camelon
-	Added testConstructorChain() and testASMDefinition() to DOMTests.
-
-2003-03-27 Alain Magloire
-	Changes were done in the Core Model API, the hierarchy is now
-	ICModel
-		ICProject
-			ICContainer
-				ITranslationUnit
-				IArchive
-				IBinary
-	We adjust the tests.
-	* model/org/eclipse/cdt/core/model/tests/ArchiveTests.java
-	* model/org/eclipse/cdt/core/model/tests/BinaryTests.java
-	* model/org/eclipse/cdt/core/model/tests/TranslationUniTests.java
-	* model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java
-
-2003-03-26 Andrew Niefer
-	In ParserSymbolTableTest : 
-		updated all tests to reflect TypeInfo changes
-		Added testFunctionResolution() & testFunctionResolution_2() in
-
-2003-03-25 John Camelon
-	Added testDeclSpecifier(), testNamespaceDefinition(), testLinkageSpecification(), 
-	testUsingClauses() and testEnumSpecifier() to DOMTests.
-
-2003-03-23 John Camelon
-	Added ptrOperator() test to DOMTests.  
-	Added testFunctionModifiers() test to DOMTests.
-	Added testArrays() test to DOMTests.
-
-2003-03-20 Alain Magloire
-
-	Patch from Amer Hoda, tests for the CElement deltas for Translation Units.
-	* model/org/eclipse/cdt/core/model/tests/ElementDeltaTest.java
-	* model/org/eclipse/cdt/core/model/tests/resource/WorkingCopyTestStart.h
-	
-2003-03-19 Alain Magloire
-	Patch from Amer Hoda, introducing a simple test for the core model.
-	* model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java
-	* model/org/eclipse/cdt/core/model/tests/resource/WorkingCopyTestStart.h
-
-2003-03-18 John Camelon
-	Updated DOMTests to validate simple case of a function declaration with multiple parameters.  
-	* parser/org/eclipse/cdt/core/parser/tests/DOMTests.java
-
-2003-03-11 John Camelon
-	Updated DOMTests for core.internal.parser change of merging DeclarationSpecifier and DeclSpecifier
-	Organized imports
-	* parser/org/eclipse/cdt/core/parser/tests/DOMTests.java
-	* parser/org/eclipse/cdt/core/parser/tests/ParserSymbolTableTest.java
-
-2003-03-10 John Camelon
-	Added macro pasting tests
-
-2003-03-06 Andrew Niefer
-	Added tests for exercising Namespaces & using directives in new parser's symbol table
-
-2003-03-04 Doug Schaefer
-	This is a pretty big patch, but it is the merge of the NewParser1 branch into the HEAD branch.  lder "parser") 
-	JUnit tests for testing various pieces (source folder "parser" in cdt.ui.tests. 
-
-2003-01-29 Peter Graves
-
-    Fixed the warnings when accessing static methods
-    * src/org/eclipse/cdt/testplugin/util/DialogCheck.java:
-    * src/org/eclipse/cdt/testplugin/CTestPlugin.java
-    * src/org/eclipse/cdt/testplugin/TestWorkbench.java
-    * ChangeLog: make all entries have the same formatting
-
-2002-12-17 Peter Graves
-
-    * plugin.xml,test.xml: Some simple cleanups to remove refrences to the jdt and
-	to move closer to automated running
-    
-2002-11-27 Alain Magloire
-
-	* model/org/eclipse/cdt/core/model/tests/CModelTests.java:
-	Use CoreModel.getDefault().
-
-2002-10-30 Alain Magloire
-
-	* model/org/eclipse/cdt/core/model/tests/CModelTests.java (testGetNatureID):
-	The fields and the methods use in this test was removed from the CoreModel class.
-	(testHasNature): The method use in this case was refactor in the classes
-	CProjectNature and CCProjectNature, fix the test.
-
-2002-10-18 Peter Graves
-
-	src/org/eclipse/cdt/testplugin/CProjectHelper.jada
-    Cleanup of the CProjectHelper file to remove unused imports, commeted out code etc.
-    
-=======
 2003-04-21 Andrew Niefer
 	Added DOMFailedTests::testBug36713()
 	Added DOMFailedTests::testBug36714()
Index: failures/org/eclipse/cdt/core/parser/failedTests/ACEFailedTest.java
===================================================================
RCS file: failures/org/eclipse/cdt/core/parser/failedTests/ACEFailedTest.java
diff -N failures/org/eclipse/cdt/core/parser/failedTests/ACEFailedTest.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ failures/org/eclipse/cdt/core/parser/failedTests/ACEFailedTest.java	23 Apr 2003 17:07:48 -0000
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v0.5 
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v05.html
+ * 
+ * Contributors:
+ *     IBM Corp. - Rational Software - initial implementation
+ ******************************************************************************/
+package org.eclipse.cdt.core.parser.failedTests;
+
+import java.io.StringWriter;
+import java.io.Writer;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.parser.tests.DOMTests;
+import org.eclipse.cdt.internal.core.dom.TranslationUnit;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+
+
+/**
+ * @author aniefer
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class ACEFailedTest extends DOMTests {
+
+	/**
+	 * @param arg
+	 */
+	public ACEFailedTest(String arg) {
+		super(arg);
+	}
+	public static Test suite() {
+		TestSuite suite = new TestSuite();
+
+		suite.addTest(new ACEFailedTest("testBug36769"));
+		suite.addTest(new ACEFailedTest("testBug36771"));
+		return suite;
+	}
+	
+	public void testBug36771(){
+		boolean testPassed = false;
+		try{
+			Writer code = new StringWriter();
+			code.write("#include /**/ \"foo.h\"\n");
+			TranslationUnit tu = parse( code.toString());
+			testPassed = true;
+		} catch( Throwable e ){
+			if( ! (e instanceof ParserException))
+				fail( "Unexpected Error: " + e.getMessage() );
+		}
+		if( testPassed )
+			fail( "The expected error did not occur.");		
+	}
+	
+	public void testBug36769(){
+		boolean testPassed = false;
+		try{
+			Writer code = new StringWriter();
+			code.write("template <class A, B> cls<A, C>::operator op &() const {}\n");
+			code.write("template <class A, B> cls<A, C>::cls() {}\n");
+			code.write("template <class A, B> cls<A, C>::~cls() {}\n");
+			
+			TranslationUnit tu = parse( code.toString());
+			testPassed = true;
+		} catch( Throwable e ){
+			if( ! (e instanceof ParserException))
+				fail( "Unexpected Error: " + e.getMessage() );
+		}
+		if( testPassed )
+			fail( "The expected error did not occur.");
+	}
+}
Index: parser/org/eclipse/cdt/core/parser/tests/AutomatedTest.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/parser/org/eclipse/cdt/core/parser/tests/AutomatedTest.java,v
retrieving revision 1.3
diff -u -r1.3 AutomatedTest.java
--- parser/org/eclipse/cdt/core/parser/tests/AutomatedTest.java	21 Apr 2003 18:34:42 -0000	1.3
+++ parser/org/eclipse/cdt/core/parser/tests/AutomatedTest.java	23 Apr 2003 17:07:48 -0000
@@ -187,7 +187,7 @@
 					}
 					
 					fileList.add( file );
-					suite.addTest( new AutomatedTest( file.getName() ) );
+					suite.addTest( new AutomatedTest( file.getName().replaceAll(",", "_") ) );
 				}				
 				file = files[ i++ ];
 			}
Index: parser/org/eclipse/cdt/core/parser/tests/ScannerTestCase.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/parser/org/eclipse/cdt/core/parser/tests/ScannerTestCase.java,v
retrieving revision 1.15
diff -u -r1.15 ScannerTestCase.java
--- parser/org/eclipse/cdt/core/parser/tests/ScannerTestCase.java	21 Apr 2003 18:04:52 -0000	1.15
+++ parser/org/eclipse/cdt/core/parser/tests/ScannerTestCase.java	23 Apr 2003 17:07:49 -0000
@@ -1416,4 +1416,21 @@
 		validateToken(Token.tRPAREN); 
 		validateToken(Token.tSEMI); 
 	}
+	
+	public void testBug36770() throws Exception
+	{
+		StringWriter writer = new StringWriter();
+		writer.write( "#define A 0\n" );
+		writer.write( "#if ( A == 1 )\n");
+		writer.write( "#  define foo 1\n");
+		writer.write( "#else\n");
+		writer.write( "# define foo 2\n");
+		writer.write( "#endif\n");
+		writer.write( "foo\n");
+	
+		initializeScanner( writer.toString() );
+		validateInteger( "2" );
+		validateEOF();
+	}
+		
 }

Back to the top