Skip to content

Commit

Permalink
Fixed a few issues with test projects not building due to a previous …
Browse files Browse the repository at this point in the history
…commit

Fixed the default namespace, the output name, and output directory for Contrib.Memory.Test

git-svn-id: https://svn.apache.org/repos/asf/incubator/lucene.net/trunk@1343859 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
ccurrens committed May 29, 2012
1 parent 3919666 commit e447827
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
8 changes: 4 additions & 4 deletions test/contrib/Memory/Contrib.Memory.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@
<ProjectGuid>{66C13054-FF41-4C1D-BD0D-8DA009D1DFFD}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Memory</RootNamespace>
<AssemblyName>Memory</AssemblyName>
<RootNamespace>Lucene.Net.Index.Memory.Test</RootNamespace>
<AssemblyName>Lucene.Net.Contrib.Memory.Test</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\..\..\build\bin\contrib\Memory\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>
<OutputPath>..\..\..\build\bin\contrib\Memory\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
6 changes: 2 additions & 4 deletions test/contrib/Memory/MemoryIndexTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
using Lucene.Net.Analysis;
using Lucene.Net.Analysis.Standard;
using Lucene.Net.Documents;
using Lucene.Net.Index;
using Lucene.Net.Index.Memory;
using Lucene.Net.QueryParsers;
using Lucene.Net.Search;
using Lucene.Net.Store;
using Lucene.Net.Test.Analysis;
using Version = Lucene.Net.Util.Version;
using NUnit.Framework;
using Version = Lucene.Net.Util.Version;

namespace Memory
namespace Lucene.Net.Index.Memory.Test
{
/**
* Verifies that Lucene MemoryIndex and RAMDirectory have the same behaviour,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void SetUp()
AddDoc(writer, "en", "CCN", "dummy", "oooooooooooooooooooooo");
writer.Close();

_Reader = IndexReader.Open(_Dir);
_Reader = IndexReader.Open(_Dir, true);
}

void AddDoc(IndexWriter writer, string lang, string source, string group, string text)
Expand Down
12 changes: 6 additions & 6 deletions test/contrib/SpellChecker/Test/TestLuceneDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void TestFieldNonExistent()
{
try
{
indexReader = IndexReader.Open(store);
indexReader = IndexReader.Open(store, true);

ld = new LuceneDictionary(indexReader, "nonexistent_field");
it = ld.GetWordsIterator();
Expand All @@ -92,7 +92,7 @@ public void TestFieldAaa()
{
try
{
indexReader = IndexReader.Open(store);
indexReader = IndexReader.Open(store, true);

ld = new LuceneDictionary(indexReader, "aaa");
it = ld.GetWordsIterator();
Expand All @@ -113,7 +113,7 @@ public void TestFieldContents_1()
{
try
{
indexReader = IndexReader.Open(store);
indexReader = IndexReader.Open(store, true);

ld = new LuceneDictionary(indexReader, "contents");
it = ld.GetWordsIterator();
Expand Down Expand Up @@ -148,7 +148,7 @@ public void TestFieldContents_2()
{
try
{
indexReader = IndexReader.Open(store);
indexReader = IndexReader.Open(store, true);

ld = new LuceneDictionary(indexReader, "contents");
it = ld.GetWordsIterator();
Expand Down Expand Up @@ -184,7 +184,7 @@ public void TestFieldZzz()
{
try
{
indexReader = IndexReader.Open(store);
indexReader = IndexReader.Open(store, true);

ld = new LuceneDictionary(indexReader, "zzz");
it = ld.GetWordsIterator();
Expand All @@ -204,7 +204,7 @@ public void TestFieldZzz()
public void TestSpellchecker()
{
var sc = new Net.Search.Spell.SpellChecker(new RAMDirectory());
indexReader = IndexReader.Open(store);
indexReader = IndexReader.Open(store, true);
sc.IndexDictionary(new LuceneDictionary(indexReader, "contents"));
String[] suggestions = sc.SuggestSimilar("Tam", 1);
AssertEquals(1, suggestions.Length);
Expand Down
2 changes: 1 addition & 1 deletion test/contrib/SpellChecker/Test/TestSpellChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private void Addwords(IndexReader r, System.String field)

private int Numdoc()
{
var rs = IndexReader.Open(spellindex);
var rs = IndexReader.Open(spellindex, true);
int num = rs.NumDocs();
Assert.IsTrue(num != 0);

Expand Down

0 comments on commit e447827

Please sign in to comment.