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/10/11 18:35:11 UTC
[26/47] lucenenet git commit: Added Codecs.Memory tests to the project
Added Codecs.Memory tests to the project
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/d7dca527
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/d7dca527
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/d7dca527
Branch: refs/heads/master
Commit: d7dca5273328d205c204a0bf4efa718396a28698
Parents: b00ad49
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Oct 11 00:19:27 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:24 2016 +0700
----------------------------------------------------------------------
.../Lucene.Net.Tests.Codecs.csproj | 8 ++++
.../Memory/TestDirectDocValuesFormat.cs | 41 ++++++++--------
.../Memory/TestDirectPostingsFormat.cs | 44 +++++++++---------
.../Memory/TestFSTOrdPostingsFormat.cs | 41 ++++++++--------
.../Memory/TestFSTOrdPulsing41PostingsFormat.cs | 41 ++++++++--------
.../Memory/TestFSTPostingsFormat.cs | 41 ++++++++--------
.../Memory/TestFSTPulsing41PostingsFormat.cs | 41 ++++++++--------
.../Memory/TestMemoryDocValuesFormat.cs | 49 ++++++++++----------
.../Memory/TestMemoryPostingsFormat.cs | 44 +++++++++---------
9 files changed, 174 insertions(+), 176 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
index ec557a4..9a32f6c 100644
--- a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
+++ b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
@@ -48,6 +48,14 @@
<Compile Include="IntBlock\TestFixedIntBlockPostingsFormat.cs" />
<Compile Include="IntBlock\TestIntBlockCodec.cs" />
<Compile Include="IntBlock\TestVariableIntBlockPostingsFormat.cs" />
+ <Compile Include="Memory\TestDirectDocValuesFormat.cs" />
+ <Compile Include="Memory\TestDirectPostingsFormat.cs" />
+ <Compile Include="Memory\TestFSTOrdPostingsFormat.cs" />
+ <Compile Include="Memory\TestFSTOrdPulsing41PostingsFormat.cs" />
+ <Compile Include="Memory\TestFSTPostingsFormat.cs" />
+ <Compile Include="Memory\TestFSTPulsing41PostingsFormat.cs" />
+ <Compile Include="Memory\TestMemoryDocValuesFormat.cs" />
+ <Compile Include="Memory\TestMemoryPostingsFormat.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Pulsing\Test10KPulsings.cs" />
<Compile Include="Pulsing\TestPulsingPostingsFormat.cs" />
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
index e05827e..ace0574 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
- /*
+namespace Lucene.Net.Codecs.Memory
+{
+ /*
* 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.
@@ -18,23 +21,19 @@
* limitations under the License.
*/
- using BaseDocValuesFormatTestCase = org.apache.lucene.index.BaseDocValuesFormatTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Tests DirectDocValuesFormat
- /// </summary>
- public class TestDirectDocValuesFormat : BaseDocValuesFormatTestCase
- {
- private readonly Codec codec = TestUtil.alwaysDocValuesFormat(new DirectDocValuesFormat());
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
+ /// <summary>
+ /// Tests DirectDocValuesFormat
+ /// </summary>
+ public class TestDirectDocValuesFormat : BaseDocValuesFormatTestCase
+ {
+ private readonly Codec codec = TestUtil.AlwaysDocValuesFormat(new DirectDocValuesFormat());
+ protected override Codec Codec
+ {
+ get
+ {
+ return codec;
+ }
+ }
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
index 96a04cb..990e29c 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
- /*
+namespace Lucene.Net.Codecs.Memory
+{
+ /*
* 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.
@@ -18,25 +21,20 @@
* limitations under the License.
*/
- using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Tests DirectPostingsFormat
- /// </summary>
- public class TestDirectPostingsFormat : BasePostingsFormatTestCase
- {
- // TODO: randomize parameters
- private readonly Codec codec = TestUtil.alwaysPostingsFormat(new DirectPostingsFormat());
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
+ /// <summary>
+ /// Tests DirectPostingsFormat
+ /// </summary>
+ public class TestDirectPostingsFormat : BasePostingsFormatTestCase
+ {
+ // TODO: randomize parameters
+ private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new DirectPostingsFormat());
+ protected override Codec Codec
+ {
+ get
+ {
+ return codec;
+ }
+ }
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
index cc5afb0..6f30a01 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
- /*
+namespace Lucene.Net.Codecs.Memory
+{
+ /*
* 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.
@@ -18,23 +21,19 @@
* limitations under the License.
*/
- using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Tests FSTOrdPostingsFormat
- /// </summary>
- public class TestFSTOrdPostingsFormat : BasePostingsFormatTestCase
- {
- private readonly Codec codec = TestUtil.alwaysPostingsFormat(new FSTOrdPostingsFormat());
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
+ /// <summary>
+ /// Tests FSTOrdPostingsFormat
+ /// </summary>
+ public class TestFSTOrdPostingsFormat : BasePostingsFormatTestCase
+ {
+ private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new FSTOrdPostingsFormat());
+ protected override Codec Codec
+ {
+ get
+ {
+ return codec;
+ }
+ }
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
index a963c73..ddb99c6 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
- /*
+namespace Lucene.Net.Codecs.Memory
+{
+ /*
* 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.
@@ -18,23 +21,19 @@
* limitations under the License.
*/
- using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Tests FSTOrdPulsing41PostingsFormat
- /// </summary>
- public class TestFSTOrdPulsing41PostingsFormat : BasePostingsFormatTestCase
- {
- private readonly Codec codec = TestUtil.alwaysPostingsFormat(new FSTOrdPulsing41PostingsFormat());
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
+ /// <summary>
+ /// Tests FSTOrdPulsing41PostingsFormat
+ /// </summary>
+ public class TestFSTOrdPulsing41PostingsFormat : BasePostingsFormatTestCase
+ {
+ private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new FSTOrdPulsing41PostingsFormat());
+ protected override Codec Codec
+ {
+ get
+ {
+ return codec;
+ }
+ }
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
index 261b41f..cac7e77 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
- /*
+namespace Lucene.Net.Codecs.Memory
+{
+ /*
* 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.
@@ -18,23 +21,19 @@
* limitations under the License.
*/
- using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Tests FSTPostingsFormat
- /// </summary>
- public class TestFSTPostingsFormat : BasePostingsFormatTestCase
- {
- private readonly Codec codec = TestUtil.alwaysPostingsFormat(new FSTPostingsFormat());
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
+ /// <summary>
+ /// Tests FSTPostingsFormat
+ /// </summary>
+ public class TestFSTPostingsFormat : BasePostingsFormatTestCase
+ {
+ private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new FSTPostingsFormat());
+ protected override Codec Codec
+ {
+ get
+ {
+ return codec;
+ }
+ }
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
index f1daa94..e9beed4 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPulsing41PostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
- /*
+namespace Lucene.Net.Codecs.Memory
+{
+ /*
* 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.
@@ -18,23 +21,19 @@
* limitations under the License.
*/
- using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Tests FSTPulsing41PostingsFormat
- /// </summary>
- public class TestFSTPulsing41PostingsFormat : BasePostingsFormatTestCase
- {
- private readonly Codec codec = TestUtil.alwaysPostingsFormat(new FSTPulsing41PostingsFormat());
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
+ /// <summary>
+ /// Tests FSTPulsing41PostingsFormat
+ /// </summary>
+ public class TestFSTPulsing41PostingsFormat : BasePostingsFormatTestCase
+ {
+ private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new FSTPulsing41PostingsFormat());
+ protected override Codec Codec
+ {
+ get
+ {
+ return codec;
+ }
+ }
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
index f1f78c3..4f65807 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryDocValuesFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
- /*
+namespace Lucene.Net.Codecs.Memory
+{
+ /*
* 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.
@@ -18,28 +21,24 @@
* limitations under the License.
*/
- using BaseCompressingDocValuesFormatTestCase = org.apache.lucene.index.BaseCompressingDocValuesFormatTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Tests MemoryDocValuesFormat
- /// </summary>
- public class TestMemoryDocValuesFormat : BaseCompressingDocValuesFormatTestCase
- {
- private readonly Codec codec = TestUtil.alwaysDocValuesFormat(new MemoryDocValuesFormat());
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
+ /// <summary>
+ /// Tests MemoryDocValuesFormat
+ /// </summary>
+ public class TestMemoryDocValuesFormat : BaseCompressingDocValuesFormatTestCase
+ {
+ private readonly Codec codec = TestUtil.AlwaysDocValuesFormat(new MemoryDocValuesFormat());
- protected internal override bool codecAcceptsHugeBinaryValues(string field)
- {
- return false;
- }
- }
+ protected override Codec Codec
+ {
+ get
+ {
+ return codec;
+ }
+ }
+ protected override bool CodecAcceptsHugeBinaryValues(string field)
+ {
+ return false;
+ }
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d7dca527/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
index 62da9a8..938ae52 100644
--- a/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestMemoryPostingsFormat.cs
@@ -1,7 +1,10 @@
-\ufeffnamespace org.apache.lucene.codecs.memory
-{
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Util;
+using NUnit.Framework;
- /*
+namespace Lucene.Net.Codecs.Memory
+{
+ /*
* 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.
@@ -18,25 +21,20 @@
* limitations under the License.
*/
- using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Tests MemoryPostingsFormat
- /// </summary>
- public class TestMemoryPostingsFormat : BasePostingsFormatTestCase
- {
- // TODO: randomize doPack
- private readonly Codec codec = TestUtil.alwaysPostingsFormat(new MemoryPostingsFormat());
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
+ /// <summary>
+ /// Tests MemoryPostingsFormat
+ /// </summary>
+ public class TestMemoryPostingsFormat : BasePostingsFormatTestCase
+ {
+ // TODO: randomize doPack
+ private readonly Codec codec = TestUtil.AlwaysPostingsFormat(new MemoryPostingsFormat());
+ protected override Codec Codec
+ {
+ get
+ {
+ return codec;
+ }
+ }
+ }
}
\ No newline at end of file