You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2016/12/06 15:12:29 UTC
[54/58] lucenenet git commit: HACK: (4th) Added stubs for all tests
subclasses of abstract test classes (with [Test] attributes) and commented
the [Test] attributes in the abstract classes to keep the tests from running
in the wrong context.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/701b9ed2/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs b/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
index 6b45673..ee990c1 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSimpleExplanationsOfNonMatches.cs
@@ -33,5 +33,457 @@ namespace Lucene.Net.Search
{
CheckHits.CheckNoMatchExplanations(q, FIELD, Searcher, expDocNrs);
}
+
+
+ #region TestSimpleExplanations
+ // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+ [Test]
+ public override void TestT1()
+ {
+ base.TestT1();
+ }
+
+ [Test]
+ public override void TestT2()
+ {
+ base.TestT2();
+ }
+
+ /* MatchAllDocs */
+
+ [Test]
+ public override void TestMA1()
+ {
+ base.TestMA1();
+ }
+
+ [Test]
+ public override void TestMA2()
+ {
+ base.TestMA2();
+ }
+
+ /* some simple phrase tests */
+
+ [Test]
+ public override void TestP1()
+ {
+ base.TestP1();
+ }
+
+ [Test]
+ public override void TestP2()
+ {
+ base.TestP2();
+ }
+
+ [Test]
+ public override void TestP3()
+ {
+ base.TestP3();
+ }
+
+ [Test]
+ public override void TestP4()
+ {
+ base.TestP4();
+ }
+
+ [Test]
+ public override void TestP5()
+ {
+ base.TestP5();
+ }
+
+ [Test]
+ public override void TestP6()
+ {
+ base.TestP6();
+ }
+
+ [Test]
+ public override void TestP7()
+ {
+ base.TestP7();
+ }
+
+ /* some simple filtered query tests */
+
+ [Test]
+ public override void TestFQ1()
+ {
+ base.TestFQ1();
+ }
+
+ [Test]
+ public override void TestFQ2()
+ {
+ base.TestFQ2();
+ }
+
+ [Test]
+ public override void TestFQ3()
+ {
+ base.TestFQ3();
+ }
+
+ [Test]
+ public override void TestFQ4()
+ {
+ base.TestFQ4();
+ }
+
+ [Test]
+ public override void TestFQ6()
+ {
+ base.TestFQ6();
+ }
+
+ /* ConstantScoreQueries */
+
+ [Test]
+ public override void TestCSQ1()
+ {
+ base.TestCSQ1();
+ }
+
+ [Test]
+ public override void TestCSQ2()
+ {
+ base.TestCSQ2();
+ }
+
+ [Test]
+ public override void TestCSQ3()
+ {
+ base.TestCSQ3();
+ }
+
+ /* DisjunctionMaxQuery */
+
+ [Test]
+ public override void TestDMQ1()
+ {
+ base.TestDMQ1();
+ }
+
+ [Test]
+ public override void TestDMQ2()
+ {
+ base.TestDMQ2();
+ }
+
+ [Test]
+ public override void TestDMQ3()
+ {
+ base.TestDMQ3();
+ }
+
+ [Test]
+ public override void TestDMQ4()
+ {
+ base.TestDMQ4();
+ }
+
+ [Test]
+ public override void TestDMQ5()
+ {
+ base.TestDMQ5();
+ }
+
+ [Test]
+ public override void TestDMQ6()
+ {
+ base.TestDMQ6();
+ }
+
+ [Test]
+ public override void TestDMQ7()
+ {
+ base.TestDMQ7();
+ }
+
+ [Test]
+ public override void TestDMQ8()
+ {
+ base.TestDMQ8();
+ }
+
+ [Test]
+ public override void TestDMQ9()
+ {
+ base.TestDMQ9();
+ }
+
+ /* MultiPhraseQuery */
+
+ [Test]
+ public override void TestMPQ1()
+ {
+ base.TestMPQ1();
+ }
+
+ [Test]
+ public override void TestMPQ2()
+ {
+ base.TestMPQ2();
+ }
+
+ [Test]
+ public override void TestMPQ3()
+ {
+ base.TestMPQ3();
+ }
+
+ [Test]
+ public override void TestMPQ4()
+ {
+ base.TestMPQ4();
+ }
+
+ [Test]
+ public override void TestMPQ5()
+ {
+ base.TestMPQ5();
+ }
+
+ [Test]
+ public override void TestMPQ6()
+ {
+ base.TestMPQ6();
+ }
+
+ /* some simple tests of boolean queries containing term queries */
+
+ [Test]
+ public override void TestBQ1()
+ {
+ base.TestBQ1();
+ }
+
+ [Test]
+ public override void TestBQ2()
+ {
+ base.TestBQ2();
+ }
+
+ [Test]
+ public override void TestBQ3()
+ {
+ base.TestBQ3();
+ }
+
+ [Test]
+ public override void TestBQ4()
+ {
+ base.TestBQ4();
+ }
+
+ [Test]
+ public override void TestBQ5()
+ {
+ base.TestBQ5();
+ }
+
+ [Test]
+ public override void TestBQ6()
+ {
+ base.TestBQ6();
+ }
+
+ [Test]
+ public override void TestBQ7()
+ {
+ base.TestBQ7();
+ }
+
+ [Test]
+ public override void TestBQ8()
+ {
+ base.TestBQ8();
+ }
+
+ [Test]
+ public override void TestBQ9()
+ {
+ base.TestBQ9();
+ }
+
+ [Test]
+ public override void TestBQ10()
+ {
+ base.TestBQ10();
+ }
+
+ [Test]
+ public override void TestBQ11()
+ {
+ base.TestBQ11();
+ }
+
+ [Test]
+ public override void TestBQ14()
+ {
+ base.TestBQ14();
+ }
+
+ [Test]
+ public override void TestBQ15()
+ {
+ base.TestBQ15();
+ }
+
+ [Test]
+ public override void TestBQ16()
+ {
+ base.TestBQ16();
+ }
+
+ [Test]
+ public override void TestBQ17()
+ {
+ base.TestBQ17();
+ }
+
+ [Test]
+ public override void TestBQ19()
+ {
+ base.TestBQ19();
+ }
+
+ [Test]
+ public override void TestBQ20()
+ {
+ base.TestBQ20();
+ }
+
+ /* BQ of TQ: using alt so some fields have zero boost and some don't */
+
+ [Test]
+ public override void TestMultiFieldBQ1()
+ {
+ base.TestMultiFieldBQ1();
+ }
+
+ [Test]
+ public override void TestMultiFieldBQ2()
+ {
+ base.TestMultiFieldBQ2();
+ }
+
+ [Test]
+ public override void TestMultiFieldBQ3()
+ {
+ base.TestMultiFieldBQ3();
+ }
+
+ [Test]
+ public override void TestMultiFieldBQ4()
+ {
+ base.TestMultiFieldBQ4();
+ }
+
+ [Test]
+ public override void TestMultiFieldBQ5()
+ {
+ base.TestMultiFieldBQ5();
+ }
+
+ [Test]
+ public override void TestMultiFieldBQ6()
+ {
+ base.TestMultiFieldBQ6();
+ }
+
+ [Test]
+ public override void TestMultiFieldBQ7()
+ {
+ base.TestMultiFieldBQ7();
+ }
+
+ [Test]
+ public override void TestMultiFieldBQ8()
+ {
+ base.TestMultiFieldBQ8();
+ }
+
+ [Test]
+ public override void TestMultiFieldBQ9()
+ {
+ base.TestMultiFieldBQ9();
+ }
+
+ [Test]
+ public override void TestMultiFieldBQ10()
+ {
+ base.TestMultiFieldBQ10();
+ }
+
+ /* BQ of PQ: using alt so some fields have zero boost and some don't */
+
+ [Test]
+ public override void TestMultiFieldBQofPQ1()
+ {
+ base.TestMultiFieldBQofPQ1();
+ }
+
+ [Test]
+ public override void TestMultiFieldBQofPQ2()
+ {
+ base.TestMultiFieldBQofPQ2();
+ }
+
+ [Test]
+ public override void TestMultiFieldBQofPQ3()
+ {
+ base.TestMultiFieldBQofPQ3();
+ }
+
+ [Test]
+ public override void TestMultiFieldBQofPQ4()
+ {
+ base.TestMultiFieldBQofPQ4();
+ }
+
+ [Test]
+ public override void TestMultiFieldBQofPQ5()
+ {
+ base.TestMultiFieldBQofPQ5();
+ }
+
+ [Test]
+ public override void TestMultiFieldBQofPQ6()
+ {
+ base.TestMultiFieldBQofPQ6();
+ }
+
+ [Test]
+ public override void TestMultiFieldBQofPQ7()
+ {
+ base.TestMultiFieldBQofPQ7();
+ }
+
+ #endregion
+
+ #region TestExplanations
+ // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+
+ /// <summary>
+ /// Placeholder: JUnit freaks if you don't have one test ... making
+ /// class abstract doesn't help
+ /// </summary>
+ [Test]
+ public override void TestNoop()
+ {
+ base.TestNoop();
+ }
+
+ #endregion
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/701b9ed2/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs b/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
index bb1c4d0..f8c9fb3 100644
--- a/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
@@ -177,5 +177,19 @@ namespace Lucene.Net.Search
result = search.Search(q, TermRangeFilter.NewStringRange("rand", maxRP, null, T, F), numDocs).ScoreDocs;
Assert.AreEqual(1, result.Length, "max,nul,T,T");
}
+
+
+ #region SorterTestBase
+ // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+ [Test]
+ public override void TestPad()
+ {
+ base.TestPad();
+ }
+
+ #endregion
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/701b9ed2/src/Lucene.Net.Tests/core/Support/TestLinkedHashMap.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Support/TestLinkedHashMap.cs b/src/Lucene.Net.Tests/core/Support/TestLinkedHashMap.cs
index 73875e2..f103307 100644
--- a/src/Lucene.Net.Tests/core/Support/TestLinkedHashMap.cs
+++ b/src/Lucene.Net.Tests/core/Support/TestLinkedHashMap.cs
@@ -355,5 +355,85 @@ namespace Lucene.Net.Support
dict.Remove(nullTarget);
Assert.IsFalse(dict.Contains(nullTarget));
}
+
+
+ #region TestHashMap
+ // LUCENENET NOTE: Tests in a base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+ [Test, LuceneNetSpecific]
+ public override void TestKeyEnumeration()
+ {
+ base.TestKeyEnumeration();
+ }
+
+ [Test, LuceneNetSpecific]
+ public override void TestValueEnumeration()
+ {
+ base.TestValueEnumeration();
+ }
+
+ [Test, LuceneNetSpecific]
+ public override void TestKeyValuePairEnumeration()
+ {
+ base.TestKeyValuePairEnumeration();
+ }
+
+ [Test, LuceneNetSpecific]
+ public override void TestContainsNullKey()
+ {
+ base.TestContainsNullKey();
+ }
+
+ [Test, LuceneNetSpecific]
+ public override void TestContainsKey()
+ {
+ base.TestContainsKey();
+ }
+
+ [Test, LuceneNetSpecific]
+ public override void TestAdd_NoNullKeys_NullValues()
+ {
+ base.TestAdd_NoNullKeys_NullValues();
+ }
+
+ [Test, LuceneNetSpecific]
+ public override void TestAdd_WithNullKeys_NoNullValues()
+ {
+ base.TestAdd_WithNullKeys_NoNullValues();
+ }
+
+ [Test, LuceneNetSpecific]
+ public override void TestGetWithNonExistantKey_EmptyCollection()
+ {
+ base.TestGetWithNonExistantKey_EmptyCollection();
+ }
+
+ [Test, LuceneNetSpecific]
+ public override void TestGetWithNonExistantKey()
+ {
+ base.TestGetWithNonExistantKey();
+ }
+
+ [Test, LuceneNetSpecific]
+ public override void TestAddsUpdate_NotThrowException()
+ {
+ base.TestAddsUpdate_NotThrowException();
+ }
+
+ [Test, LuceneNetSpecific]
+ public override void TestIndexersUpdate_NotThrowException()
+ {
+ base.TestIndexersUpdate_NotThrowException();
+ }
+
+ [Test, LuceneNetSpecific]
+ public override void TestWithValueType()
+ {
+ base.TestWithValueType();
+ }
+
+ #endregion
}
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/701b9ed2/src/Lucene.Net.Tests/core/Support/TestLurchTable.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Support/TestLurchTable.cs b/src/Lucene.Net.Tests/core/Support/TestLurchTable.cs
index eb92962..264e95c 100644
--- a/src/Lucene.Net.Tests/core/Support/TestLurchTable.cs
+++ b/src/Lucene.Net.Tests/core/Support/TestLurchTable.cs
@@ -529,6 +529,118 @@ namespace Lucene.Net.Support
return KeyComparer.GetHashCode(obj.Key) ^ ValueComparer.GetHashCode(obj.Value);
}
}
+
+
+ #region TestGenericCollection<TList, TItem>
+ // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+ [Test, LuceneNetSpecific]
+ public void TestGenericCollection_TestAddRemove()
+ {
+ base.TestAddRemove();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestGenericCollection_TestAddReverseRemove()
+ {
+ base.TestAddReverseRemove();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestGenericCollection_TestClear()
+ {
+ base.TestClear();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestGenericCollection_TestContains()
+ {
+ base.TestContains();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestGenericCollection_TestCopyTo()
+ {
+ base.TestCopyTo();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestGenericCollection_TestIsReadOnly()
+ {
+ base.TestIsReadOnly();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestGenericCollection_TestGetEnumerator()
+ {
+ base.TestGetEnumerator();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestGenericCollection_TestGetEnumerator2()
+ {
+ base.TestGetEnumerator2();
+ }
+
+ #endregion
+
+ #region TestCollection<TList, TFactory, TItem>
+ // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+ [Test, LuceneNetSpecific]
+ public void TestCollection_TestAddRemove()
+ {
+ base.TestAddRemove();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestCollection_TestAddReverseRemove()
+ {
+ base.TestAddReverseRemove();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestCollection_TestClear()
+ {
+ base.TestClear();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestCollection_TestContains()
+ {
+ base.TestContains();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestCollection_TestCopyTo()
+ {
+ base.TestCopyTo();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestCollection_TestIsReadOnly()
+ {
+ base.TestIsReadOnly();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestCollection_TestGetEnumerator()
+ {
+ base.TestGetEnumerator();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestCollection_TestGetEnumerator2()
+ {
+ base.TestGetEnumerator2();
+ }
+
+ #endregion
+
}
[TestFixture]
@@ -553,6 +665,32 @@ namespace Lucene.Net.Support
}
return results.ToArray();
}
+
+
+ #region TestDictionary<TDictionary, TFactory, TKey, TValue>
+ // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+ [Test, LuceneNetSpecific]
+ public void TestDictionary_TestAddRemoveByKey()
+ {
+ base.TestAddRemoveByKey();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestDictionary_TestKeys()
+ {
+ base.TestKeys();
+ }
+
+ [Test, LuceneNetSpecific]
+ public void TestDictionary_TestValues()
+ {
+ base.TestValues();
+ }
+
+ #endregion
}
@@ -579,7 +717,7 @@ namespace Lucene.Net.Support
return list;
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestAddRemove()
{
TList list = new TList();
@@ -600,7 +738,7 @@ namespace Lucene.Net.Support
}
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestAddReverseRemove()
{
TList list = new TList();
@@ -621,7 +759,7 @@ namespace Lucene.Net.Support
}
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestClear()
{
TList list = new TList();
@@ -636,7 +774,7 @@ namespace Lucene.Net.Support
Assert.AreEqual(0, list.Count);
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestContains()
{
TList list = new TList();
@@ -650,7 +788,7 @@ namespace Lucene.Net.Support
Assert.IsTrue(list.Contains(item));
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestCopyTo()
{
TList list = new TList();
@@ -670,13 +808,13 @@ namespace Lucene.Net.Support
Assert.AreEqual(0, items.Count);
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestIsReadOnly()
{
Assert.IsFalse(new TList().IsReadOnly);
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestGetEnumerator()
{
TList list = new TList();
@@ -692,7 +830,7 @@ namespace Lucene.Net.Support
Assert.AreEqual(0, items.Count);
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestGetEnumerator2()
{
TList list = new TList();
@@ -758,7 +896,7 @@ namespace Lucene.Net.Support
where TDictionary : IDictionary<TKey, TValue>, IDisposable
where TFactory : IFactory<TDictionary>, new()
{
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestAddRemoveByKey()
{
KeyValuePair<TKey, TValue>[] sample = GetSample();
@@ -780,7 +918,7 @@ namespace Lucene.Net.Support
}
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestKeys()
{
KeyValuePair<TKey, TValue>[] sample = GetSample();
@@ -803,7 +941,7 @@ namespace Lucene.Net.Support
}
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestValues()
{
KeyValuePair<TKey, TValue>[] sample = GetSample();
@@ -832,7 +970,7 @@ namespace Lucene.Net.Support
protected readonly TFactory Factory = new TFactory();
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestAddRemove()
{
using (TList list = Factory.Create())
@@ -855,7 +993,7 @@ namespace Lucene.Net.Support
}
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestAddReverseRemove()
{
using (TList list = Factory.Create())
@@ -878,7 +1016,7 @@ namespace Lucene.Net.Support
}
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestClear()
{
using (TList list = Factory.Create())
@@ -895,7 +1033,7 @@ namespace Lucene.Net.Support
}
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestContains()
{
using (TList list = Factory.Create())
@@ -911,7 +1049,7 @@ namespace Lucene.Net.Support
}
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestCopyTo()
{
using (TList list = Factory.Create())
@@ -933,14 +1071,14 @@ namespace Lucene.Net.Support
}
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestIsReadOnly()
{
using (TList list = Factory.Create())
Assert.IsFalse(list.IsReadOnly);
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestGetEnumerator()
{
using (TList list = Factory.Create())
@@ -958,7 +1096,7 @@ namespace Lucene.Net.Support
}
}
- [Test, LuceneNetSpecific]
+ // [Test, LuceneNetSpecific] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestGetEnumerator2()
{
using (TList list = Factory.Create())
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/701b9ed2/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs b/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
index dd31909..51ac7e2 100644
--- a/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
+++ b/src/Lucene.Net.Tests/core/Util/BaseSortTestCase.cs
@@ -153,55 +153,55 @@ namespace Lucene.Net.Util
DoTest(strategy, Random().Next(20000));
}
- [Test]
+ // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestEmpty()
{
SortTest(new Entry[0]);
}
- [Test]
+ // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestOne()
{
DoTest(RandomStrategy, 1);
}
- [Test]
+ // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestTwo()
{
DoTest(RandomStrategy, 2);
}
- [Test]
+ // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestRandom()
{
DoTest(RandomStrategy);
}
- [Test]
+ // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestRandomLowCardinality()
{
DoTest(RandomLowCardinalityStrategy, 2);
}
- [Test]
+ // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestAscending()
{
DoTest(AscendingStrategy, 2);
}
- [Test]
+ // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestAscendingSequences()
{
DoTest(AscendingSequencesStrategy, 2);
}
- [Test]
+ // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestDescending()
{
DoTest(DescendingStrategy, 2);
}
- [Test]
+ // [Test] // LUCENENET NOTE: For now, we are overriding this test in every subclass to pull it into the right context for the subclass
public virtual void TestStrictlyDescendingStrategy()
{
DoTest(StrictlyDescendingStrategy, 2);
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/701b9ed2/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs b/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
index 91c7062..38d63a1 100644
--- a/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoDocIdSet.cs
@@ -1,4 +1,5 @@
using Lucene.Net.Support;
+using NUnit.Framework;
using System.Collections;
using System.Diagnostics;
@@ -75,5 +76,49 @@ namespace Lucene.Net.Util.Packed
return SlowAdvance(target);
}
}
+
+
+ #region BaseDocIdSetTestCase<T>
+ // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+ /// <summary>
+ /// Test length=0.
+ /// </summary>
+ [Test]
+ public override void TestNoBit()
+ {
+ base.TestNoBit();
+ }
+
+ /// <summary>
+ /// Test length=1.
+ /// </summary>
+ [Test]
+ public override void Test1Bit()
+ {
+ base.Test1Bit();
+ }
+
+ /// <summary>
+ /// Test length=2.
+ /// </summary>
+ [Test]
+ public override void Test2Bits()
+ {
+ base.Test2Bits();
+ }
+
+ /// <summary>
+ /// Compare the content of the set against a <seealso cref="BitSet"/>.
+ /// </summary>
+ [Test]
+ public override void TestAgainstBitSet()
+ {
+ base.TestAgainstBitSet();
+ }
+
+ #endregion
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/701b9ed2/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
index 1294bff..bb779c5 100644
--- a/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestDocIdBitSet.cs
@@ -1,3 +1,5 @@
+using Lucene.Net.Attributes;
+using NUnit.Framework;
using System.Collections;
namespace Lucene.Net.Util
@@ -25,5 +27,49 @@ namespace Lucene.Net.Util
{
return new DocIdBitSet((BitArray)bs.Clone());
}
+
+
+ #region BaseDocIdSetTestCase<T>
+ // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+ /// <summary>
+ /// Test length=0.
+ /// </summary>
+ [Test]
+ public override void TestNoBit()
+ {
+ base.TestNoBit();
+ }
+
+ /// <summary>
+ /// Test length=1.
+ /// </summary>
+ [Test]
+ public override void Test1Bit()
+ {
+ base.Test1Bit();
+ }
+
+ /// <summary>
+ /// Test length=2.
+ /// </summary>
+ [Test]
+ public override void Test2Bits()
+ {
+ base.Test2Bits();
+ }
+
+ /// <summary>
+ /// Compare the content of the set against a <seealso cref="BitSet"/>.
+ /// </summary>
+ [Test, LongRunningTest, Timeout(150000)]
+ public override void TestAgainstBitSet()
+ {
+ base.TestAgainstBitSet();
+ }
+
+ #endregion
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/701b9ed2/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
index 550b3e1..2f822f9 100644
--- a/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestFixedBitSet.cs
@@ -1,4 +1,5 @@
using System;
+using Lucene.Net.Attributes;
using Lucene.Net.Randomized.Generators;
using Lucene.Net.Support;
using NUnit.Framework;
@@ -510,5 +511,49 @@ namespace Lucene.Net.Util
Assert.IsTrue(bits.Get(1));
Assert.IsFalse(newBits.Get(1));
}
+
+
+ #region BaseDocIdSetTestCase<T>
+ // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+ /// <summary>
+ /// Test length=0.
+ /// </summary>
+ [Test]
+ public override void TestNoBit()
+ {
+ base.TestNoBit();
+ }
+
+ /// <summary>
+ /// Test length=1.
+ /// </summary>
+ [Test]
+ public override void Test1Bit()
+ {
+ base.Test1Bit();
+ }
+
+ /// <summary>
+ /// Test length=2.
+ /// </summary>
+ [Test]
+ public override void Test2Bits()
+ {
+ base.Test2Bits();
+ }
+
+ /// <summary>
+ /// Compare the content of the set against a <seealso cref="BitSet"/>.
+ /// </summary>
+ [Test, LongRunningTest, Timeout(150000)]
+ public override void TestAgainstBitSet()
+ {
+ base.TestAgainstBitSet();
+ }
+
+ #endregion
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/701b9ed2/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs b/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
index 5c35706..3649531 100644
--- a/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestInPlaceMergeSorter.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
namespace Lucene.Net.Util
{
/*
@@ -32,5 +34,67 @@ namespace Lucene.Net.Util
{
return new ArrayInPlaceMergeSorter<Entry>(arr, ArrayUtil.naturalComparator<Entry>());
}
+
+
+ #region BaseSortTestCase
+ // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+ [Test]
+ public override void TestEmpty()
+ {
+ base.TestEmpty();
+ }
+
+ [Test]
+ public override void TestOne()
+ {
+ base.TestOne();
+ }
+
+ [Test]
+ public override void TestTwo()
+ {
+ base.TestTwo();
+ }
+
+ [Test]
+ public override void TestRandom()
+ {
+ base.TestRandom();
+ }
+
+ [Test]
+ public override void TestRandomLowCardinality()
+ {
+ base.TestRandomLowCardinality();
+ }
+
+ [Test]
+ public override void TestAscending()
+ {
+ base.TestAscending();
+ }
+
+ [Test]
+ public override void TestAscendingSequences()
+ {
+ base.TestAscendingSequences();
+ }
+
+ [Test]
+ public override void TestDescending()
+ {
+ base.TestDescending();
+ }
+
+ [Test]
+ public override void TestStrictlyDescendingStrategy()
+ {
+ base.TestStrictlyDescendingStrategy();
+ }
+
+ #endregion
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/701b9ed2/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs b/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
index c71893a..b2c75f8 100644
--- a/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestIntroSorter.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
namespace Lucene.Net.Util
{
/*
@@ -28,5 +30,67 @@ namespace Lucene.Net.Util
{
return new ArrayIntroSorter<Entry>(arr, ArrayUtil.naturalComparator<Entry>());
}
+
+
+ #region BaseSortTestCase
+ // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+ [Test]
+ public override void TestEmpty()
+ {
+ base.TestEmpty();
+ }
+
+ [Test]
+ public override void TestOne()
+ {
+ base.TestOne();
+ }
+
+ [Test]
+ public override void TestTwo()
+ {
+ base.TestTwo();
+ }
+
+ [Test]
+ public override void TestRandom()
+ {
+ base.TestRandom();
+ }
+
+ [Test]
+ public override void TestRandomLowCardinality()
+ {
+ base.TestRandomLowCardinality();
+ }
+
+ [Test]
+ public override void TestAscending()
+ {
+ base.TestAscending();
+ }
+
+ [Test]
+ public override void TestAscendingSequences()
+ {
+ base.TestAscendingSequences();
+ }
+
+ [Test]
+ public override void TestDescending()
+ {
+ base.TestDescending();
+ }
+
+ [Test]
+ public override void TestStrictlyDescendingStrategy()
+ {
+ base.TestStrictlyDescendingStrategy();
+ }
+
+ #endregion
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/701b9ed2/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
index c72aa45..8144d1c 100644
--- a/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestOpenBitSet.cs
@@ -514,5 +514,49 @@ namespace Lucene.Net.Util
bits.FastSet(bit - 1);
Assert.IsTrue(bits.FastGet(bit - 1));
}
+
+
+ #region BaseDocIdSetTestCase<T>
+ // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+ /// <summary>
+ /// Test length=0.
+ /// </summary>
+ [Test]
+ public override void TestNoBit()
+ {
+ base.TestNoBit();
+ }
+
+ /// <summary>
+ /// Test length=1.
+ /// </summary>
+ [Test]
+ public override void Test1Bit()
+ {
+ base.Test1Bit();
+ }
+
+ /// <summary>
+ /// Test length=2.
+ /// </summary>
+ [Test]
+ public override void Test2Bits()
+ {
+ base.Test2Bits();
+ }
+
+ /// <summary>
+ /// Compare the content of the set against a <seealso cref="BitSet"/>.
+ /// </summary>
+ [Test, LongRunningTest, Timeout(150000)]
+ public override void TestAgainstBitSet()
+ {
+ base.TestAgainstBitSet();
+ }
+
+ #endregion
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/701b9ed2/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs b/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
index 3c92150..b310b7b 100644
--- a/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestPForDeltaDocIdSet.cs
@@ -38,5 +38,49 @@ namespace Lucene.Net.Util
base.AssertEquals(numBits, ds1, ds2);
Assert.AreEqual(ds1.Cardinality(), ds2.Cardinality());
}
+
+
+ #region BaseDocIdSetTestCase<T>
+ // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+ /// <summary>
+ /// Test length=0.
+ /// </summary>
+ [Test]
+ public override void TestNoBit()
+ {
+ base.TestNoBit();
+ }
+
+ /// <summary>
+ /// Test length=1.
+ /// </summary>
+ [Test]
+ public override void Test1Bit()
+ {
+ base.Test1Bit();
+ }
+
+ /// <summary>
+ /// Test length=2.
+ /// </summary>
+ [Test]
+ public override void Test2Bits()
+ {
+ base.Test2Bits();
+ }
+
+ /// <summary>
+ /// Compare the content of the set against a <seealso cref="BitSet"/>.
+ /// </summary>
+ [Test]
+ public override void TestAgainstBitSet()
+ {
+ base.TestAgainstBitSet();
+ }
+
+ #endregion
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/701b9ed2/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs b/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
index c12b850..8f13308 100644
--- a/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestTimSorter.cs
@@ -1,3 +1,5 @@
+using NUnit.Framework;
+
namespace Lucene.Net.Util
{
/*
@@ -28,5 +30,67 @@ namespace Lucene.Net.Util
{
return new ArrayTimSorter<Entry>(arr, ArrayUtil.naturalComparator<Entry>(), TestUtil.NextInt(Random(), 0, arr.Length));
}
+
+
+ #region BaseSortTestCase
+ // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+ [Test]
+ public override void TestEmpty()
+ {
+ base.TestEmpty();
+ }
+
+ [Test]
+ public override void TestOne()
+ {
+ base.TestOne();
+ }
+
+ [Test]
+ public override void TestTwo()
+ {
+ base.TestTwo();
+ }
+
+ [Test]
+ public override void TestRandom()
+ {
+ base.TestRandom();
+ }
+
+ [Test]
+ public override void TestRandomLowCardinality()
+ {
+ base.TestRandomLowCardinality();
+ }
+
+ [Test]
+ public override void TestAscending()
+ {
+ base.TestAscending();
+ }
+
+ [Test]
+ public override void TestAscendingSequences()
+ {
+ base.TestAscendingSequences();
+ }
+
+ [Test]
+ public override void TestDescending()
+ {
+ base.TestDescending();
+ }
+
+ [Test]
+ public override void TestStrictlyDescendingStrategy()
+ {
+ base.TestStrictlyDescendingStrategy();
+ }
+
+ #endregion
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/701b9ed2/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs b/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
index 73d338d..b0d3ea0 100644
--- a/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestWAH8DocIdSet.cs
@@ -106,5 +106,49 @@ namespace Lucene.Net.Util
}
AssertEquals(numBits, expected, union);
}
+
+
+ #region BaseDocIdSetTestCase<T>
+ // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct
+ // context in Visual Studio. This fixes that with the minimum amount of code necessary
+ // to run them in the correct context without duplicating all of the tests.
+
+ /// <summary>
+ /// Test length=0.
+ /// </summary>
+ [Test]
+ public override void TestNoBit()
+ {
+ base.TestNoBit();
+ }
+
+ /// <summary>
+ /// Test length=1.
+ /// </summary>
+ [Test]
+ public override void Test1Bit()
+ {
+ base.Test1Bit();
+ }
+
+ /// <summary>
+ /// Test length=2.
+ /// </summary>
+ [Test]
+ public override void Test2Bits()
+ {
+ base.Test2Bits();
+ }
+
+ /// <summary>
+ /// Compare the content of the set against a <seealso cref="BitSet"/>.
+ /// </summary>
+ [Test]
+ public override void TestAgainstBitSet()
+ {
+ base.TestAgainstBitSet();
+ }
+
+ #endregion
}
}
\ No newline at end of file