lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r568387 - in /incubator/lucene.net/trunk/C#/src/Test/Search: QueryUtils.cs TestBoolean2.cs
Date Wed, 22 Aug 2007 03:01:45 GMT
Author: aroush
Date: Tue Aug 21 20:01:44 2007
New Revision: 568387

URL: http://svn.apache.org/viewvc?rev=568387&view=rev
Log:
Fix: LUCENENET-59 "QueryUtils has some invalid Asserts"

Modified:
    incubator/lucene.net/trunk/C#/src/Test/Search/QueryUtils.cs
    incubator/lucene.net/trunk/C#/src/Test/Search/TestBoolean2.cs

Modified: incubator/lucene.net/trunk/C#/src/Test/Search/QueryUtils.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Search/QueryUtils.cs?rev=568387&r1=568386&r2=568387&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Search/QueryUtils.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Search/QueryUtils.cs Tue Aug 21 20:01:44 2007
@@ -105,13 +105,14 @@
 		
 		public static void  CheckEqual(Query q1, Query q2)
 		{
-			Assert.AreEqual(q1, q2);
+			Assert.AreEqual(q1.ToString(), q2.ToString());
 			Assert.AreEqual(q1.GetHashCode(), q2.GetHashCode());
 		}
 		
 		public static void  CheckUnequal(Query q1, Query q2)
 		{
             Assert.IsTrue(q1.ToString() != q2.ToString());
+            Assert.IsTrue(q2.ToString() != q1.ToString());
 			
 			// possible this test can fail on a hash collision... if that
 			// happens, please change test to use a different example.

Modified: incubator/lucene.net/trunk/C#/src/Test/Search/TestBoolean2.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Search/TestBoolean2.cs?rev=568387&r1=568386&r2=568387&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Search/TestBoolean2.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Search/TestBoolean2.cs Tue Aug 21 20:01:44 2007
@@ -281,6 +281,7 @@
 			}
 			if (cb != null)
 				cb.PostCreate(current);
+            ((System.Collections.ArrayList)current.Clauses()).TrimToSize();
 			return current;
 		}
 	}



Mime
View raw message