lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r418904 - in /incubator/lucene.net/trunk/C#/src/Test: Index/TestMultiReader.cs Index/TestParallelReader.cs Index/TestSegmentReader.cs Index/TestSegmentTermDocs.cs Index/TestTermVectorsWriter.cs QueryParser/TestMultiAnalyzer.cs
Date Tue, 04 Jul 2006 03:13:38 GMT
Author: aroush
Date: Mon Jul  3 20:13:37 2006
New Revision: 418904

URL: http://svn.apache.org/viewvc?rev=418904&view=rev
Log: (empty)

Modified:
    incubator/lucene.net/trunk/C#/src/Test/Index/TestMultiReader.cs
    incubator/lucene.net/trunk/C#/src/Test/Index/TestParallelReader.cs
    incubator/lucene.net/trunk/C#/src/Test/Index/TestSegmentReader.cs
    incubator/lucene.net/trunk/C#/src/Test/Index/TestSegmentTermDocs.cs
    incubator/lucene.net/trunk/C#/src/Test/Index/TestTermVectorsWriter.cs
    incubator/lucene.net/trunk/C#/src/Test/QueryParser/TestMultiAnalyzer.cs

Modified: incubator/lucene.net/trunk/C#/src/Test/Index/TestMultiReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Index/TestMultiReader.cs?rev=418904&r1=418903&r2=418904&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Index/TestMultiReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Index/TestMultiReader.cs Mon Jul  3 20:13:37 2006
@@ -59,7 +59,7 @@
 		}
 		
 		[Test]
-        public virtual void  TestDocument()
+        public virtual void  TestDocument()     // {{Aroush-1.9}} this test will fail if
run within the group
 		{
 			sis.Read(dir);
 			MultiReader reader = new MultiReader(dir, sis, false, readers);

Modified: incubator/lucene.net/trunk/C#/src/Test/Index/TestParallelReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Index/TestParallelReader.cs?rev=418904&r1=418903&r2=418904&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Index/TestParallelReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Index/TestParallelReader.cs Mon Jul  3 20:13:37
2006
@@ -77,9 +77,13 @@
 
         public static bool CollectionContains(System.Collections.ICollection col, System.String
val)
         {
-            foreach (object item in col)
-                if (item.ToString() == val)
+            for (System.Collections.IEnumerator iterator = col.GetEnumerator(); iterator.MoveNext();
)
+            {
+                System.Collections.DictionaryEntry fi = (System.Collections.DictionaryEntry)
iterator.Current;
+                System.String s = fi.Key.ToString();
+                if (s == val)
                     return true;
+            }
             return false;
         }
 		

Modified: incubator/lucene.net/trunk/C#/src/Test/Index/TestSegmentReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Index/TestSegmentReader.cs?rev=418904&r1=418903&r2=418904&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Index/TestSegmentReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Index/TestSegmentReader.cs Mon Jul  3 20:13:37
2006
@@ -56,7 +56,7 @@
 		}
 		
 		[Test]
-        public virtual void  TestDocument()
+        public virtual void  TestDocument()     // {{Aroush-1.9}} this test failes when run
as a group
 		{
 			Assert.IsTrue(reader.NumDocs() == 1);
 			Assert.IsTrue(reader.MaxDoc() >= 1);
@@ -106,7 +106,8 @@
 			Assert.IsTrue(result.Count == DocHelper.all.Count);
 			for (System.Collections.IEnumerator iter = result.GetEnumerator(); iter.MoveNext(); )
 			{
-				System.String s = (System.String) iter.Current;
+                System.Collections.DictionaryEntry fi = (System.Collections.DictionaryEntry)
iter.Current;
+				System.String s = fi.Key.ToString();
 				//System.out.println("Name: " + s);
 				Assert.IsTrue(DocHelper.nameValues.Contains(s) == true || s.Equals(""));
 			}
@@ -115,8 +116,9 @@
 			Assert.IsTrue(result.Count == DocHelper.indexed.Count);
 			for (System.Collections.IEnumerator iter = result.GetEnumerator(); iter.MoveNext(); )
 			{
-				System.String s = (System.String) iter.Current;
-				Assert.IsTrue(DocHelper.indexed.Contains(s) == true || s.Equals(""));
+                System.Collections.DictionaryEntry fi = (System.Collections.DictionaryEntry)
iter.Current;
+                System.String s = fi.Key.ToString();
+                Assert.IsTrue(DocHelper.indexed.Contains(s) == true || s.Equals(""));
 			}
 			
 			result = reader.GetFieldNames(IndexReader.FieldOption.UNINDEXED);

Modified: incubator/lucene.net/trunk/C#/src/Test/Index/TestSegmentTermDocs.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Index/TestSegmentTermDocs.cs?rev=418904&r1=418903&r2=418904&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Index/TestSegmentTermDocs.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Index/TestSegmentTermDocs.cs Mon Jul  3 20:13:37
2006
@@ -30,6 +30,7 @@
 	{
 		private Lucene.Net.Documents.Document testDoc = new Lucene.Net.Documents.Document();
 		private Directory dir = new RAMDirectory();
+        static int val = 0;
 		
 		
 		[SetUp]
@@ -52,8 +53,14 @@
 		}
 		
 		[Test]
-        public virtual void  TestTermDocs()
+        public virtual void  TestTermDocs()     // {{Aroush-1.9}} this test is failing when
run as a group
 		{
+            // {{Aroush-1.9}} unless if we add the following 4 lines
+		    Lucene.Net.Documents.Document testDoc = new Lucene.Net.Documents.Document();
+		    Directory dir = new RAMDirectory();
+            DocHelper.SetupDoc(testDoc);
+            DocHelper.WriteDoc(dir, testDoc);
+
 			//After adding the document, we should be able to read it back in
 			SegmentReader reader = SegmentReader.Get(new SegmentInfo("test", 1, dir));
 			Assert.IsTrue(reader != null);
@@ -65,7 +72,8 @@
 				int docId = segTermDocs.Doc();
 				Assert.IsTrue(docId == 0);
 				int freq = segTermDocs.Freq();
-				Assert.IsTrue(freq == 3);
+                System.Console.Out.WriteLine("freq: " + freq);
+				Assert.IsTrue(freq == 3);       // {{Aroush-1.9}} this is the assert that fails; because
'freq' is 12
 			}
 			reader.Close();
 		}

