You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by sy...@apache.org on 2015/01/20 23:51:56 UTC
[2/2] lucenenet git commit: Moved Codecs Tests to their rightful
place + folder uppercasing
Moved Codecs Tests to their rightful place + folder uppercasing
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/5de15ec2
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/5de15ec2
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/5de15ec2
Branch: refs/heads/master
Commit: 5de15ec254d844c0f48082861579e1594c4ae182
Parents: 9d9e50f
Author: Itamar Syn-Hershko <it...@code972.com>
Authored: Wed Jan 21 00:51:40 2015 +0200
Committer: Itamar Syn-Hershko <it...@code972.com>
Committed: Wed Jan 21 00:51:40 2015 +0200
----------------------------------------------------------------------
.../Lucene.Net.Codecs.Tests.csproj | 67 -------
.../Properties/AssemblyInfo.cs | 36 ----
.../blockterms/TestFixedGapPostingsFormat.cs | 43 -----
.../bloom/TestBloomPostingsFormat.cs | 40 ----
.../diskdv/TestDiskDocValuesFormat.cs | 42 -----
.../intblock/TestFixedIntBlockPostingsFormat.cs | 42 -----
.../intblock/TestIntBlockCodec.cs | 76 --------
.../TestVariableIntBlockPostingsFormat.cs | 43 -----
.../memory/TestDirectDocValuesFormat.cs | 40 ----
.../memory/TestDirectPostingsFormat.cs | 42 -----
.../memory/TestFSTOrdPostingsFormat.cs | 40 ----
.../memory/TestFSTOrdPulsing41PostingsFormat.cs | 40 ----
.../memory/TestFSTPostingsFormat.cs | 40 ----
.../memory/TestFSTPulsing41PostingsFormat.cs | 40 ----
.../memory/TestMemoryDocValuesFormat.cs | 45 -----
.../memory/TestMemoryPostingsFormat.cs | 42 -----
.../pulsing/Test10KPulsings.cs | 183 -------------------
.../pulsing/TestPulsingPostingsFormat.cs | 42 -----
.../pulsing/TestPulsingReuse.cs | 134 --------------
.../sep/TestSepPostingsFormat.cs | 42 -----
.../simpletext/TestSimpleTextDocValuesFormat.cs | 39 ----
.../simpletext/TestSimpleTextPostingsFormat.cs | 42 -----
.../TestSimpleTextStoredFieldsFormat.cs | 35 ----
.../TestSimpleTextTermVectorsFormat.cs | 36 ----
.../BlockTerms/TestFixedGapPostingsFormat.cs | 43 +++++
.../Bloom/TestBloomPostingsFormat.cs | 40 ++++
.../DiskDv/TestDiskDocValuesFormat.cs | 42 +++++
.../IntBlock/TestFixedIntBlockPostingsFormat.cs | 42 +++++
.../IntBlock/TestIntBlockCodec.cs | 76 ++++++++
.../TestVariableIntBlockPostingsFormat.cs | 43 +++++
.../Lucene.Net.Codecs.Tests.csproj | 67 +++++++
.../Memory/TestDirectDocValuesFormat.cs | 40 ++++
.../Memory/TestDirectPostingsFormat.cs | 42 +++++
.../Memory/TestFSTOrdPostingsFormat.cs | 40 ++++
.../Memory/TestFSTOrdPulsing41PostingsFormat.cs | 40 ++++
.../Memory/TestFSTPostingsFormat.cs | 40 ++++
.../Memory/TestFSTPulsing41PostingsFormat.cs | 40 ++++
.../Memory/TestMemoryDocValuesFormat.cs | 45 +++++
.../Memory/TestMemoryPostingsFormat.cs | 42 +++++
.../Properties/AssemblyInfo.cs | 36 ++++
.../Pulsing/Test10KPulsings.cs | 183 +++++++++++++++++++
.../Pulsing/TestPulsingPostingsFormat.cs | 42 +++++
.../Pulsing/TestPulsingReuse.cs | 134 ++++++++++++++
.../Sep/TestSepPostingsFormat.cs | 42 +++++
.../SimpleText/TestSimpleTextDocValuesFormat.cs | 39 ++++
.../SimpleText/TestSimpleTextPostingsFormat.cs | 42 +++++
.../TestSimpleTextStoredFieldsFormat.cs | 35 ++++
.../TestSimpleTextTermVectorsFormat.cs | 36 ++++
48 files changed, 1271 insertions(+), 1271 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/Lucene.Net.Codecs.Tests.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/Lucene.Net.Codecs.Tests.csproj b/src/Lucene.Net.Codecs.Tests/Lucene.Net.Codecs.Tests.csproj
deleted file mode 100644
index 12eb5c6..0000000
--- a/src/Lucene.Net.Codecs.Tests/Lucene.Net.Codecs.Tests.csproj
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{351B75B1-BBD5-4E32-8036-7BED4E0135A6}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Lucene.Net.Codecs.Tests</RootNamespace>
- <AssemblyName>Lucene.Net.Codecs.Tests</AssemblyName>
- <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="diskdv\TestDiskDocValuesFormat.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Lucene.Net.Codecs\Lucene.Net.Codecs.csproj">
- <Project>{3f79b6d4-4359-4f83-b64f-07f4f6262425}</Project>
- <Name>Lucene.Net.Codecs</Name>
- </ProjectReference>
- <ProjectReference Include="..\Lucene.Net.Core\Lucene.Net.csproj">
- <Project>{5d4ad9be-1ffb-41ab-9943-25737971bf57}</Project>
- <Name>Lucene.Net</Name>
- </ProjectReference>
- <ProjectReference Include="..\Lucene.Net.Tests\Lucene.Net.Tests.csproj">
- <Project>{de63db10-975f-460d-af85-572c17a91284}</Project>
- <Name>Lucene.Net.Tests</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/Properties/AssemblyInfo.cs b/src/Lucene.Net.Codecs.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index a54794e..0000000
--- a/src/Lucene.Net.Codecs.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Lucene.Net.Codecs.Tests")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Lucene.Net.Codecs.Tests")]
-[assembly: AssemblyCopyright("Copyright © 2014")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("39e5e0c8-c1d3-4583-b9f7-8fbd695e5601")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/blockterms/TestFixedGapPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/blockterms/TestFixedGapPostingsFormat.cs b/src/Lucene.Net.Codecs.Tests/blockterms/TestFixedGapPostingsFormat.cs
deleted file mode 100644
index 11aa1b8..0000000
--- a/src/Lucene.Net.Codecs.Tests/blockterms/TestFixedGapPostingsFormat.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-namespace org.apache.lucene.codecs.blockterms
-{
-
- /*
- * 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 Lucene41WithOrds = org.apache.lucene.codecs.lucene41ords.Lucene41WithOrds;
- using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Basic tests of a PF using FixedGap terms dictionary
- /// </summary>
- // TODO: we should add an instantiation for VarGap too to TestFramework, and a test in this package
- // TODO: ensure both of these are also in rotation in RandomCodec
- public class TestFixedGapPostingsFormat : BasePostingsFormatTestCase
- {
- private readonly Codec codec = TestUtil.alwaysPostingsFormat(new Lucene41WithOrds());
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/bloom/TestBloomPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/bloom/TestBloomPostingsFormat.cs b/src/Lucene.Net.Codecs.Tests/bloom/TestBloomPostingsFormat.cs
deleted file mode 100644
index 2548f2b..0000000
--- a/src/Lucene.Net.Codecs.Tests/bloom/TestBloomPostingsFormat.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-namespace org.apache.lucene.codecs.bloom
-{
-
- /*
- * 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 BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Basic tests for BloomPostingsFormat
- /// </summary>
- public class TestBloomPostingsFormat : BasePostingsFormatTestCase
- {
- private readonly Codec codec = TestUtil.alwaysPostingsFormat(new TestBloomFilteredLucene41Postings());
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/diskdv/TestDiskDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/diskdv/TestDiskDocValuesFormat.cs b/src/Lucene.Net.Codecs.Tests/diskdv/TestDiskDocValuesFormat.cs
deleted file mode 100644
index 01889ae..0000000
--- a/src/Lucene.Net.Codecs.Tests/diskdv/TestDiskDocValuesFormat.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.Codecs.DiskDV;
-
-namespace Lucene.Net.Codecs.DiskDV
-{
-
- using BaseCompressingDocValuesFormatTestCase = Lucene.Net.Index.BaseCompressingDocValuesFormatTestCase;
- using TestUtil = Lucene.Net.Util.TestUtil;
-
- /// <summary>
- /// Tests DiskDocValuesFormat
- /// </summary>
- public class TestDiskDocValuesFormat : BaseCompressingDocValuesFormatTestCase
- {
- private readonly Codec codec = TestUtil.alwaysDocValuesFormat(new DiskDocValuesFormat());
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/intblock/TestFixedIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/intblock/TestFixedIntBlockPostingsFormat.cs b/src/Lucene.Net.Codecs.Tests/intblock/TestFixedIntBlockPostingsFormat.cs
deleted file mode 100644
index 1133c64..0000000
--- a/src/Lucene.Net.Codecs.Tests/intblock/TestFixedIntBlockPostingsFormat.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-namespace org.apache.lucene.codecs.intblock
-{
-
- /*
- * 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 MockFixedIntBlockPostingsFormat = org.apache.lucene.codecs.mockintblock.MockFixedIntBlockPostingsFormat;
- using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Basic tests for FixedIntBlock
- /// </summary>
- public class TestFixedIntBlockPostingsFormat : BasePostingsFormatTestCase
- {
- // TODO: randomize blocksize
- private readonly Codec codec = TestUtil.alwaysPostingsFormat(new MockFixedIntBlockPostingsFormat());
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/intblock/TestIntBlockCodec.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/intblock/TestIntBlockCodec.cs b/src/Lucene.Net.Codecs.Tests/intblock/TestIntBlockCodec.cs
deleted file mode 100644
index 1e973dc..0000000
--- a/src/Lucene.Net.Codecs.Tests/intblock/TestIntBlockCodec.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-namespace org.apache.lucene.codecs.intblock
-{
-
- /*
- * 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 LuceneTestCase = org.apache.lucene.util.LuceneTestCase;
- using org.apache.lucene.store;
- using org.apache.lucene.codecs.mockintblock;
- using org.apache.lucene.codecs.sep;
-
- public class TestIntBlockCodec : LuceneTestCase
- {
-
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: public void testSimpleIntBlocks() throws Exception
- public virtual void testSimpleIntBlocks()
- {
- Directory dir = newDirectory();
-
- IntStreamFactory f = (new MockFixedIntBlockPostingsFormat(128)).IntFactory;
-
- IntIndexOutput @out = f.createOutput(dir, "test", newIOContext(random()));
- for (int i = 0;i < 11777;i++)
- {
- @out.write(i);
- }
- @out.close();
-
- IntIndexInput @in = f.openInput(dir, "test", newIOContext(random()));
- IntIndexInput.Reader r = @in.reader();
-
- for (int i = 0;i < 11777;i++)
- {
- assertEquals(i, r.next());
- }
- @in.close();
-
- dir.close();
- }
-
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: public void testEmptySimpleIntBlocks() throws Exception
- public virtual void testEmptySimpleIntBlocks()
- {
- Directory dir = newDirectory();
-
- IntStreamFactory f = (new MockFixedIntBlockPostingsFormat(128)).IntFactory;
- IntIndexOutput @out = f.createOutput(dir, "test", newIOContext(random()));
-
- // write no ints
- @out.close();
-
- IntIndexInput @in = f.openInput(dir, "test", newIOContext(random()));
- @in.reader();
- // read no ints
- @in.close();
- dir.close();
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/intblock/TestVariableIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/intblock/TestVariableIntBlockPostingsFormat.cs b/src/Lucene.Net.Codecs.Tests/intblock/TestVariableIntBlockPostingsFormat.cs
deleted file mode 100644
index 0a8a644..0000000
--- a/src/Lucene.Net.Codecs.Tests/intblock/TestVariableIntBlockPostingsFormat.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-namespace org.apache.lucene.codecs.intblock
-{
-
- /*
- * 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 MockVariableIntBlockPostingsFormat = org.apache.lucene.codecs.mockintblock.MockVariableIntBlockPostingsFormat;
- using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Basic tests for VariableIntBlock
- /// </summary>
- public class TestVariableIntBlockPostingsFormat : BasePostingsFormatTestCase
- {
- // TODO: randomize blocksize
- private readonly Codec codec = TestUtil.alwaysPostingsFormat(new MockVariableIntBlockPostingsFormat());
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/memory/TestDirectDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/memory/TestDirectDocValuesFormat.cs b/src/Lucene.Net.Codecs.Tests/memory/TestDirectDocValuesFormat.cs
deleted file mode 100644
index e05827e..0000000
--- a/src/Lucene.Net.Codecs.Tests/memory/TestDirectDocValuesFormat.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-namespace org.apache.lucene.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.
- * 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 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;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/memory/TestDirectPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/memory/TestDirectPostingsFormat.cs b/src/Lucene.Net.Codecs.Tests/memory/TestDirectPostingsFormat.cs
deleted file mode 100644
index 96a04cb..0000000
--- a/src/Lucene.Net.Codecs.Tests/memory/TestDirectPostingsFormat.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-namespace org.apache.lucene.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.
- * 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 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;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/memory/TestFSTOrdPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/memory/TestFSTOrdPostingsFormat.cs b/src/Lucene.Net.Codecs.Tests/memory/TestFSTOrdPostingsFormat.cs
deleted file mode 100644
index cc5afb0..0000000
--- a/src/Lucene.Net.Codecs.Tests/memory/TestFSTOrdPostingsFormat.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-namespace org.apache.lucene.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.
- * 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 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;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/memory/TestFSTOrdPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/memory/TestFSTOrdPulsing41PostingsFormat.cs b/src/Lucene.Net.Codecs.Tests/memory/TestFSTOrdPulsing41PostingsFormat.cs
deleted file mode 100644
index a963c73..0000000
--- a/src/Lucene.Net.Codecs.Tests/memory/TestFSTOrdPulsing41PostingsFormat.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-namespace org.apache.lucene.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.
- * 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 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;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/memory/TestFSTPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/memory/TestFSTPostingsFormat.cs b/src/Lucene.Net.Codecs.Tests/memory/TestFSTPostingsFormat.cs
deleted file mode 100644
index 261b41f..0000000
--- a/src/Lucene.Net.Codecs.Tests/memory/TestFSTPostingsFormat.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-namespace org.apache.lucene.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.
- * 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 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;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/memory/TestFSTPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/memory/TestFSTPulsing41PostingsFormat.cs b/src/Lucene.Net.Codecs.Tests/memory/TestFSTPulsing41PostingsFormat.cs
deleted file mode 100644
index f1daa94..0000000
--- a/src/Lucene.Net.Codecs.Tests/memory/TestFSTPulsing41PostingsFormat.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-namespace org.apache.lucene.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.
- * 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 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;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/memory/TestMemoryDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/memory/TestMemoryDocValuesFormat.cs b/src/Lucene.Net.Codecs.Tests/memory/TestMemoryDocValuesFormat.cs
deleted file mode 100644
index f1f78c3..0000000
--- a/src/Lucene.Net.Codecs.Tests/memory/TestMemoryDocValuesFormat.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-namespace org.apache.lucene.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.
- * 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 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;
- }
- }
-
- protected internal override bool codecAcceptsHugeBinaryValues(string field)
- {
- return false;
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/memory/TestMemoryPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/memory/TestMemoryPostingsFormat.cs b/src/Lucene.Net.Codecs.Tests/memory/TestMemoryPostingsFormat.cs
deleted file mode 100644
index 62da9a8..0000000
--- a/src/Lucene.Net.Codecs.Tests/memory/TestMemoryPostingsFormat.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-namespace org.apache.lucene.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.
- * 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 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;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/pulsing/Test10KPulsings.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/pulsing/Test10KPulsings.cs b/src/Lucene.Net.Codecs.Tests/pulsing/Test10KPulsings.cs
deleted file mode 100644
index c9fab57..0000000
--- a/src/Lucene.Net.Codecs.Tests/pulsing/Test10KPulsings.cs
+++ /dev/null
@@ -1,183 +0,0 @@
-using System.Text;
-
-namespace org.apache.lucene.codecs.pulsing
-{
-
- /*
- * 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 MockAnalyzer = org.apache.lucene.analysis.MockAnalyzer;
- using Document = org.apache.lucene.document.Document;
- using Field = org.apache.lucene.document.Field;
- using FieldType = org.apache.lucene.document.FieldType;
- using TextField = org.apache.lucene.document.TextField;
- using DocsEnum = org.apache.lucene.index.DocsEnum;
- using IndexOptions = org.apache.lucene.index.FieldInfo.IndexOptions;
- using IndexReader = org.apache.lucene.index.IndexReader;
- using MultiFields = org.apache.lucene.index.MultiFields;
- using RandomIndexWriter = org.apache.lucene.index.RandomIndexWriter;
- using TermsEnum = org.apache.lucene.index.TermsEnum;
- using DocIdSetIterator = org.apache.lucene.search.DocIdSetIterator;
- using BaseDirectoryWrapper = org.apache.lucene.store.BaseDirectoryWrapper;
- using LuceneTestCase = org.apache.lucene.util.LuceneTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Pulses 10k terms/docs,
- /// originally designed to find JRE bugs (https://issues.apache.org/jira/browse/LUCENE-3335)
- ///
- /// @lucene.experimental
- /// </summary>
-//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
-//ORIGINAL LINE: @LuceneTestCase.Nightly public class Test10KPulsings extends org.apache.lucene.util.LuceneTestCase
- public class Test10KPulsings : LuceneTestCase
- {
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: public void test10kPulsed() throws Exception
- public virtual void test10kPulsed()
- {
- // we always run this test with pulsing codec.
- Codec cp = TestUtil.alwaysPostingsFormat(new Pulsing41PostingsFormat(1));
-
- File f = createTempDir("10kpulsed");
- BaseDirectoryWrapper dir = newFSDirectory(f);
- dir.CheckIndexOnClose = false; // we do this ourselves explicitly
- RandomIndexWriter iw = new RandomIndexWriter(random(), dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())).setCodec(cp));
-
- Document document = new Document();
- FieldType ft = new FieldType(TextField.TYPE_STORED);
-
- switch (TestUtil.Next(random(), 0, 2))
- {
- case 0:
- ft.IndexOptions = IndexOptions.DOCS_ONLY;
- break;
- case 1:
- ft.IndexOptions = IndexOptions.DOCS_AND_FREQS;
- break;
- default:
- ft.IndexOptions = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
- break;
- }
-
- Field field = newField("field", "", ft);
- document.add(field);
-
- NumberFormat df = new DecimalFormat("00000", new DecimalFormatSymbols(Locale.ROOT));
-
- for (int i = 0; i < 10050; i++)
- {
- field.StringValue = df.format(i);
- iw.addDocument(document);
- }
-
- IndexReader ir = iw.Reader;
- iw.close();
-
- TermsEnum te = MultiFields.getTerms(ir, "field").iterator(null);
- DocsEnum de = null;
-
- for (int i = 0; i < 10050; i++)
- {
- string expected = df.format(i);
- assertEquals(expected, te.next().utf8ToString());
- de = TestUtil.docs(random(), te, null, de, DocsEnum.FLAG_NONE);
- assertTrue(de.nextDoc() != DocIdSetIterator.NO_MORE_DOCS);
- assertEquals(DocIdSetIterator.NO_MORE_DOCS, de.nextDoc());
- }
- ir.close();
-
- TestUtil.checkIndex(dir);
- dir.close();
- }
-
- /// <summary>
- /// a variant, that uses pulsing, but uses a high TF to force pass thru to the underlying codec
- /// </summary>
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: public void test10kNotPulsed() throws Exception
- public virtual void test10kNotPulsed()
- {
- // we always run this test with pulsing codec.
- int freqCutoff = TestUtil.Next(random(), 1, 10);
- Codec cp = TestUtil.alwaysPostingsFormat(new Pulsing41PostingsFormat(freqCutoff));
-
- File f = createTempDir("10knotpulsed");
- BaseDirectoryWrapper dir = newFSDirectory(f);
- dir.CheckIndexOnClose = false; // we do this ourselves explicitly
- RandomIndexWriter iw = new RandomIndexWriter(random(), dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())).setCodec(cp));
-
- Document document = new Document();
- FieldType ft = new FieldType(TextField.TYPE_STORED);
-
- switch (TestUtil.Next(random(), 0, 2))
- {
- case 0:
- ft.IndexOptions = IndexOptions.DOCS_ONLY;
- break;
- case 1:
- ft.IndexOptions = IndexOptions.DOCS_AND_FREQS;
- break;
- default:
- ft.IndexOptions = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
- break;
- }
-
- Field field = newField("field", "", ft);
- document.add(field);
-
- NumberFormat df = new DecimalFormat("00000", new DecimalFormatSymbols(Locale.ROOT));
-
-//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
-//ORIGINAL LINE: final int freq = freqCutoff + 1;
- int freq = freqCutoff + 1;
-
- for (int i = 0; i < 10050; i++)
- {
- StringBuilder sb = new StringBuilder();
- for (int j = 0; j < freq; j++)
- {
- sb.Append(df.format(i));
- sb.Append(' '); // whitespace
- }
- field.StringValue = sb.ToString();
- iw.addDocument(document);
- }
-
- IndexReader ir = iw.Reader;
- iw.close();
-
- TermsEnum te = MultiFields.getTerms(ir, "field").iterator(null);
- DocsEnum de = null;
-
- for (int i = 0; i < 10050; i++)
- {
- string expected = df.format(i);
- assertEquals(expected, te.next().utf8ToString());
- de = TestUtil.docs(random(), te, null, de, DocsEnum.FLAG_NONE);
- assertTrue(de.nextDoc() != DocIdSetIterator.NO_MORE_DOCS);
- assertEquals(DocIdSetIterator.NO_MORE_DOCS, de.nextDoc());
- }
- ir.close();
-
- TestUtil.checkIndex(dir);
- dir.close();
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/pulsing/TestPulsingPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/pulsing/TestPulsingPostingsFormat.cs b/src/Lucene.Net.Codecs.Tests/pulsing/TestPulsingPostingsFormat.cs
deleted file mode 100644
index 249e8e1..0000000
--- a/src/Lucene.Net.Codecs.Tests/pulsing/TestPulsingPostingsFormat.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-namespace org.apache.lucene.codecs.pulsing
-{
-
- /*
- * 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 BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Tests PulsingPostingsFormat
- /// </summary>
- public class TestPulsingPostingsFormat : BasePostingsFormatTestCase
- {
- // TODO: randomize cutoff
- private readonly Codec codec = TestUtil.alwaysPostingsFormat(new Pulsing41PostingsFormat());
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/pulsing/TestPulsingReuse.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/pulsing/TestPulsingReuse.cs b/src/Lucene.Net.Codecs.Tests/pulsing/TestPulsingReuse.cs
deleted file mode 100644
index f35c108..0000000
--- a/src/Lucene.Net.Codecs.Tests/pulsing/TestPulsingReuse.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-using System.Collections.Generic;
-
-namespace org.apache.lucene.codecs.pulsing
-{
-
- /*
- * 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 MockAnalyzer = org.apache.lucene.analysis.MockAnalyzer;
- using NestedPulsingPostingsFormat = org.apache.lucene.codecs.nestedpulsing.NestedPulsingPostingsFormat;
- using Document = org.apache.lucene.document.Document;
- using Field = org.apache.lucene.document.Field;
- using TextField = org.apache.lucene.document.TextField;
- using AtomicReader = org.apache.lucene.index.AtomicReader;
- using DirectoryReader = org.apache.lucene.index.DirectoryReader;
- using DocsAndPositionsEnum = org.apache.lucene.index.DocsAndPositionsEnum;
- using DocsEnum = org.apache.lucene.index.DocsEnum;
- using RandomIndexWriter = org.apache.lucene.index.RandomIndexWriter;
- using TermsEnum = org.apache.lucene.index.TermsEnum;
- using BaseDirectoryWrapper = org.apache.lucene.store.BaseDirectoryWrapper;
- using Directory = org.apache.lucene.store.Directory;
- using LuceneTestCase = org.apache.lucene.util.LuceneTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Tests that pulsing codec reuses its enums and wrapped enums
- /// </summary>
- public class TestPulsingReuse : LuceneTestCase
- {
- // TODO: this is a basic test. this thing is complicated, add more
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: public void testSophisticatedReuse() throws Exception
- public virtual void testSophisticatedReuse()
- {
- // we always run this test with pulsing codec.
- Codec cp = TestUtil.alwaysPostingsFormat(new Pulsing41PostingsFormat(1));
- Directory dir = newDirectory();
- RandomIndexWriter iw = new RandomIndexWriter(random(), dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())).setCodec(cp));
- Document doc = new Document();
- doc.add(new TextField("foo", "a b b c c c d e f g g h i i j j k", Field.Store.NO));
- iw.addDocument(doc);
- DirectoryReader ir = iw.Reader;
- iw.close();
-
- AtomicReader segment = getOnlySegmentReader(ir);
- DocsEnum reuse = null;
- IDictionary<DocsEnum, bool?> allEnums = new IdentityHashMap<DocsEnum, bool?>();
- TermsEnum te = segment.terms("foo").iterator(null);
- while (te.next() != null)
- {
- reuse = te.docs(null, reuse, DocsEnum.FLAG_NONE);
- allEnums[reuse] = true;
- }
-
- assertEquals(2, allEnums.Count);
-
- allEnums.Clear();
- DocsAndPositionsEnum posReuse = null;
- te = segment.terms("foo").iterator(null);
- while (te.next() != null)
- {
- posReuse = te.docsAndPositions(null, posReuse);
- allEnums[posReuse] = true;
- }
-
- assertEquals(2, allEnums.Count);
-
- ir.close();
- dir.close();
- }
-
- /// <summary>
- /// tests reuse with Pulsing1(Pulsing2(Standard)) </summary>
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: public void testNestedPulsing() throws Exception
- public virtual void testNestedPulsing()
- {
- // we always run this test with pulsing codec.
- Codec cp = TestUtil.alwaysPostingsFormat(new NestedPulsingPostingsFormat());
- BaseDirectoryWrapper dir = newDirectory();
- RandomIndexWriter iw = new RandomIndexWriter(random(), dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())).setCodec(cp));
- Document doc = new Document();
- doc.add(new TextField("foo", "a b b c c c d e f g g g h i i j j k l l m m m", Field.Store.NO));
- // note: the reuse is imperfect, here we would have 4 enums (lost reuse when we get an enum for 'm')
- // this is because we only track the 'last' enum we reused (not all).
- // but this seems 'good enough' for now.
- iw.addDocument(doc);
- DirectoryReader ir = iw.Reader;
- iw.close();
-
- AtomicReader segment = getOnlySegmentReader(ir);
- DocsEnum reuse = null;
- IDictionary<DocsEnum, bool?> allEnums = new IdentityHashMap<DocsEnum, bool?>();
- TermsEnum te = segment.terms("foo").iterator(null);
- while (te.next() != null)
- {
- reuse = te.docs(null, reuse, DocsEnum.FLAG_NONE);
- allEnums[reuse] = true;
- }
-
- assertEquals(4, allEnums.Count);
-
- allEnums.Clear();
- DocsAndPositionsEnum posReuse = null;
- te = segment.terms("foo").iterator(null);
- while (te.next() != null)
- {
- posReuse = te.docsAndPositions(null, posReuse);
- allEnums[posReuse] = true;
- }
-
- assertEquals(4, allEnums.Count);
-
- ir.close();
- dir.close();
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/sep/TestSepPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/sep/TestSepPostingsFormat.cs b/src/Lucene.Net.Codecs.Tests/sep/TestSepPostingsFormat.cs
deleted file mode 100644
index 72fef6f..0000000
--- a/src/Lucene.Net.Codecs.Tests/sep/TestSepPostingsFormat.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-namespace org.apache.lucene.codecs.sep
-{
-
- /*
- * 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 MockSepPostingsFormat = org.apache.lucene.codecs.mocksep.MockSepPostingsFormat;
- using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
- using TestUtil = org.apache.lucene.util.TestUtil;
-
- /// <summary>
- /// Tests sep layout
- /// </summary>
- public class TestSepPostingsFormat : BasePostingsFormatTestCase
- {
- // TODO: randomize cutoff
- private readonly Codec codec = TestUtil.alwaysPostingsFormat(new MockSepPostingsFormat());
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextDocValuesFormat.cs b/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextDocValuesFormat.cs
deleted file mode 100644
index a6b8681..0000000
--- a/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextDocValuesFormat.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-namespace org.apache.lucene.codecs.simpletext
-{
-
- /*
- * 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 BaseDocValuesFormatTestCase = org.apache.lucene.index.BaseDocValuesFormatTestCase;
-
- /// <summary>
- /// Tests SimpleTextDocValuesFormat
- /// </summary>
- public class TestSimpleTextDocValuesFormat : BaseDocValuesFormatTestCase
- {
- private readonly Codec codec = new SimpleTextCodec();
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextPostingsFormat.cs b/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextPostingsFormat.cs
deleted file mode 100644
index ff628f8..0000000
--- a/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextPostingsFormat.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-namespace org.apache.lucene.codecs.simpletext
-{
-
- /*
- * 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 BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
- using Nightly = org.apache.lucene.util.LuceneTestCase.Nightly;
-
- /// <summary>
- /// Tests SimpleText's postings
- /// </summary>
-//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
-//ORIGINAL LINE: @Nightly public class TestSimpleTextPostingsFormat extends org.apache.lucene.index.BasePostingsFormatTestCase
- public class TestSimpleTextPostingsFormat : BasePostingsFormatTestCase // please figure out why I am so horrendously slow!
- {
- private readonly Codec codec = new SimpleTextCodec();
-
- protected internal override Codec Codec
- {
- get
- {
- return codec;
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextStoredFieldsFormat.cs b/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextStoredFieldsFormat.cs
deleted file mode 100644
index 2a7c3c2..0000000
--- a/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextStoredFieldsFormat.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-namespace org.apache.lucene.codecs.simpletext
-{
-
- /*
- * 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 BaseStoredFieldsFormatTestCase = org.apache.lucene.index.BaseStoredFieldsFormatTestCase;
-
- public class TestSimpleTextStoredFieldsFormat : BaseStoredFieldsFormatTestCase
- {
-
- protected internal override Codec Codec
- {
- get
- {
- return new SimpleTextCodec();
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextTermVectorsFormat.cs b/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextTermVectorsFormat.cs
deleted file mode 100644
index ef41ca9..0000000
--- a/src/Lucene.Net.Codecs.Tests/simpletext/TestSimpleTextTermVectorsFormat.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-namespace org.apache.lucene.codecs.simpletext
-{
-
- /*
- * 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 BaseTermVectorsFormatTestCase = org.apache.lucene.index.BaseTermVectorsFormatTestCase;
-
- public class TestSimpleTextTermVectorsFormat : BaseTermVectorsFormatTestCase
- {
-
- protected internal override Codec Codec
- {
- get
- {
- return new SimpleTextCodec();
- }
- }
-
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
new file mode 100644
index 0000000..11aa1b8
--- /dev/null
+++ b/src/Lucene.Net.Tests.Codecs/BlockTerms/TestFixedGapPostingsFormat.cs
@@ -0,0 +1,43 @@
+namespace org.apache.lucene.codecs.blockterms
+{
+
+ /*
+ * 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 Lucene41WithOrds = org.apache.lucene.codecs.lucene41ords.Lucene41WithOrds;
+ using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
+ using TestUtil = org.apache.lucene.util.TestUtil;
+
+ /// <summary>
+ /// Basic tests of a PF using FixedGap terms dictionary
+ /// </summary>
+ // TODO: we should add an instantiation for VarGap too to TestFramework, and a test in this package
+ // TODO: ensure both of these are also in rotation in RandomCodec
+ public class TestFixedGapPostingsFormat : BasePostingsFormatTestCase
+ {
+ private readonly Codec codec = TestUtil.alwaysPostingsFormat(new Lucene41WithOrds());
+
+ protected internal override Codec Codec
+ {
+ get
+ {
+ return codec;
+ }
+ }
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
new file mode 100644
index 0000000..2548f2b
--- /dev/null
+++ b/src/Lucene.Net.Tests.Codecs/Bloom/TestBloomPostingsFormat.cs
@@ -0,0 +1,40 @@
+namespace org.apache.lucene.codecs.bloom
+{
+
+ /*
+ * 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 BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
+ using TestUtil = org.apache.lucene.util.TestUtil;
+
+ /// <summary>
+ /// Basic tests for BloomPostingsFormat
+ /// </summary>
+ public class TestBloomPostingsFormat : BasePostingsFormatTestCase
+ {
+ private readonly Codec codec = TestUtil.alwaysPostingsFormat(new TestBloomFilteredLucene41Postings());
+
+ protected internal override Codec Codec
+ {
+ get
+ {
+ return codec;
+ }
+ }
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs b/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
new file mode 100644
index 0000000..01889ae
--- /dev/null
+++ b/src/Lucene.Net.Tests.Codecs/DiskDv/TestDiskDocValuesFormat.cs
@@ -0,0 +1,42 @@
+/*
+ * 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.Codecs.DiskDV;
+
+namespace Lucene.Net.Codecs.DiskDV
+{
+
+ using BaseCompressingDocValuesFormatTestCase = Lucene.Net.Index.BaseCompressingDocValuesFormatTestCase;
+ using TestUtil = Lucene.Net.Util.TestUtil;
+
+ /// <summary>
+ /// Tests DiskDocValuesFormat
+ /// </summary>
+ public class TestDiskDocValuesFormat : BaseCompressingDocValuesFormatTestCase
+ {
+ private readonly Codec codec = TestUtil.alwaysDocValuesFormat(new DiskDocValuesFormat());
+
+ protected internal override Codec Codec
+ {
+ get
+ {
+ return codec;
+ }
+ }
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
new file mode 100644
index 0000000..1133c64
--- /dev/null
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestFixedIntBlockPostingsFormat.cs
@@ -0,0 +1,42 @@
+namespace org.apache.lucene.codecs.intblock
+{
+
+ /*
+ * 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 MockFixedIntBlockPostingsFormat = org.apache.lucene.codecs.mockintblock.MockFixedIntBlockPostingsFormat;
+ using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
+ using TestUtil = org.apache.lucene.util.TestUtil;
+
+ /// <summary>
+ /// Basic tests for FixedIntBlock
+ /// </summary>
+ public class TestFixedIntBlockPostingsFormat : BasePostingsFormatTestCase
+ {
+ // TODO: randomize blocksize
+ private readonly Codec codec = TestUtil.alwaysPostingsFormat(new MockFixedIntBlockPostingsFormat());
+
+ protected internal override Codec Codec
+ {
+ get
+ {
+ return codec;
+ }
+ }
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
new file mode 100644
index 0000000..1e973dc
--- /dev/null
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
@@ -0,0 +1,76 @@
+namespace org.apache.lucene.codecs.intblock
+{
+
+ /*
+ * 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 LuceneTestCase = org.apache.lucene.util.LuceneTestCase;
+ using org.apache.lucene.store;
+ using org.apache.lucene.codecs.mockintblock;
+ using org.apache.lucene.codecs.sep;
+
+ public class TestIntBlockCodec : LuceneTestCase
+ {
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testSimpleIntBlocks() throws Exception
+ public virtual void testSimpleIntBlocks()
+ {
+ Directory dir = newDirectory();
+
+ IntStreamFactory f = (new MockFixedIntBlockPostingsFormat(128)).IntFactory;
+
+ IntIndexOutput @out = f.createOutput(dir, "test", newIOContext(random()));
+ for (int i = 0;i < 11777;i++)
+ {
+ @out.write(i);
+ }
+ @out.close();
+
+ IntIndexInput @in = f.openInput(dir, "test", newIOContext(random()));
+ IntIndexInput.Reader r = @in.reader();
+
+ for (int i = 0;i < 11777;i++)
+ {
+ assertEquals(i, r.next());
+ }
+ @in.close();
+
+ dir.close();
+ }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testEmptySimpleIntBlocks() throws Exception
+ public virtual void testEmptySimpleIntBlocks()
+ {
+ Directory dir = newDirectory();
+
+ IntStreamFactory f = (new MockFixedIntBlockPostingsFormat(128)).IntFactory;
+ IntIndexOutput @out = f.createOutput(dir, "test", newIOContext(random()));
+
+ // write no ints
+ @out.close();
+
+ IntIndexInput @in = f.openInput(dir, "test", newIOContext(random()));
+ @in.reader();
+ // read no ints
+ @in.close();
+ dir.close();
+ }
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
new file mode 100644
index 0000000..0a8a644
--- /dev/null
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs
@@ -0,0 +1,43 @@
+namespace org.apache.lucene.codecs.intblock
+{
+
+ /*
+ * 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 MockVariableIntBlockPostingsFormat = org.apache.lucene.codecs.mockintblock.MockVariableIntBlockPostingsFormat;
+ using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase;
+ using TestUtil = org.apache.lucene.util.TestUtil;
+ using TestUtil = org.apache.lucene.util.TestUtil;
+
+ /// <summary>
+ /// Basic tests for VariableIntBlock
+ /// </summary>
+ public class TestVariableIntBlockPostingsFormat : BasePostingsFormatTestCase
+ {
+ // TODO: randomize blocksize
+ private readonly Codec codec = TestUtil.alwaysPostingsFormat(new MockVariableIntBlockPostingsFormat());
+
+ protected internal override Codec Codec
+ {
+ get
+ {
+ return codec;
+ }
+ }
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/src/Lucene.Net.Tests.Codecs/Lucene.Net.Codecs.Tests.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Codecs.Tests.csproj b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Codecs.Tests.csproj
new file mode 100644
index 0000000..12eb5c6
--- /dev/null
+++ b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Codecs.Tests.csproj
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{351B75B1-BBD5-4E32-8036-7BED4E0135A6}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Lucene.Net.Codecs.Tests</RootNamespace>
+ <AssemblyName>Lucene.Net.Codecs.Tests</AssemblyName>
+ <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="diskdv\TestDiskDocValuesFormat.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Lucene.Net.Codecs\Lucene.Net.Codecs.csproj">
+ <Project>{3f79b6d4-4359-4f83-b64f-07f4f6262425}</Project>
+ <Name>Lucene.Net.Codecs</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Lucene.Net.Core\Lucene.Net.csproj">
+ <Project>{5d4ad9be-1ffb-41ab-9943-25737971bf57}</Project>
+ <Name>Lucene.Net</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Lucene.Net.Tests\Lucene.Net.Tests.csproj">
+ <Project>{de63db10-975f-460d-af85-572c17a91284}</Project>
+ <Name>Lucene.Net.Tests</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/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
new file mode 100644
index 0000000..e05827e
--- /dev/null
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectDocValuesFormat.cs
@@ -0,0 +1,40 @@
+namespace org.apache.lucene.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.
+ * 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 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;
+ }
+ }
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/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
new file mode 100644
index 0000000..96a04cb
--- /dev/null
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestDirectPostingsFormat.cs
@@ -0,0 +1,42 @@
+namespace org.apache.lucene.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.
+ * 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 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;
+ }
+ }
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/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
new file mode 100644
index 0000000..cc5afb0
--- /dev/null
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs
@@ -0,0 +1,40 @@
+namespace org.apache.lucene.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.
+ * 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 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;
+ }
+ }
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/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
new file mode 100644
index 0000000..a963c73
--- /dev/null
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPulsing41PostingsFormat.cs
@@ -0,0 +1,40 @@
+namespace org.apache.lucene.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.
+ * 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 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;
+ }
+ }
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5de15ec2/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
new file mode 100644
index 0000000..261b41f
--- /dev/null
+++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTPostingsFormat.cs
@@ -0,0 +1,40 @@
+namespace org.apache.lucene.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.
+ * 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 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;
+ }
+ }
+ }
+
+}
\ No newline at end of file