Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-patch] Tests for org.eclipde.cdt.core

----- Original Message -----
From: "Sebastien Marineau" <sebastien@xxxxxxx>
To: <cdt-patch@xxxxxxxxxxx>
Sent: Monday, September 16, 2002 8:11 AM
Subject: RE: [cdt-patch] Tests for org.eclipde.cdt.core


> Thanks Peter. I've integrated your source into the .tests
> tree and commited it. I had to make one change -- the plugin.xml
> referred to some com.qnx.* plugins. I don't think these were needed
> (the tests compile without them), so I believe this was just
> an artifact of your environment.
Yes, I thought I had cleaned up these refrences, but I guess I missed some.
Thanks.
>
> Also, I noticed that you refer to specific problem
> reports in your tests. These are internal QNX PR numbers, which
> no one else can see. I think that we need to duplicate those PR's
> into the bugzilla database and have the JUnit tests refer to the
> bugzilla bug ID's.
I have done the duplication, and attached is a patch with the updates to the
tests to refrence the new bugzilla ids (23601, 23602, 23603)

Thanks
  Peter
>
> In any case, this is really good work, and I'd like to support Thomas's
> proposal that you become a commiter for the core.ui.tests
> and debug.ui.tests plugins.
>
> Sebastien



Index: model/org/eclipse/cdt/core/model/tests/ArchiveTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/ArchiveTests.java,v
retrieving revision 1.1
diff -u -r1.1 ArchiveTests.java
--- model/org/eclipse/cdt/core/model/tests/ArchiveTests.java	15 Sep 2002 20:28:53 -0000	1.1
+++ model/org/eclipse/cdt/core/model/tests/ArchiveTests.java	16 Sep 2002 14:40:26 -0000
@@ -154,7 +154,7 @@
         } catch  (IllegalArgumentException e) {
             caught=true;
         }
-        assertTrue("PR:12037 Created an archive with a C file", caught);
+        assertTrue("PR:23601  Created an archive with a C file", caught);
         myArchive=null;
         caught=false;
         try {
Index: model/org/eclipse/cdt/core/model/tests/BinaryTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/model/org/eclipse/cdt/core/model/tests/BinaryTests.java,v
retrieving revision 1.1
diff -u -r1.1 BinaryTests.java
--- model/org/eclipse/cdt/core/model/tests/BinaryTests.java	15 Sep 2002 20:28:53 -0000	1.1
+++ model/org/eclipse/cdt/core/model/tests/BinaryTests.java	16 Sep 2002 14:40:27 -0000
@@ -198,7 +198,7 @@
         } catch  (IllegalArgumentException e) {
             caught=true;
         }
-        assertTrue("PR:13037 Created an Binary with a C file", caught);
+        assertTrue("PR:23601  Created an Binary with a C file", caught);
         myBinary=null;
         caught=false;
         try {
@@ -331,12 +331,12 @@
              * Since there is no comment on this function, I have no idea what 
              * it is ment to do.  Once I find out what it's ment to do, I will
              * actually write some tests.
-             * PR13052
+             * PR23602 
              */
             assertTrue("Expected 76 Got: " + bigBinary.getData(), bigBinary.getData()==76);
             assertTrue("Expected 8, Got: " + littleBinary.getData(), littleBinary.getData()==8);                
         } else
-            fail("PR:13052 No docs, can't test");
+            fail("PR:23602  No docs, can't test");
     }
 
     /***
@@ -423,13 +423,13 @@
              * Since there is no comment on this function, I have no idea what 
              * it is ment to do.  Once I find out what it's ment to do, I will
              * actually write some tests.
-             * PR13052
+             * PR23602 
              */
 
             assertTrue("Expected 296, Got: " + bigBinary.getText(), bigBinary.getText()==296);
             assertTrue("Expected 296, Got: " + littleBinary.getText(), littleBinary.getText()==296);                
         } else
-            fail("PR:13052 No docs, can't test");
+            fail("PR:23602  No docs, can't test");
     }
     
     /***
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.1
diff -u -r1.1 TranslationUnitTests.java
--- model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java	15 Sep 2002 20:28:53 -0000	1.1
+++ model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java	16 Sep 2002 14:40:26 -0000
@@ -196,7 +196,7 @@
         } catch  (IllegalArgumentException e) {
             caught=true;
         }
-        assertTrue("PR:13037 Created an TranslationUnit with a .o file", caught);
+        assertTrue("PR:23601  Created an TranslationUnit with a .o file", caught);
         myTranslationUnit=null;
         caught=false;
         try {
@@ -293,7 +293,7 @@
                 expectedString.foundString(elements[x].getElementName());
             }
         }
-        assertTrue("PR:13062 " +expectedString.getMissingString(),expectedString.gotAll());
+        assertTrue("PR:23603 " +expectedString.getMissingString(),expectedString.gotAll());
         assertTrue(expectedString.getExtraString(),!expectedString.gotExtra());
     
     }
@@ -319,7 +319,7 @@
             
         }
         if (!missing.empty()) {
-            String output=new String("PR: 13062 Could not get elements: ");
+            String output=new String("PR: 23603 Could not get elements: ");
             while (!missing.empty())
                 output+=missing.pop() + " ";
             assertTrue(output, false);
@@ -342,7 +342,7 @@
                 missing.push(expectedStringList[x]);
             else {
                 if (expectedStringList[x].equals("mystruct_t")) {
-                    assertTrue("PR: 13062 expected:" + expectedStringList[x] + " Got:" + myElement.getElementName(),
+                    assertTrue("PR: 23603 expected:" + expectedStringList[x] + " Got:" + myElement.getElementName(),
                         expectedStringList[x].equals(myElement.getElementName()));
                 } else {
                     assertTrue("Expected:" + expectedStringList[x] + " Got:" + myElement.getElementName(),
@@ -353,7 +353,7 @@
             
         }
         if (!missing.empty()) {
-            String output=new String("PR: 13062 Could not get elements: ");
+            String output=new String("PR: 23603 Could not get elements: ");
             while (!missing.empty())
                 output+=missing.pop() + " ";
             assertTrue(output, false);
@@ -374,7 +374,7 @@
             if (myInclude==null)
                 fail("Unable to get include: " + includes[x]);
             else
-                assertTrue("PR:BZ23478 Expected:"+includes[x] +" Got:"+ myInclude.getIncludeName(), includes[x].equals(myInclude.getIncludeName()));
+                assertTrue("PR:23478 Expected:"+includes[x] +" Got:"+ myInclude.getIncludeName(), includes[x].equals(myInclude.getIncludeName()));
         }
         
 
@@ -388,7 +388,7 @@
         ExpectedStrings myExp= new ExpectedStrings(includes);
         int x;
         TranslationUnit myTranslationUnit=CProjectHelper.findTranslationUnit(testProject,"exetest.c");
-        fail("Unable to test because we can't get the name of an include file (PR: BZ23478"); 
+        fail("Unable to test because we can't get the name of an include file (PR: 23478"); 
                 
         myIncludes=myTranslationUnit.getIncludes();
         for (x=0;x<myIncludes.length;x++) {

Back to the top