lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnas...@apache.org
Subject [Lucene.Net] svn commit: r1100459 [5/6] - in /incubator/lucene.net/branches/Lucene.Net_2_9_4g: ./ src/core/ src/core/Analysis/ src/core/Analysis/Standard/ src/core/Analysis/Tokenattributes/ src/core/Document/ src/core/Index/ src/core/QueryParser/ src/core/Search/ s...
Date Sat, 07 May 2011 06:22:27 GMT
Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestIndexWriterExceptions.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestIndexWriterExceptions.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestIndexWriterExceptions.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestIndexWriterExceptions.cs Sat May  7 06:22:20 2011
@@ -48,7 +48,7 @@ namespace Lucene.Net.Index
             return tvSettings[random.Next(tvSettings.Length)];
         }
 		
-		private class IndexerThread:SupportClass.ThreadClass
+		private class IndexerThread:Support.ThreadClass
 		{
 			private void  InitBlock(TestIndexWriterExceptions enclosingInstance)
 			{
@@ -110,7 +110,7 @@ namespace Lucene.Net.Index
 					{
 						if (Lucene.Net.Index.TestIndexWriterExceptions.DEBUG)
 						{
-							System.Console.Out.WriteLine(SupportClass.ThreadClass.CurrentThread().Name + ": EXC: ");
+							System.Console.Out.WriteLine(Support.ThreadClass.CurrentThread().Name + ": EXC: ");
 							System.Console.Out.WriteLine(re.StackTrace);
 						}
 						try
@@ -119,7 +119,7 @@ namespace Lucene.Net.Index
 						}
 						catch (System.IO.IOException ioe)
 						{
-							System.Console.Out.WriteLine(SupportClass.ThreadClass.Current().Name + ": unexpected exception1");
+							System.Console.Out.WriteLine(Support.ThreadClass.Current().Name + ": unexpected exception1");
 							System.Console.Out.WriteLine(ioe.StackTrace);
 							failure = ioe;
 							break;
@@ -127,7 +127,7 @@ namespace Lucene.Net.Index
 					}
 					catch (System.Exception t)
 					{
-						System.Console.Out.WriteLine(SupportClass.ThreadClass.Current().Name + ": unexpected exception2");
+						System.Console.Out.WriteLine(Support.ThreadClass.Current().Name + ": unexpected exception2");
 						System.Console.Out.WriteLine(t.StackTrace);
 						failure = t;
 						break;
@@ -144,7 +144,7 @@ namespace Lucene.Net.Index
 					}
 					catch (System.Exception t)
 					{
-						System.Console.Out.WriteLine(SupportClass.ThreadClass.Current().Name + ": unexpected exception3");
+						System.Console.Out.WriteLine(Support.ThreadClass.Current().Name + ": unexpected exception3");
 						System.Console.Out.WriteLine(t.StackTrace);
 						failure = t;
 						break;
@@ -183,10 +183,10 @@ namespace Lucene.Net.Index
 				{
 					if (Lucene.Net.Index.TestIndexWriterExceptions.DEBUG)
 					{
-						System.Console.Out.WriteLine(SupportClass.ThreadClass.Current().Name + ": NOW FAIL: " + name);
+						System.Console.Out.WriteLine(Support.ThreadClass.Current().Name + ": NOW FAIL: " + name);
 						//new Throwable().printStackTrace(System.out);
 					}
-					throw new System.SystemException(SupportClass.ThreadClass.Current().Name + ": intentionally failing at " + name);
+					throw new System.SystemException(Support.ThreadClass.Current().Name + ": intentionally failing at " + name);
 				}
 				return true;
 			}

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestIndexWriterLockRelease.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestIndexWriterLockRelease.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestIndexWriterLockRelease.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestIndexWriterLockRelease.cs Sat May  7 06:22:20 2011
@@ -43,7 +43,7 @@ namespace Lucene.Net.Index
 			base.SetUp();
 			if (this.__test_dir == null)
 			{
-				System.String tmp_dir = SupportClass.AppSettings.Get("java.io.tmpdir", "tmp");
+				System.String tmp_dir = Support.AppSettings.Get("java.io.tmpdir", "tmp");
 				this.__test_dir = new System.IO.FileInfo(System.IO.Path.Combine(tmp_dir, "testIndexWriter"));
 				
 				bool tmpBool;
@@ -79,7 +79,7 @@ namespace Lucene.Net.Index
 			base.TearDown();
 			if (this.__test_dir != null)
 			{
-				System.IO.FileInfo[] files = SupportClass.FileSupport.GetFiles(this.__test_dir);
+				System.IO.FileInfo[] files = Support.FileSupport.GetFiles(this.__test_dir);
 				
 				for (int i = 0; i < files.Length; ++i)
 				{

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestIndexWriterReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestIndexWriterReader.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestIndexWriterReader.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestIndexWriterReader.cs Sat May  7 06:22:20 2011
@@ -40,7 +40,7 @@ namespace Lucene.Net.Index
     [TestFixture]
 	public class TestIndexWriterReader:LuceneTestCase
 	{
-		private class AnonymousClassThread:SupportClass.ThreadClass
+		private class AnonymousClassThread:Support.ThreadClass
 		{
 			public AnonymousClassThread(long endTime, Lucene.Net.Index.IndexWriter writer, Lucene.Net.Store.Directory[] dirs, System.Collections.IList excs, TestIndexWriterReader enclosingInstance)
 			{
@@ -83,7 +83,7 @@ namespace Lucene.Net.Index
 				}
 			}
 		}
-		private class AnonymousClassThread1:SupportClass.ThreadClass
+		private class AnonymousClassThread1:Support.ThreadClass
 		{
 			public AnonymousClassThread1(long endTime, Lucene.Net.Index.IndexWriter writer, System.Collections.IList excs, TestIndexWriterReader enclosingInstance)
 			{
@@ -415,7 +415,7 @@ namespace Lucene.Net.Index
 		
 		private class DeleteThreads
 		{
-			private class AnonymousClassThread2:SupportClass.ThreadClass
+			private class AnonymousClassThread2:Support.ThreadClass
 			{
 				public AnonymousClassThread2(DeleteThreads enclosingInstance)
 				{
@@ -454,7 +454,7 @@ namespace Lucene.Net.Index
 			private void  InitBlock(TestIndexWriterReader enclosingInstance)
 			{
 				this.enclosingInstance = enclosingInstance;
-				threads = new SupportClass.ThreadClass[NUM_THREADS];
+				threads = new Support.ThreadClass[NUM_THREADS];
 			}
 			private TestIndexWriterReader enclosingInstance;
 			public TestIndexWriterReader Enclosing_Instance
@@ -466,7 +466,7 @@ namespace Lucene.Net.Index
 				
 			}
 			internal const int NUM_THREADS = 5;
-			internal SupportClass.ThreadClass[] threads;
+			internal Support.ThreadClass[] threads;
 			internal IndexWriter mainWriter;
 			internal System.Collections.IList deletedTerms = new System.Collections.ArrayList();
 			internal System.Collections.ArrayList toDeleteTerms = new System.Collections.ArrayList();
@@ -526,14 +526,14 @@ namespace Lucene.Net.Index
 					}
 					catch (System.Threading.ThreadInterruptedException ie)
 					{
-						SupportClass.ThreadClass.Current().Interrupt();
+						Support.ThreadClass.Current().Interrupt();
 					}
 			}
 		}
 		
 		private class AddDirectoriesThreads
 		{
-			private class AnonymousClassThread2:SupportClass.ThreadClass
+			private class AnonymousClassThread2:Support.ThreadClass
 			{
 				public AnonymousClassThread2(int numIter, AddDirectoriesThreads enclosingInstance)
 				{
@@ -585,7 +585,7 @@ namespace Lucene.Net.Index
 			private void  InitBlock(TestIndexWriterReader enclosingInstance)
 			{
 				this.enclosingInstance = enclosingInstance;
-				threads = new SupportClass.ThreadClass[NUM_THREADS];
+				threads = new Support.ThreadClass[NUM_THREADS];
 			}
 			private TestIndexWriterReader enclosingInstance;
 			public TestIndexWriterReader Enclosing_Instance
@@ -600,7 +600,7 @@ namespace Lucene.Net.Index
 			internal const int NUM_THREADS = 5;
 			internal const int NUM_INIT_DOCS = 100;
 			internal int numDirs;
-			internal SupportClass.ThreadClass[] threads;
+			internal Support.ThreadClass[] threads;
 			internal IndexWriter mainWriter;
 			internal System.Collections.IList failures = new System.Collections.ArrayList();
 			internal IndexReader[] readers;
@@ -638,7 +638,7 @@ namespace Lucene.Net.Index
 					}
 					catch (System.Threading.ThreadInterruptedException ie)
 					{
-						SupportClass.ThreadClass.Current().Interrupt();
+						Support.ThreadClass.Current().Interrupt();
 					}
 			}
 			
@@ -968,7 +968,7 @@ namespace Lucene.Net.Index
 			long endTime = (long) ((DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) + 1000.0 * SECONDS);
 			System.Collections.IList excs = (System.Collections.IList) System.Collections.ArrayList.Synchronized(new System.Collections.ArrayList(new System.Collections.ArrayList()));
 			
-			SupportClass.ThreadClass[] threads = new SupportClass.ThreadClass[NUM_THREAD];
+			Support.ThreadClass[] threads = new Support.ThreadClass[NUM_THREAD];
 			for (int i = 0; i < NUM_THREAD; i++)
 			{
 				threads[i] = new AnonymousClassThread(endTime, writer, dirs, excs, this);
@@ -1035,7 +1035,7 @@ namespace Lucene.Net.Index
             long endTime = (long)((DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) + 1000.0 * SECONDS);
             System.Collections.IList excs = (System.Collections.IList)System.Collections.ArrayList.Synchronized(new System.Collections.ArrayList(new System.Collections.ArrayList()));
 
-            SupportClass.ThreadClass[] threads = new SupportClass.ThreadClass[NUM_THREAD];
+            Support.ThreadClass[] threads = new Support.ThreadClass[NUM_THREAD];
             for (int i = 0; i < NUM_THREAD; i++)
             {
                 threads[i] = new AnonymousClassThread(endTime, writer, dirs, excs, this);
@@ -1091,7 +1091,7 @@ namespace Lucene.Net.Index
 			long endTime = (long) ((DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) + 1000.0 * SECONDS);
 			System.Collections.IList excs = (System.Collections.IList) System.Collections.ArrayList.Synchronized(new System.Collections.ArrayList(new System.Collections.ArrayList()));
 			
-			SupportClass.ThreadClass[] threads = new SupportClass.ThreadClass[NUM_THREAD];
+			Support.ThreadClass[] threads = new Support.ThreadClass[NUM_THREAD];
 			for (int i = 0; i < NUM_THREAD; i++)
 			{
 				threads[i] = new AnonymousClassThread1(endTime, writer, excs, this);

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestNRTReaderWithThreads.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestNRTReaderWithThreads.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestNRTReaderWithThreads.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestNRTReaderWithThreads.cs Sat May  7 06:22:20 2011
@@ -77,7 +77,7 @@ namespace Lucene.Net.Index
 			mainDir.Close();
 		}
 		
-		public class RunThread:SupportClass.ThreadClass
+		public class RunThread:Support.ThreadClass
 		{
 			private void  InitBlock(TestNRTReaderWithThreads enclosingInstance)
 			{

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestPayloads.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestPayloads.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestPayloads.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestPayloads.cs Sat May  7 06:22:20 2011
@@ -42,7 +42,7 @@ namespace Lucene.Net.Index
     [TestFixture]
 	public class TestPayloads:LuceneTestCase
 	{
-		private class AnonymousClassThread:SupportClass.ThreadClass
+		private class AnonymousClassThread:Support.ThreadClass
 		{
 			public AnonymousClassThread(int numDocs, System.String field, Lucene.Net.Index.TestPayloads.ByteArrayPool pool, Lucene.Net.Index.IndexWriter writer, TestPayloads enclosingInstance)
 			{
@@ -561,7 +561,7 @@ namespace Lucene.Net.Index
 			IndexWriter writer = new IndexWriter(dir, new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.LIMITED);
 			System.String field = "test";
 			
-			SupportClass.ThreadClass[] ingesters = new SupportClass.ThreadClass[numThreads];
+			Support.ThreadClass[] ingesters = new Support.ThreadClass[numThreads];
 			for (int i = 0; i < numThreads; i++)
 			{
 				ingesters[i] = new AnonymousClassThread(numDocs, field, pool, writer, this);

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestPositionBasedTermVectorMapper.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestPositionBasedTermVectorMapper.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestPositionBasedTermVectorMapper.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestPositionBasedTermVectorMapper.cs Sat May  7 06:22:20 2011
@@ -82,10 +82,10 @@ namespace Lucene.Net.Index
 				System.String token = tokens[i];
 				mapper.Map(token, 1, null, thePositions[i]);
 			}
-            SupportClass.Dictionary<String, SupportClass.Dictionary<int, PositionBasedTermVectorMapper.TVPositionInfo>> map = mapper.GetFieldToTerms();
+            Support.Dictionary<String, Support.Dictionary<int, PositionBasedTermVectorMapper.TVPositionInfo>> map = mapper.GetFieldToTerms();
 			Assert.IsTrue(map != null, "map is null and it shouldn't be");
 			Assert.IsTrue(map.Count == 1, "map Size: " + map.Count + " is not: " + 1);
-            SupportClass.Dictionary<int, PositionBasedTermVectorMapper.TVPositionInfo> positions = map["test"];
+            Support.Dictionary<int, PositionBasedTermVectorMapper.TVPositionInfo> positions = map["test"];
 			Assert.IsTrue(positions != null, "thePositions is null and it shouldn't be");
 			
 			Assert.IsTrue(positions.Count == numPositions, "thePositions Size: " + positions.Count + " is not: " + numPositions);
@@ -109,7 +109,7 @@ namespace Lucene.Net.Index
 					Assert.IsTrue(info.Offsets.Count == 1, "info.getOffsets() Size: " + info.Offsets.Count + " is not: " + 1);
 				}
 			}
-			Assert.IsTrue(SupportClass.BitSetSupport.Cardinality(bits) == numPositions, "Bits are not all on");
+			Assert.IsTrue(Support.BitSetSupport.Cardinality(bits) == numPositions, "Bits are not all on");
 		}
     }
 }
\ No newline at end of file

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestSnapshotDeletionPolicy.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestSnapshotDeletionPolicy.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestSnapshotDeletionPolicy.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestSnapshotDeletionPolicy.cs Sat May  7 06:22:20 2011
@@ -48,7 +48,7 @@ namespace Lucene.Net.Index
     [TestFixture]
 	public class TestSnapshotDeletionPolicy:LuceneTestCase
 	{
-		private class AnonymousClassThread:SupportClass.ThreadClass
+		private class AnonymousClassThread:Support.ThreadClass
 		{
 			public AnonymousClassThread(long stopTime, Lucene.Net.Index.IndexWriter writer, TestSnapshotDeletionPolicy enclosingInstance)
 			{
@@ -95,7 +95,7 @@ namespace Lucene.Net.Index
 					}
 					catch (System.Threading.ThreadInterruptedException ie)
 					{
-						SupportClass.ThreadClass.Current().Interrupt();
+						Support.ThreadClass.Current().Interrupt();
 						throw new System.SystemException("", ie);
 					}
 				}
@@ -106,7 +106,7 @@ namespace Lucene.Net.Index
         [Test]
 		public virtual void  TestSnapshotDeletionPolicy_Renamed()
 		{
-			System.IO.FileInfo dir = new System.IO.FileInfo(System.IO.Path.Combine(SupportClass.AppSettings.Get("tempDir", ""), INDEX_PATH));
+			System.IO.FileInfo dir = new System.IO.FileInfo(System.IO.Path.Combine(Support.AppSettings.Get("tempDir", ""), INDEX_PATH));
 			try
 			{
 				// Sometimes past test leaves the dir
@@ -176,7 +176,7 @@ namespace Lucene.Net.Index
 			// Force frequent commits
 			writer.SetMaxBufferedDocs(2);
 			
-			SupportClass.ThreadClass t = new AnonymousClassThread(stopTime, writer, this);
+			Support.ThreadClass t = new AnonymousClassThread(stopTime, writer, this);
 			
 			t.Start();
 			

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestStressIndexing.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestStressIndexing.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestStressIndexing.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestStressIndexing.cs Sat May  7 06:22:20 2011
@@ -38,7 +38,7 @@ namespace Lucene.Net.Index
 		private static readonly Analyzer ANALYZER = new SimpleAnalyzer();
 		private System.Random RANDOM;
 		
-		abstract public class TimedThread:SupportClass.ThreadClass
+		abstract public class TimedThread:Support.ThreadClass
 		{
 			internal bool failed;
 			internal int count;
@@ -68,7 +68,7 @@ namespace Lucene.Net.Index
 				}
 				catch (System.Exception e)
 				{
-					System.Console.Out.WriteLine(SupportClass.ThreadClass.Current() + ": exc");
+					System.Console.Out.WriteLine(Support.ThreadClass.Current() + ": exc");
 					System.Console.Out.WriteLine(e.StackTrace);
 					failed = true;
 				}

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestStressIndexing2.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestStressIndexing2.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestStressIndexing2.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestStressIndexing2.cs Sat May  7 06:22:20 2011
@@ -200,7 +200,7 @@ namespace Lucene.Net.Index
 				IndexingThread th = threads[i];
 				lock (th)
 				{
-					SupportClass.CollectionsHelper.AddAllIfNotContains(docs, th.docs);
+					Support.CollectionsHelper.AddAllIfNotContains(docs, th.docs);
 				}
 			}
 			
@@ -478,13 +478,13 @@ namespace Lucene.Net.Index
             System.Collections.Generic.IList<Lucene.Net.Documents.Fieldable> ff1 = d1.GetFields();
             System.Collections.Generic.IList<Lucene.Net.Documents.Fieldable> ff2 = d2.GetFields();
 			
-			SupportClass.CollectionsHelper.Sort(ff1, fieldNameComparator);
-			SupportClass.CollectionsHelper.Sort(ff2, fieldNameComparator);
+			Support.CollectionsHelper.Sort(ff1, fieldNameComparator);
+			Support.CollectionsHelper.Sort(ff2, fieldNameComparator);
 			
 			if (ff1.Count != ff2.Count)
 			{
-				System.Console.Out.WriteLine(SupportClass.CollectionsHelper.CollectionToString(ff1));
-				System.Console.Out.WriteLine(SupportClass.CollectionsHelper.CollectionToString(ff2));
+				System.Console.Out.WriteLine(Support.CollectionsHelper.CollectionToString(ff1));
+				System.Console.Out.WriteLine(Support.CollectionsHelper.CollectionToString(ff2));
 				Assert.AreEqual(ff1.Count, ff2.Count);
 			}
 			
@@ -505,8 +505,8 @@ namespace Lucene.Net.Index
 					if (!s1.Equals(s2))
 					{
 						// print out whole doc on error
-						System.Console.Out.WriteLine(SupportClass.CollectionsHelper.CollectionToString(ff1));
-						System.Console.Out.WriteLine(SupportClass.CollectionsHelper.CollectionToString(ff2));
+						System.Console.Out.WriteLine(Support.CollectionsHelper.CollectionToString(ff1));
+						System.Console.Out.WriteLine(Support.CollectionsHelper.CollectionToString(ff2));
 						Assert.AreEqual(s1, s2);
 					}
 				}
@@ -573,7 +573,7 @@ namespace Lucene.Net.Index
 			}
 		}
 		
-		internal class IndexingThread:SupportClass.ThreadClass
+		internal class IndexingThread:Support.ThreadClass
 		{
 			internal IndexWriter w;
 			internal int base_Renamed;
@@ -658,7 +658,7 @@ namespace Lucene.Net.Index
 			public virtual System.String GetUTF8String(int nTokens)
 			{
 				int upto = 0;
-				SupportClass.CollectionsHelper.Fill(buffer, (char) 0);
+				Support.CollectionsHelper.Fill(buffer, (char) 0);
 				for (int i = 0; i < nTokens; i++)
 					upto = AddUTF8Token(upto);
 				return new System.String(buffer, 0, upto);
@@ -726,7 +726,7 @@ namespace Lucene.Net.Index
 				
 				if (Lucene.Net.Index.TestStressIndexing2.sameFieldOrder)
 				{
-					SupportClass.CollectionsHelper.Sort(fields, Lucene.Net.Index.TestStressIndexing2.fieldNameComparator);
+					Support.CollectionsHelper.Sort(fields, Lucene.Net.Index.TestStressIndexing2.fieldNameComparator);
 				}
 				else
 				{

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestThreadedOptimize.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestThreadedOptimize.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestThreadedOptimize.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestThreadedOptimize.cs Sat May  7 06:22:20 2011
@@ -36,7 +36,7 @@ namespace Lucene.Net.Index
     [TestFixture]
 	public class TestThreadedOptimize:LuceneTestCase
 	{
-		private class AnonymousClassThread:SupportClass.ThreadClass
+		private class AnonymousClassThread:Support.ThreadClass
 		{
 			public AnonymousClassThread(Lucene.Net.Index.IndexWriter writerFinal, int iFinal, int iterFinal, TestThreadedOptimize enclosingInstance)
 			{
@@ -83,7 +83,7 @@ namespace Lucene.Net.Index
 				catch (System.Exception t)
 				{
 					Enclosing_Instance.setFailed();
-					System.Console.Out.WriteLine(SupportClass.ThreadClass.Current().Name + ": hit exception");
+					System.Console.Out.WriteLine(Support.ThreadClass.Current().Name + ": hit exception");
 					System.Console.Out.WriteLine(t.StackTrace);
 				}
 			}
@@ -134,7 +134,7 @@ namespace Lucene.Net.Index
 				
 				int docCount = writer.DocCount();
 				
-				SupportClass.ThreadClass[] threads = new SupportClass.ThreadClass[NUM_THREADS];
+				Support.ThreadClass[] threads = new Support.ThreadClass[NUM_THREADS];
 				
 				for (int i = 0; i < NUM_THREADS; i++)
 				{
@@ -186,7 +186,7 @@ namespace Lucene.Net.Index
 			runTest(directory, true, new ConcurrentMergeScheduler());
 			directory.Close();
 			
-			System.String tempDir = SupportClass.AppSettings.Get("tempDir", "");
+			System.String tempDir = Support.AppSettings.Get("tempDir", "");
 			if (tempDir == null)
 				throw new System.IO.IOException("tempDir undefined, cannot run test");
 			

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestTransactionRollback.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestTransactionRollback.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestTransactionRollback.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestTransactionRollback.cs Sat May  7 06:22:20 2011
@@ -107,7 +107,7 @@ namespace Lucene.Net.Index
 				}
 			}
 			r.Close();
-			Assert.AreEqual(0, SupportClass.BitSetSupport.Cardinality(expecteds), "Should have 0 docs remaining ");
+			Assert.AreEqual(0, Support.BitSetSupport.Cardinality(expecteds), "Should have 0 docs remaining ");
 		}
 		
 		/*

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestTransactions.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestTransactions.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestTransactions.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestTransactions.cs Sat May  7 06:22:20 2011
@@ -61,7 +61,7 @@ namespace Lucene.Net.Index
 			}
 		}
 		
-		abstract public class TimedThread:SupportClass.ThreadClass
+		abstract public class TimedThread:Support.ThreadClass
 		{
 			internal bool failed;
 			private static int RUN_TIME_SEC = 6;
@@ -85,7 +85,7 @@ namespace Lucene.Net.Index
 				}
 				catch (System.Exception e)
 				{
-					System.Console.Out.WriteLine(SupportClass.ThreadClass.Current() + ": exc");
+					System.Console.Out.WriteLine(Support.ThreadClass.Current() + ": exc");
 					System.Console.Out.WriteLine(e.StackTrace);
 					failed = true;
 				}

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Lucene.Net.Test.csproj
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Lucene.Net.Test.csproj?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Lucene.Net.Test.csproj (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Lucene.Net.Test.csproj Sat May  7 06:22:20 2011
@@ -434,6 +434,19 @@
     <Compile Include="Store\_TestHelper.cs">
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="Support\CollisionTester.cs" />
+    <Compile Include="Support\TestIDisposable.cs" />
+    <Compile Include="Support\TestLRUCache.cs" />
+    <Compile Include="Support\TestMediumTrust.cs" />
+    <Compile Include="Support\TestOldPatches.cs" />
+    <Compile Include="Support\TestOSClass.cs" />
+    <Compile Include="Support\TestSerialization.cs" />
+    <Compile Include="Support\TestThreadClass.cs" />
+    <Compile Include="Support\TestWeakHashTable.cs" />
+    <Compile Include="Support\TestWeakHashTableBehavior.cs" />
+    <Compile Include="Support\TestWeakHashTableMultiThreadAccess.cs" />
+    <Compile Include="Support\SupportTestCases.cs" />
+    <Compile Include="Support\TestWeakHashTablePerformance.cs" />
     <Compile Include="TestDemo.cs">
       <SubType>Code</SubType>
     </Compile>
@@ -447,7 +460,7 @@
     <Compile Include="TestSearchForDuplicates.cs">
       <SubType>Code</SubType>
     </Compile>
-    <Compile Include="TestSupportClass.cs" />
+    <Compile Include="Support\TestSupportClass.cs" />
     <Compile Include="Util\ArrayUtilTest.cs" />
     <Compile Include="Util\Cache\TestSimpleLRUCache.cs" />
     <Compile Include="Util\English.cs">

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/QueryParser/TestQueryParser.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/QueryParser/TestQueryParser.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/QueryParser/TestQueryParser.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/QueryParser/TestQueryParser.cs Sat May  7 06:22:20 2011
@@ -883,7 +883,7 @@ namespace Lucene.Net.QueryParsers
 		public virtual void  TestBoost()
 		{
 			System.Collections.Hashtable stopWords = new System.Collections.Hashtable(1);
-			SupportClass.CollectionsHelper.AddIfNotContains(stopWords, "on");
+			Support.CollectionsHelper.AddIfNotContains(stopWords, "on");
 			StandardAnalyzer oneStopAnalyzer = new StandardAnalyzer(stopWords);
 			QueryParser qp = new QueryParser("field", oneStopAnalyzer);
 			Query q = qp.Parse("on^1.0");

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/CheckHits.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/CheckHits.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/CheckHits.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/CheckHits.cs Sat May  7 06:22:20 2011
@@ -50,7 +50,7 @@ namespace Lucene.Net.Search
 			System.Collections.Hashtable ignore = new System.Collections.Hashtable();
 			for (int i = 0; i < results.Length; i++)
 			{
-				SupportClass.CollectionsHelper.AddIfNotContains(ignore, (System.Int32) results[i]);
+				Support.CollectionsHelper.AddIfNotContains(ignore, (System.Int32) results[i]);
 			}
 			
 			int maxDoc = searcher.MaxDoc();
@@ -93,7 +93,7 @@ namespace Lucene.Net.Search
 			System.Collections.Hashtable correct = new System.Collections.Hashtable();
 			for (int i = 0; i < results.Length; i++)
 			{
-				SupportClass.CollectionsHelper.AddIfNotContains(correct, (System.Int32) results[i]);
+				Support.CollectionsHelper.AddIfNotContains(correct, (System.Int32) results[i]);
 			}
 			System.Collections.Hashtable actual = new System.Collections.Hashtable();
 			Collector c = new SetCollector(actual);
@@ -132,7 +132,7 @@ namespace Lucene.Net.Search
 			}
 			public override void  Collect(int doc)
 			{
-				SupportClass.CollectionsHelper.AddIfNotContains(bag, (System.Int32)(doc + base_Renamed));
+				Support.CollectionsHelper.AddIfNotContains(bag, (System.Int32)(doc + base_Renamed));
 			}
 			public override void  SetNextReader(IndexReader reader, int docBase)
 			{
@@ -175,14 +175,14 @@ namespace Lucene.Net.Search
 			System.Collections.ArrayList correct = new System.Collections.ArrayList();
 			for (int i = 0; i < results.Length; i++)
 			{
-                SupportClass.CollectionsHelper.AddIfNotContains(correct, results[i]);
+                Support.CollectionsHelper.AddIfNotContains(correct, results[i]);
 			}
             correct.Sort();
 			
 			System.Collections.ArrayList actual = new System.Collections.ArrayList();
 			for (int i = 0; i < hits.Length; i++)
 			{
-				SupportClass.CollectionsHelper.AddIfNotContains(actual, hits[i].doc);
+				Support.CollectionsHelper.AddIfNotContains(actual, hits[i].doc);
 			}
             actual.Sort();
 			
@@ -383,7 +383,7 @@ namespace Lucene.Net.Search
 							int k2 = descr.IndexOf(" ", k1);
 							try
 							{
-                                x = SupportClass.Single.Parse(descr.Substring(k1, (k2) - (k1)).Trim());
+                                x = Support.Single.Parse(descr.Substring(k1, (k2) - (k1)).Trim());
 								if (descr.Substring(k2).Trim().Equals("times others of:"))
 								{
 									maxTimesOthers = true;

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Function/FunctionTestSetup.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Function/FunctionTestSetup.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Function/FunctionTestSetup.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Function/FunctionTestSetup.cs Sat May  7 06:22:20 2011
@@ -158,7 +158,7 @@ namespace Lucene.Net.Search.Function
 		// extract expected doc score from its ID Field: "ID7" --> 7.0
 		protected internal virtual float ExpectedFieldScore(System.String docIDFieldVal)
 		{
-            return SupportClass.Single.Parse(docIDFieldVal.Substring(2));
+            return Support.Single.Parse(docIDFieldVal.Substring(2));
 		}
 		
 		// debug messages (change DBG to true for anything to print) 

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Spans/TestFieldMaskingSpanQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Spans/TestFieldMaskingSpanQuery.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Spans/TestFieldMaskingSpanQuery.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Spans/TestFieldMaskingSpanQuery.cs Sat May  7 06:22:20 2011
@@ -151,7 +151,7 @@ namespace Lucene.Net.Search.Spans
 			
 			QueryUtils.CheckEqual(q, qr);
 			
-			SupportClass.Set<Term> set_Renamed = new SupportClass.Set<Term>();
+			Support.Set<Term> set_Renamed = new Support.Set<Term>();
 			qr.ExtractTerms(set_Renamed);
 			Assert.AreEqual(2, set_Renamed.Count);
 		}

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Spans/TestPayloadSpans.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Spans/TestPayloadSpans.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Spans/TestPayloadSpans.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Spans/TestPayloadSpans.cs Sat May  7 06:22:20 2011
@@ -286,7 +286,7 @@ namespace Lucene.Net.Search.Spans
 					
 					for (System.Collections.IEnumerator it = payloads.GetEnumerator(); it.MoveNext(); )
 					{
-						SupportClass.CollectionsHelper.AddIfNotContains(payloadSet, new System.String(System.Text.UTF8Encoding.UTF8.GetChars((byte[]) it.Current)));
+						Support.CollectionsHelper.AddIfNotContains(payloadSet, new System.String(System.Text.UTF8Encoding.UTF8.GetChars((byte[]) it.Current)));
 					}
 				}
 			}
@@ -323,7 +323,7 @@ namespace Lucene.Net.Search.Spans
 					int cnt = 0;
 					for (System.Collections.IEnumerator it = payloads.GetEnumerator(); it.MoveNext(); )
 					{
-						SupportClass.CollectionsHelper.AddIfNotContains(payloadSet, new System.String(System.Text.UTF8Encoding.UTF8.GetChars((byte[]) it.Current)));
+						Support.CollectionsHelper.AddIfNotContains(payloadSet, new System.String(System.Text.UTF8Encoding.UTF8.GetChars((byte[]) it.Current)));
 					}
 				}
 			}
@@ -360,7 +360,7 @@ namespace Lucene.Net.Search.Spans
 					
 					for (System.Collections.IEnumerator it = payloads.GetEnumerator(); it.MoveNext(); )
 					{
-						SupportClass.CollectionsHelper.AddIfNotContains(payloadSet, new System.String(System.Text.UTF8Encoding.UTF8.GetChars((byte[]) it.Current)));
+						Support.CollectionsHelper.AddIfNotContains(payloadSet, new System.String(System.Text.UTF8Encoding.UTF8.GetChars((byte[]) it.Current)));
 					}
 				}
 			}
@@ -555,10 +555,10 @@ namespace Lucene.Net.Search.Spans
 				InitBlock(enclosingInstance);
 				this.fieldName = fieldName;
 				pos = 0;
-				SupportClass.CollectionsHelper.AddIfNotContains(entities, "xx");
-				SupportClass.CollectionsHelper.AddIfNotContains(entities, "one");
-				SupportClass.CollectionsHelper.AddIfNotContains(nopayload, "nopayload");
-				SupportClass.CollectionsHelper.AddIfNotContains(nopayload, "np");
+				Support.CollectionsHelper.AddIfNotContains(entities, "xx");
+				Support.CollectionsHelper.AddIfNotContains(entities, "one");
+				Support.CollectionsHelper.AddIfNotContains(nopayload, "nopayload");
+				Support.CollectionsHelper.AddIfNotContains(nopayload, "np");
 				termAtt = (TermAttribute) AddAttribute(typeof(TermAttribute));
 				posIncrAtt = (PositionIncrementAttribute) AddAttribute(typeof(PositionIncrementAttribute));
 				payloadAtt = (PayloadAttribute) AddAttribute(typeof(PayloadAttribute));

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestDocIdSet.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestDocIdSet.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestDocIdSet.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestDocIdSet.cs Sat May  7 06:22:20 2011
@@ -212,7 +212,7 @@ namespace Lucene.Net.Search
 				docs[c++] = ((System.Int32) intIter.Current);
 			}
 			int[] answer = new int[]{4, 6, 8};
-			bool same = SupportClass.CollectionsHelper.Equals(answer, docs);
+			bool same = Support.CollectionsHelper.Equals(answer, docs);
 			if (!same)
 			{
 				System.Console.Out.WriteLine("answer: " + _TestUtil.ArrayToString(answer));

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestMultiSearcher.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestMultiSearcher.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestMultiSearcher.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestMultiSearcher.cs Sat May  7 06:22:20 2011
@@ -308,9 +308,9 @@ namespace Lucene.Net.Search
 			Assert.IsTrue(document.GetFields().Count == 2, "document.getFields() Size: " + document.GetFields().Count + " is not: " + 2);
 			//Should be one document from each directory
 			//they both have two fields, contents and other
-            SupportClass.Set<string> ftl = new SupportClass.Set<string>();
+            Support.Set<string> ftl = new Support.Set<string>();
 			ftl.Add("other");
-            SetBasedFieldSelector fs = new SetBasedFieldSelector(ftl, new SupportClass.Set<string>());
+            SetBasedFieldSelector fs = new SetBasedFieldSelector(ftl, new Support.Set<string>());
 			document = searcher.Doc(hits[0].doc, fs);
 			Assert.IsTrue(document != null, "document is null and it shouldn't be");
 			Assert.IsTrue(document.GetFields().Count == 1, "document.getFields() Size: " + document.GetFields().Count + " is not: " + 1);
@@ -320,7 +320,7 @@ namespace Lucene.Net.Search
 			Assert.IsTrue(value_Renamed != null, "value is null and it shouldn't be");
 			ftl.Clear();
 			ftl.Add("contents");
-            fs = new SetBasedFieldSelector(ftl, new SupportClass.Set<string>());
+            fs = new SetBasedFieldSelector(ftl, new Support.Set<string>());
 			document = searcher.Doc(hits[1].doc, fs);
 			value_Renamed = document.Get("contents");
 			Assert.IsTrue(value_Renamed != null, "value is null and it shouldn't be");

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestMultiThreadTermVectors.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestMultiThreadTermVectors.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestMultiThreadTermVectors.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestMultiThreadTermVectors.cs Sat May  7 06:22:20 2011
@@ -135,7 +135,7 @@ namespace Lucene.Net.Search
 	{
 		
 		private IndexReader reader = null;
-		private SupportClass.ThreadClass t = null;
+		private Support.ThreadClass t = null;
 		
 		private int runsToDo = 100;
 		internal long timeElapsed = 0;
@@ -145,7 +145,7 @@ namespace Lucene.Net.Search
 		{
 			this.reader = reader;
 			timeElapsed = 0;
-			t = new SupportClass.ThreadClass(new System.Threading.ThreadStart(this.Run));
+			t = new Support.ThreadClass(new System.Threading.ThreadStart(this.Run));
 			t.Start();
 		}
 		

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestScorerPerf.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestScorerPerf.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestScorerPerf.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestScorerPerf.cs Sat May  7 06:22:20 2011
@@ -183,7 +183,7 @@ namespace Lucene.Net.Search
 			public virtual void  Collect(int doc, float score)
 			{
 				
-				pos = SupportClass.BitSetSupport.NextSetBit(answer, pos + 1);
+				pos = Support.BitSetSupport.NextSetBit(answer, pos + 1);
 				if (pos != doc + docBase)
 				{
 					throw new System.SystemException("Expected doc " + pos + " but got " + doc + docBase);
@@ -230,7 +230,7 @@ namespace Lucene.Net.Search
 				ret += hc.GetSum();
 				
 				if (validate)
-					Assert.AreEqual(SupportClass.BitSetSupport.Cardinality(result), hc.GetCount());
+					Assert.AreEqual(Support.BitSetSupport.Cardinality(result), hc.GetCount());
 				// System.out.println(hc.getCount());
 			}
 			
@@ -266,7 +266,7 @@ namespace Lucene.Net.Search
 				nMatches += hc.GetCount();
 				ret += hc.GetSum();
 				if (validate)
-					Assert.AreEqual(SupportClass.BitSetSupport.Cardinality(result), hc.GetCount());
+					Assert.AreEqual(Support.BitSetSupport.Cardinality(result), hc.GetCount());
 				// System.out.println(hc.getCount());
 			}
 			System.Console.Out.WriteLine("Average number of matches=" + (nMatches / iter));
@@ -290,9 +290,9 @@ namespace Lucene.Net.Search
 					// don't pick same clause twice
 					tnum = r.Next(termsInIndex);
 					if (termflag.Get(tnum))
-						tnum = SupportClass.BitSetSupport.NextClearBit(termflag, tnum);
+						tnum = Support.BitSetSupport.NextClearBit(termflag, tnum);
 					if (tnum < 0 || tnum >= termsInIndex)
-						tnum = SupportClass.BitSetSupport.NextClearBit(termflag, 0);
+						tnum = Support.BitSetSupport.NextClearBit(termflag, 0);
 					termflag.Set(tnum, true);
 					Query tq = new TermQuery(terms[tnum]);
 					bq.Add(tq, BooleanClause.Occur.MUST);
@@ -329,9 +329,9 @@ namespace Lucene.Net.Search
 						// don't pick same clause twice
 						tnum = r.Next(termsInIndex);
 						if (termflag.Get(tnum))
-							tnum = SupportClass.BitSetSupport.NextClearBit(termflag, tnum);
+							tnum = Support.BitSetSupport.NextClearBit(termflag, tnum);
 						if (tnum < 0 || tnum >= 25)
-							tnum = SupportClass.BitSetSupport.NextClearBit(termflag, 0);
+							tnum = Support.BitSetSupport.NextClearBit(termflag, 0);
 						termflag.Set(tnum, true);
 						Query tq = new TermQuery(terms[tnum]);
 						bq.Add(tq, BooleanClause.Occur.MUST);

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestStressSort.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestStressSort.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestStressSort.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestStressSort.cs Sat May  7 06:22:20 2011
@@ -456,7 +456,7 @@ namespace Lucene.Net.Search
 					Assert.AreEqual(oldHit.doc, newHit.doc, "hit " + i + " of " + oldDocs.Length + " differs: oldDoc=" + oldHit.doc + " vs newDoc=" + newHit.doc + " oldFields=" + _TestUtil.ArrayToString(oldHit.fields) + " newFields=" + _TestUtil.ArrayToString(newHit.fields));
 					
 					Assert.AreEqual(oldHit.score, newHit.score, 0.00001);
-					Assert.IsTrue(SupportClass.CollectionsHelper.Equals(oldHit.fields, newHit.fields));
+					Assert.IsTrue(Support.CollectionsHelper.Equals(oldHit.fields, newHit.fields));
 				}
 				else
 				{

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestThreadSafe.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestThreadSafe.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestThreadSafe.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestThreadSafe.cs Sat May  7 06:22:20 2011
@@ -46,7 +46,7 @@ namespace Lucene.Net.Search
 		internal System.String failure = null;
 		
 		
-		internal class Thr:SupportClass.ThreadClass
+		internal class Thr:Support.ThreadClass
 		{
 			[Serializable]
 			private class AnonymousClassFieldSelector : FieldSelector

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestTimeLimitedCollector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestTimeLimitedCollector.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestTimeLimitedCollector.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestTimeLimitedCollector.cs Sat May  7 06:22:20 2011
@@ -39,7 +39,7 @@ namespace Lucene.Net.Search
     [TestFixture]
 	public class TestTimeLimitedCollector:LuceneTestCase
 	{
-		private class AnonymousClassThread:SupportClass.ThreadClass
+		private class AnonymousClassThread:Support.ThreadClass
 		{
 			public AnonymousClassThread(bool withTimeout, System.Collections.BitArray success, int num, TestTimeLimitedCollector enclosingInstance)
 			{
@@ -314,7 +314,7 @@ namespace Lucene.Net.Search
 		
 		private void  DoTestMultiThreads(bool withTimeout)
 		{
-			SupportClass.ThreadClass[] threadArray = new SupportClass.ThreadClass[N_THREADS];
+			Support.ThreadClass[] threadArray = new Support.ThreadClass[N_THREADS];
 			System.Collections.BitArray success = new System.Collections.BitArray((N_THREADS % 64 == 0?N_THREADS / 64:N_THREADS / 64 + 1) * 64);
 			for (int i = 0; i < threadArray.Length; ++i)
 			{
@@ -329,7 +329,7 @@ namespace Lucene.Net.Search
 			{
 				threadArray[i].Join();
 			}
-			Assert.AreEqual(N_THREADS, SupportClass.BitSetSupport.Cardinality(success), "some threads failed!");
+			Assert.AreEqual(N_THREADS, Support.BitSetSupport.Cardinality(success), "some threads failed!");
 		}
 		
 		// counting hit collector that can slow down at collect().
@@ -372,7 +372,7 @@ namespace Lucene.Net.Search
 					}
 					catch (System.Threading.ThreadInterruptedException ie)
 					{
-						SupportClass.ThreadClass.Current().Interrupt();
+						Support.ThreadClass.Current().Interrupt();
 						throw new System.SystemException("", ie);
 					}
 				}
@@ -384,7 +384,7 @@ namespace Lucene.Net.Search
 			
 			public virtual int HitCount()
 			{
-				return SupportClass.BitSetSupport.Cardinality(bits);
+				return Support.BitSetSupport.Cardinality(bits);
 			}
 			
 			public virtual int GetLastDocCollected()

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestTimeLimitingCollector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestTimeLimitingCollector.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestTimeLimitingCollector.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestTimeLimitingCollector.cs Sat May  7 06:22:20 2011
@@ -41,7 +41,7 @@ namespace Lucene.Net.Search
     [TestFixture]
 	public class TestTimeLimitingCollector:LuceneTestCase
 	{
-		private class AnonymousClassThread:SupportClass.ThreadClass
+		private class AnonymousClassThread:Support.ThreadClass
 		{
 			public AnonymousClassThread(bool withTimeout, System.Collections.BitArray success, int num, TestTimeLimitingCollector enclosingInstance)
 			{
@@ -316,7 +316,7 @@ namespace Lucene.Net.Search
 		
 		private void  DoTestMultiThreads(bool withTimeout)
 		{
-			SupportClass.ThreadClass[] threadArray = new SupportClass.ThreadClass[N_THREADS];
+			Support.ThreadClass[] threadArray = new Support.ThreadClass[N_THREADS];
 			System.Collections.BitArray success = new System.Collections.BitArray((N_THREADS % 64 == 0?N_THREADS / 64:N_THREADS / 64 + 1) * 64);
 			for (int i = 0; i < threadArray.Length; ++i)
 			{
@@ -331,7 +331,7 @@ namespace Lucene.Net.Search
 			{
 				threadArray[i].Join();
 			}
-			Assert.AreEqual(N_THREADS, SupportClass.BitSetSupport.Cardinality(success), "some threads failed!");
+			Assert.AreEqual(N_THREADS, Support.BitSetSupport.Cardinality(success), "some threads failed!");
 		}
 		
 		// counting collector that can slow down at collect().
@@ -367,7 +367,7 @@ namespace Lucene.Net.Search
 			
 			public virtual int HitCount()
 			{
-				return SupportClass.BitSetSupport.Cardinality(bits);
+				return Support.BitSetSupport.Cardinality(bits);
 			}
 			
 			public virtual int GetLastDocCollected()
@@ -391,7 +391,7 @@ namespace Lucene.Net.Search
 					}
 					catch (System.Threading.ThreadInterruptedException ie)
 					{
-						SupportClass.ThreadClass.Current().Interrupt();
+						Support.ThreadClass.Current().Interrupt();
 						throw new System.SystemException("", ie);
 					}
 				}

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestBufferedIndexInput.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestBufferedIndexInput.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestBufferedIndexInput.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestBufferedIndexInput.cs Sat May  7 06:22:20 2011
@@ -284,7 +284,7 @@ namespace Lucene.Net.Store
 		[Test]
 		public virtual void  TestSetBufferSize()
 		{
-			System.IO.FileInfo indexDir = new System.IO.FileInfo(System.IO.Path.Combine(SupportClass.AppSettings.Get("tempDir", ""), "testSetBufferSize"));
+			System.IO.FileInfo indexDir = new System.IO.FileInfo(System.IO.Path.Combine(Support.AppSettings.Get("tempDir", ""), "testSetBufferSize"));
 			MockFSDirectory dir = new MockFSDirectory(indexDir, NewRandom());
 			try
 			{

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestDirectory.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestDirectory.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestDirectory.cs Sat May  7 06:22:20 2011
@@ -43,7 +43,7 @@ namespace Lucene.Net.Store
 			{
 			}
 			
-			dir = FSDirectory.Open(new System.IO.FileInfo(SupportClass.AppSettings.Get("tempDir", System.IO.Path.GetTempPath())));
+			dir = FSDirectory.Open(new System.IO.FileInfo(Support.AppSettings.Get("tempDir", System.IO.Path.GetTempPath())));
 			dir.Close();
 			try
 			{
@@ -61,7 +61,7 @@ namespace Lucene.Net.Store
 		[Test]
 		public virtual void  TestDirectInstantiation()
 		{
-			System.IO.FileInfo path = new System.IO.FileInfo(SupportClass.AppSettings.Get("tempDir", System.IO.Path.GetTempPath()));
+			System.IO.FileInfo path = new System.IO.FileInfo(Support.AppSettings.Get("tempDir", System.IO.Path.GetTempPath()));
 			
 			int sz = 2;
 			Directory[] dirs = new Directory[sz];
@@ -145,7 +145,7 @@ namespace Lucene.Net.Store
 		[Test]
 		public virtual void  TestDontCreate()
 		{
-			System.IO.FileInfo path = new System.IO.FileInfo(System.IO.Path.Combine(SupportClass.AppSettings.Get("tempDir", ""), "doesnotexist"));
+			System.IO.FileInfo path = new System.IO.FileInfo(System.IO.Path.Combine(Support.AppSettings.Get("tempDir", ""), "doesnotexist"));
 			try
 			{
 				bool tmpBool;
@@ -203,7 +203,7 @@ namespace Lucene.Net.Store
 		[Test]
 		public virtual void  TestCopySubdir()
 		{
-			System.IO.FileInfo path = new System.IO.FileInfo(System.IO.Path.Combine(SupportClass.AppSettings.Get("tempDir", ""), "testsubdir"));
+			System.IO.FileInfo path = new System.IO.FileInfo(System.IO.Path.Combine(Support.AppSettings.Get("tempDir", ""), "testsubdir"));
 			try
 			{
 				System.IO.Directory.CreateDirectory(path.FullName);
@@ -221,7 +221,7 @@ namespace Lucene.Net.Store
 		[Test]
 		public virtual void  TestNotDirectory()
 		{
-			System.IO.FileInfo path = new System.IO.FileInfo(System.IO.Path.Combine(SupportClass.AppSettings.Get("tempDir", ""), "testnotdir"));
+			System.IO.FileInfo path = new System.IO.FileInfo(System.IO.Path.Combine(Support.AppSettings.Get("tempDir", ""), "testnotdir"));
 			Directory fsDir = new SimpleFSDirectory(path, null);
 			try
 			{

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestFileSwitchDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestFileSwitchDirectory.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestFileSwitchDirectory.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestFileSwitchDirectory.cs Sat May  7 06:22:20 2011
@@ -37,7 +37,7 @@ namespace Lucene.Net.Store
         [Test]
 		public virtual void  TestBasic()
 		{
-            IList<String> fileExtensions = new SupportClass.Set<string>();
+            IList<String> fileExtensions = new Support.Set<string>();
 			fileExtensions.Add("fdt");
 			fileExtensions.Add("fdx");
 			

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestLockFactory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestLockFactory.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestLockFactory.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestLockFactory.cs Sat May  7 06:22:20 2011
@@ -237,25 +237,25 @@ namespace Lucene.Net.Store
 			{
 				
 				// NoLockFactory:
-				SupportClass.AppSettings.Set(prpName, "Lucene.Net.Store.NoLockFactory");
+				Support.AppSettings.Set(prpName, "Lucene.Net.Store.NoLockFactory");
 				IndexWriter writer = new IndexWriter(indexDirName, new WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
 				Assert.IsTrue(typeof(NoLockFactory).IsInstanceOfType(writer.GetDirectory().GetLockFactory()), "FSDirectory did not use correct LockFactory: got " + writer.GetDirectory().GetLockFactory());
 				writer.Close();
 				
 				// SingleInstanceLockFactory:
-				SupportClass.AppSettings.Set(prpName, "Lucene.Net.Store.SingleInstanceLockFactory");
+				Support.AppSettings.Set(prpName, "Lucene.Net.Store.SingleInstanceLockFactory");
 				writer = new IndexWriter(indexDirName, new WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
 				Assert.IsTrue(typeof(SingleInstanceLockFactory).IsInstanceOfType(writer.GetDirectory().GetLockFactory()), "FSDirectory did not use correct LockFactory: got " + writer.GetDirectory().GetLockFactory());
 				writer.Close();
 				
 				// NativeFSLockFactory:
-				SupportClass.AppSettings.Set(prpName, "Lucene.Net.Store.NativeFSLockFactory");
+				Support.AppSettings.Set(prpName, "Lucene.Net.Store.NativeFSLockFactory");
 				writer = new IndexWriter(indexDirName, new WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
 				Assert.IsTrue(typeof(NativeFSLockFactory).IsInstanceOfType(writer.GetDirectory().GetLockFactory()), "FSDirectory did not use correct LockFactory: got " + writer.GetDirectory().GetLockFactory());
 				writer.Close();
 				
 				// SimpleFSLockFactory:
-				SupportClass.AppSettings.Set(prpName, "Lucene.Net.Store.SimpleFSLockFactory");
+				Support.AppSettings.Set(prpName, "Lucene.Net.Store.SimpleFSLockFactory");
 				writer = new IndexWriter(indexDirName, new WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
 				Assert.IsTrue(typeof(SimpleFSLockFactory).IsInstanceOfType(writer.GetDirectory().GetLockFactory()), "FSDirectory did not use correct LockFactory: got " + writer.GetDirectory().GetLockFactory());
 				writer.Close();
@@ -263,7 +263,7 @@ namespace Lucene.Net.Store
 			finally
 			{
 				// Put back to the correct default for subsequent tests:
-				SupportClass.AppSettings.Set("Lucene.Net.Store.FSDirectoryLockFactoryClass", "");
+				Support.AppSettings.Set("Lucene.Net.Store.FSDirectoryLockFactoryClass", "");
 			}
 			
 			// Cleanup
@@ -397,7 +397,7 @@ namespace Lucene.Net.Store
 		public virtual void  TestNativeFSLockFactory()
 		{
 			
-			NativeFSLockFactory f = new NativeFSLockFactory(SupportClass.AppSettings.Get("tempDir", System.IO.Path.GetTempPath()));
+			NativeFSLockFactory f = new NativeFSLockFactory(Support.AppSettings.Get("tempDir", System.IO.Path.GetTempPath()));
 			
 			f.SetLockPrefix("test");
 			Lock l = f.MakeLock("commit");
@@ -457,7 +457,7 @@ namespace Lucene.Net.Store
 			_TestUtil.RmDir(dirName);
 		}
 		
-		private class WriterThread:SupportClass.ThreadClass
+		private class WriterThread:Support.ThreadClass
 		{
 			private void  InitBlock(TestLockFactory enclosingInstance)
 			{
@@ -546,7 +546,7 @@ namespace Lucene.Net.Store
 			}
 		}
 		
-		private class SearcherThread:SupportClass.ThreadClass
+		private class SearcherThread:Support.ThreadClass
 		{
 			private void  InitBlock(TestLockFactory enclosingInstance)
 			{

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestRAMDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestRAMDirectory.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestRAMDirectory.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestRAMDirectory.cs Sat May  7 06:22:20 2011
@@ -42,7 +42,7 @@ namespace Lucene.Net.Store
     [TestFixture]
 	public class TestRAMDirectory:LuceneTestCase
 	{
-		private class AnonymousClassThread:SupportClass.ThreadClass
+		private class AnonymousClassThread:Support.ThreadClass
 		{
 			public AnonymousClassThread(int num, Lucene.Net.Index.IndexWriter writer, Lucene.Net.Store.MockRAMDirectory ramDir, TestRAMDirectory enclosingInstance)
 			{
@@ -214,7 +214,7 @@ namespace Lucene.Net.Store
 			
 			Assert.AreEqual(ramDir.SizeInBytes(), ramDir.GetRecomputedSizeInBytes());
 			
-			SupportClass.ThreadClass[] threads = new SupportClass.ThreadClass[numThreads];
+			Support.ThreadClass[] threads = new Support.ThreadClass[numThreads];
 			for (int i = 0; i < numThreads; i++)
 			{
 				int num = i;

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestWindowsMMap.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestWindowsMMap.cs?rev=1100459&r1=1100458&r2=1100459&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestWindowsMMap.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Store/TestWindowsMMap.cs Sat May  7 06:22:20 2011
@@ -67,7 +67,7 @@ namespace Lucene.Net.Store
 			return fb.ToString();
 		}
 		
-		private static readonly System.String storePathname = new System.IO.FileInfo(System.IO.Path.Combine(SupportClass.AppSettings.Get("tempDir", ""), "testLuceneMmap")).FullName;
+		private static readonly System.String storePathname = new System.IO.FileInfo(System.IO.Path.Combine(Support.AppSettings.Get("tempDir", ""), "testLuceneMmap")).FullName;
 		
 		[Test]
 		public virtual void  TestMmapIndex()
@@ -97,7 +97,7 @@ namespace Lucene.Net.Store
 		
 		private void  RmDir(System.IO.FileInfo dir)
 		{
-			System.IO.FileInfo[] files = SupportClass.FileSupport.GetFiles(dir);
+			System.IO.FileInfo[] files = Support.FileSupport.GetFiles(dir);
 			for (int i = 0; i < files.Length; i++)
 			{
 				bool tmpBool;

Added: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/CollisionTester.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/CollisionTester.cs?rev=1100459&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/CollisionTester.cs (added)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/CollisionTester.cs Sat May  7 06:22:20 2011
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Lucene.Net.Support
+{
+    class CollisionTester
+    {
+        int id;
+        int hashCode;
+
+        public CollisionTester(int id, int hashCode)
+        {
+            this.id = id;
+            this.hashCode = hashCode;
+        }
+
+        public override int GetHashCode()
+        {
+            return hashCode;
+        }
+
+        public override bool Equals(object obj)
+        {
+            if (obj is CollisionTester)
+            {
+                return this.id == ((CollisionTester)obj).id;
+            }
+            else
+                return base.Equals(obj);
+        }
+    }
+}
\ No newline at end of file

Added: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/SupportTestCases.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/SupportTestCases.cs?rev=1100459&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/SupportTestCases.cs (added)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/SupportTestCases.cs Sat May  7 06:22:20 2011
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using NUnit.Framework;
+
+namespace Lucene.Net.Support
+{
+    [TestFixture]
+    public class SupportTestCases
+    {
+        [Test]
+        public void Count()
+        {
+            System.Reflection.Assembly asm = System.Reflection.Assembly.GetExecutingAssembly();
+            Type[] types = asm.GetTypes();
+
+            int countSupport = 0;
+            int countOther = 0;
+            foreach (Type type in types)
+            {
+                object[] o1 = type.GetCustomAttributes(typeof(NUnit.Framework.TestFixtureAttribute), true);
+                if (o1 == null || o1.Length == 0) continue;
+
+                foreach (System.Reflection.MethodInfo mi in type.GetMethods())
+                {
+                    object[] o2 = mi.GetCustomAttributes(typeof(NUnit.Framework.TestAttribute), true);
+                    if (o2 == null || o2.Length == 0) continue;
+
+                    if (type.FullName.StartsWith("Lucene.Net._SupportClass"))
+                    {
+                        countSupport++;
+                    }
+                    else
+                    {
+                        countOther++;
+                    }
+                }
+            }
+            string msg = "Lucene.Net TestCases:" + countSupport + "     Other TestCases:" + countOther;
+            Console.WriteLine(msg);
+            Assert.Ignore("[Intentionally ignored test case] " + msg);
+        }
+    }
+}
\ No newline at end of file

Added: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestIDisposable.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestIDisposable.cs?rev=1100459&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestIDisposable.cs (added)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestIDisposable.cs Sat May  7 06:22:20 2011
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Lucene.Net.Analysis;
+using Lucene.Net.Documents;
+using Lucene.Net.Index;
+using Lucene.Net.Store;
+using NUnit.Framework;
+
+namespace Lucene.Net.Support
+{
+    [TestFixture]
+    public class TestIDisposable
+    {
+        [Test]
+        public void TestReadersWriters()
+        {
+            Directory dir;
+            
+            using(dir = new RAMDirectory())
+            {
+                Document doc;
+                IndexWriter writer;
+                IndexReader reader;
+
+                using (writer = new IndexWriter(dir, new WhitespaceAnalyzer(), true))
+                {
+                    Field field = new Field("name", "value", Field.Store.YES,Field.Index.ANALYZED);
+                    doc = new Document();
+                    doc.Add(field);
+                    writer.AddDocument(doc);
+                    writer.Commit();
+
+                    using (reader = writer.GetReader())
+                    {
+                        IndexReader r1 =  reader.Reopen();
+                    }
+
+                    try
+                    {
+                        IndexReader r2 = reader.Reopen();
+                        Assert.Fail("IndexReader shouldn't be open here");
+                    }
+                    catch (AlreadyClosedException)
+                    {
+                    }
+                }
+                try
+                {
+                    writer.AddDocument(doc);
+                    Assert.Fail("IndexWriter shouldn't be open here");
+                }
+                catch (AlreadyClosedException)
+                {
+                }
+
+                Assert.IsTrue(dir.isOpen_ForNUnit, "RAMDirectory");
+            }
+            Assert.IsFalse(dir.isOpen_ForNUnit, "RAMDirectory");
+        }
+    }
+}
\ No newline at end of file

Added: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestLRUCache.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestLRUCache.cs?rev=1100459&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestLRUCache.cs (added)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestLRUCache.cs Sat May  7 06:22:20 2011
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using NUnit.Framework;
+
+namespace Lucene.Net.Support
+{
+    [TestFixture]
+    public class TestLRUCache
+    {
+        [Test]
+        public void Test()
+        {
+            Lucene.Net.Util.Cache.SimpleLRUCache<string,string> cache = new Lucene.Net.Util.Cache.SimpleLRUCache<string,string>(3);
+            cache.Put("a", "a");
+            cache.Put("b", "b");
+            cache.Put("c", "c");
+            Assert.IsNotNull(cache.Get("a"));
+            Assert.IsNotNull(cache.Get("b"));
+            Assert.IsNotNull(cache.Get("c"));
+            cache.Put("d", "d");
+            Assert.IsNull(cache.Get("a"));
+            Assert.IsNotNull(cache.Get("c"));
+            cache.Put("e", "e");
+            cache.Put("f", "f");
+            Assert.IsNotNull(cache.Get("c"));
+        }
+    }
+}
\ No newline at end of file

Added: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestMediumTrust.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestMediumTrust.cs?rev=1100459&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestMediumTrust.cs (added)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestMediumTrust.cs Sat May  7 06:22:20 2011
@@ -0,0 +1,203 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using Lucene.Net.Search;
+using Lucene.Net.Store;
+using NUnit.Framework;
+
+namespace Lucene.Net.Support
+{
+    [TestFixture]
+    public class TestMediumTrust 
+    {
+        dynamic _PartiallyTrustedClass;
+
+        public TestMediumTrust()
+        {
+            _PartiallyTrustedClass = new Lucene.Net.Test.PartiallyTrustedAppDomain<TestMethodsContainer>(); 
+        }
+        
+        [TestFixtureTearDown]
+        public void TestFixtureTearDown()
+        {
+            _PartiallyTrustedClass.Dispose();
+        }
+
+
+        [Test]
+        public void TestIndexAndSearch()
+        {
+            string tempIndexDir = System.IO.Path.Combine(_PartiallyTrustedClass.TempDir, "testindex");
+            try
+            {
+                _PartiallyTrustedClass.TestIndexAndSearch(tempIndexDir);
+            }
+            finally
+            {
+                if(System.IO.Directory.Exists(tempIndexDir))
+                    System.IO.Directory.Delete(tempIndexDir,true);
+            }
+        }
+
+        [Test]
+        public void Test_Index_Term()
+        {
+            _PartiallyTrustedClass.Test_Index_Term();
+        }
+
+        [Test]
+        public void Test_Search_NumericRangeQuery()
+        {
+            _PartiallyTrustedClass.Test_Search_NumericRangeQuery();
+        }
+        
+        [Test]
+        public void Test_Search_SortField()
+        {
+            _PartiallyTrustedClass.Test_Search_SortField();
+        }
+
+        [Test]
+        public void Test_AlreadyClosedException()
+        {
+            _PartiallyTrustedClass.Test_AlreadyClosedException();
+        }
+
+        [Test]
+        public void Test_AlreadyClosedException_Serialization()
+        {
+            try
+            {
+                _PartiallyTrustedClass.Test_AlreadyClosedException_Serialization();
+            }
+            catch (System.Security.SecurityException)
+            {
+                Assert.Ignore("This method failed with a security exception");
+            }
+        }
+
+        [Test]
+        public void Test_Util_Parameter()
+        {
+            _PartiallyTrustedClass.Test_Util_Parameter();
+        }
+        
+        [Test]
+        public void TestThisTest()
+        {
+            try
+            {
+                _PartiallyTrustedClass.MethodToFail();
+                Assert.Fail("This call must fail-2");
+            }
+            catch (System.Security.SecurityException)
+            {
+            }
+        }
+
+
+        public class TestMethodsContainer : MarshalByRefObject
+        {
+            void TestIndexAndSearch(string tempDir)
+            {
+                Lucene.Net.Store.Directory dir = Lucene.Net.Store.FSDirectory.Open(new System.IO.DirectoryInfo(tempDir));
+
+                Lucene.Net.Index.IndexWriter w = new Lucene.Net.Index.IndexWriter(dir, new Lucene.Net.Analysis.Standard.StandardAnalyzer(), true);
+                Lucene.Net.Documents.Field f1 = new Lucene.Net.Documents.Field("field1", "dark side of the moon", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.TOKENIZED);
+                Lucene.Net.Documents.Field f2 = new Lucene.Net.Documents.Field("field2", "123", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.UN_TOKENIZED);
+                Lucene.Net.Documents.Document d = new Lucene.Net.Documents.Document();
+                d.Add(f1);
+                d.Add(f2);
+                w.AddDocument(d);
+
+                f1 = new Lucene.Net.Documents.Field("field1", "Fly me to the moon", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.TOKENIZED);
+                f2 = new Lucene.Net.Documents.Field("field2", "456", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.UN_TOKENIZED);
+                d = new Lucene.Net.Documents.Document();
+                d.Add(f1);
+                d.Add(f2);
+                w.AddDocument(d);
+
+                w.Close();
+
+                Lucene.Net.Search.IndexSearcher searcher = new IndexSearcher(dir, true);
+
+                Lucene.Net.Search.Sort sort = new Lucene.Net.Search.Sort();
+                sort.SetSort(new Lucene.Net.Search.SortField("field2", Lucene.Net.Search.SortField.STRING));
+                Lucene.Net.Search.Query q = new Lucene.Net.QueryParsers.QueryParser("field1", new Lucene.Net.Analysis.Standard.StandardAnalyzer()).Parse("moon");
+                TopDocs td = searcher.Search(q, null, 100, sort);
+                int resCount = td.ScoreDocs.Length;
+
+                searcher.Close();
+            }
+
+            void Test_Index_Term()
+            {
+                string s = new Lucene.Net.Index.Term("field", "Text").ToString();
+            }
+
+            void Test_Search_NumericRangeQuery()
+            {
+                Lucene.Net.Search.Query q = NumericRangeQuery.NewIntRange("field", 0, 10, true, true);
+            }
+
+            void Test_Search_SortField()
+            {
+                bool b = new Lucene.Net.Search.SortField("field").GetUseLegacySearch();
+            }
+
+            void Test_AlreadyClosedException()
+            {
+                try
+                {
+                    throw new AlreadyClosedException("test");
+                }
+                catch (AlreadyClosedException)
+                {
+                }
+            }
+
+            void Test_AlreadyClosedException_Serialization()
+            {
+                AlreadyClosedException ace = new AlreadyClosedException("Test");
+                System.Runtime.Serialization.Formatters.Binary.BinaryFormatter bf = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
+                System.IO.MemoryStream ms = new System.IO.MemoryStream();
+                bf.Serialize(ms, ace);
+                ms.Seek(0, System.IO.SeekOrigin.Begin);
+                AlreadyClosedException ace2 = (AlreadyClosedException)bf.Deserialize(ms);
+            }
+
+            void Test_Util_Parameter()
+            {
+                string s = new PARAM("field").ToString();
+            }
+
+            [Serializable]
+            public class PARAM : Lucene.Net.Util.Parameter
+            {
+                public PARAM(string field) : base(field)
+                {
+                }
+            }
+            
+            string MethodToFail()
+            {
+                return System.Environment.GetEnvironmentVariable("TEMP");
+            }
+        }
+    }
+}
\ No newline at end of file

Added: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestOSClass.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestOSClass.cs?rev=1100459&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestOSClass.cs (added)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Support/TestOSClass.cs Sat May  7 06:22:20 2011
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using NUnit.Framework;
+
+namespace Lucene.Net.Support
+{
+    [TestFixture]
+    public class TestOSClass
+    {
+        // LUCENENET-216
+        [Test]
+        public void TestFSDirectorySync()
+        {
+            System.IO.FileInfo path = new System.IO.FileInfo(System.IO.Path.Combine(Support.AppSettings.Get("tempDir", ""), "testsync"));
+            Lucene.Net.Store.Directory directory = new Lucene.Net.Store.SimpleFSDirectory(path, null);
+            try
+            {
+                Lucene.Net.Store.IndexOutput io = directory.CreateOutput("syncfile");
+                io.Close();
+                directory.Sync("syncfile");
+            }
+            finally
+            {
+                directory.Close();
+                Lucene.Net.Util._TestUtil.RmDir(path);
+            }
+        }
+    }
+}
\ No newline at end of file



Mime
View raw message