lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Aroush" <geo...@aroush.net>
Subject RE: Test failure question
Date Fri, 16 Jun 2006 18:43:15 GMT
Hi Pasha,

That is defiantly not happening in my case.  Here is an output:

Setup()
TestBarelyCloseEnough()
TestExact()
TestMulipleTerms()
TestNotCloseEnough()
TestOrderDoesntMatter()
TestPhraseQueryInConjunctionScorer()
TestPhraseQueryWithStopAnalyzer()
TestSlop1()
TestSlopScoring()
TestWrappedPhrase()
TearDown()

Which version of NUnit are you using?  I am using 2.2.8.

Regards,

-- George

-----Original Message-----
From: Pasha Bizhan [mailto:lucene-list@lucenedotnet.com] 
Sent: Friday, June 16, 2006 2:07 PM
To: java-dev@lucene.apache.org
Subject: RE: Test failure question

Hi,

> testBarelyCloseEnough(), testExact(), testMulipleTerms(), etc?  If so, 
> then the NUnit is not doing this.  I tested by outputing to stdout.

NUnit calls setUp before each test and calls tearDown after each test.
Add Console.WriteLine and see the result.

Let me show:
------------------
	[TestFixture]
	public class TestPhraseQuery 	{
		[SetUp]
		protected void SetUp() 		{
			directory = new RAMDirectory();
			IndexWriter writer = new IndexWriter(directory, new
WhitespaceAnalyzer(), true);
			...
			Console.WriteLine("set up");
		}


		[TearDown]
		protected void TearDown() 		{
			searcher.Close(); directory.Close();
			Console.WriteLine("tear down");
		}


		[Test]
		public void TestNotCloseEnough()  {
			query.SetSlop(2);
			.....
			MockAssert.AreEqual(0, hits.Length());
			Console.WriteLine("not close");
		}
------------------
The output:
---------------
set up
barely
tear down

set up
tear down
...
----------------

Pasha Bizhan


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message