Modified: incubator/lucene.net/trunk/C#/src/Test/Index/TestTermVectorsWriter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Index/TestTermVectorsWriter.cs?rev=418904&r1=418903&r2=418904&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Index/TestTermVectorsWriter.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Index/TestTermVectorsWriter.cs Mon Jul  3 20:13:37
2006
@@ -65,7 +65,7 @@
 		}
 		
 		[Test]
-        public virtual void  Test()
+        public virtual void  Test()             // {{Aroush-1.9}} this test is failing
 		{
 			Assert.IsTrue(dir != null);
 			Assert.IsTrue(positions != null);
@@ -100,7 +100,7 @@
 		}  */
 		
 		[Test]
-        public virtual void  TestWriter()
+        public virtual void  TestWriter()           // {{Aroush-1.9}} this test is failing
 		{
 			TermVectorsWriter writer = new TermVectorsWriter(dir, seg, fieldInfos);
 			writer.OpenDocument();
@@ -135,7 +135,7 @@
 		/// <summary> Test one document, multiple fields</summary>
 		/// <throws>  IOException </throws>
 		[Test]
-        public virtual void  TestMultipleFields()
+        public virtual void  TestMultipleFields()       // {{Aroush-1.9}} this test is failing
 		{
 			TermVectorsWriter writer = new TermVectorsWriter(dir, seg, fieldInfos);
 			WriteDocument(writer, testFields.Length);
@@ -187,7 +187,7 @@
 		}
 		
 		[Test]
-		public virtual void  TestMultipleDocuments()
+		public virtual void  TestMultipleDocuments()        // {{Aroush-1.9}} this test is failing
 		{
 			TermVectorsWriter writer = new TermVectorsWriter(dir, seg, fieldInfos);
 			Assert.IsTrue(writer != null);
@@ -214,7 +214,7 @@
 		/// <summary> 
 		/// </summary>
 		[Test]
-        public virtual void  TestBadSegment()
+        public virtual void  TestBadSegment()       // {{Aroush-1.9}} this test is failing
 		{
 			dir = new RAMDirectory();
 			IndexWriter ir = new IndexWriter(dir, new StandardAnalyzer(), true);

Modified: incubator/lucene.net/trunk/C#/src/Test/QueryParser/TestMultiAnalyzer.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/QueryParser/TestMultiAnalyzer.cs?rev=418904&r1=418903&r2=418904&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/QueryParser/TestMultiAnalyzer.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/QueryParser/TestMultiAnalyzer.cs Mon Jul  3 20:13:37
2006
@@ -42,7 +42,7 @@
 		private static int multiToken = 0;
 		
 		[Test]
-        public virtual void  TestMultiAnalyzer_Renamed_Method()
+        public virtual void  TestMultiAnalyzer_Renamed_Method()     // {{Aroush-1.9}} this
test is failing
 		{
 			
 			Lucene.Net.QueryParsers.QueryParser qp = new Lucene.Net.QueryParsers.QueryParser("", new
MultiAnalyzer(this));



Mime
View raw message