You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2012/04/12 01:21:11 UTC
[lucy-commits] svn commit: r1325062 - in /lucy/trunk/core/Lucy/Test: Analysis/ Object/
Search/ Store/
Author: marvin
Date: Wed Apr 11 23:21:11 2012
New Revision: 1325062
URL: http://svn.apache.org/viewvc?rev=1325062&view=rev
Log:
Replace all instances of EMPTY in core test files.
Modified:
lucy/trunk/core/Lucy/Test/Analysis/TestCaseFolder.c
lucy/trunk/core/Lucy/Test/Analysis/TestSnowballStopFilter.c
lucy/trunk/core/Lucy/Test/Object/TestHash.c
lucy/trunk/core/Lucy/Test/Object/TestVArray.c
lucy/trunk/core/Lucy/Test/Search/TestMatchAllQuery.c
lucy/trunk/core/Lucy/Test/Search/TestNoMatchQuery.c
lucy/trunk/core/Lucy/Test/Store/TestCompoundFileReader.c
lucy/trunk/core/Lucy/Test/Store/TestFolderCommon.c
lucy/trunk/core/Lucy/Test/Store/TestRAMFolder.c
Modified: lucy/trunk/core/Lucy/Test/Analysis/TestCaseFolder.c
URL: http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Test/Analysis/TestCaseFolder.c?rev=1325062&r1=1325061&r2=1325062&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Test/Analysis/TestCaseFolder.c (original)
+++ lucy/trunk/core/Lucy/Test/Analysis/TestCaseFolder.c Wed Apr 11 23:21:11 2012
@@ -30,7 +30,8 @@ test_Dump_Load_and_Equals(TestBatch *bat
CaseFolder *clone = (CaseFolder*)CaseFolder_Load(other, dump);
TEST_TRUE(batch, CaseFolder_Equals(case_folder, (Obj*)other), "Equals");
- TEST_FALSE(batch, CaseFolder_Equals(case_folder, (Obj*)&EMPTY), "Not Equals");
+ TEST_FALSE(batch, CaseFolder_Equals(case_folder, (Obj*)CFISH_TRUE),
+ "Not Equals");
TEST_TRUE(batch, CaseFolder_Equals(case_folder, (Obj*)clone),
"Dump => Load round trip");
Modified: lucy/trunk/core/Lucy/Test/Analysis/TestSnowballStopFilter.c
URL: http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Test/Analysis/TestSnowballStopFilter.c?rev=1325062&r1=1325061&r2=1325062&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Test/Analysis/TestSnowballStopFilter.c (original)
+++ lucy/trunk/core/Lucy/Test/Analysis/TestSnowballStopFilter.c Wed Apr 11 23:21:11 2012
@@ -30,7 +30,8 @@ S_make_stopfilter(void *unused, ...) {
va_start(args, unused);
while (NULL != (stopword = va_arg(args, char*))) {
- Hash_Store_Str(stoplist, stopword, strlen(stopword), INCREF(&EMPTY));
+ Hash_Store_Str(stoplist, stopword, strlen(stopword),
+ (Obj*)CB_newf(""));
}
va_end(args);
Modified: lucy/trunk/core/Lucy/Test/Object/TestHash.c
URL: http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Test/Object/TestHash.c?rev=1325062&r1=1325061&r2=1325062&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Test/Object/TestHash.c (original)
+++ lucy/trunk/core/Lucy/Test/Object/TestHash.c Wed Apr 11 23:21:11 2012
@@ -32,11 +32,11 @@ test_Equals(TestBatch *batch) {
TEST_TRUE(batch, Hash_Equals(hash, (Obj*)other),
"Empty hashes are equal");
- Hash_Store_Str(hash, "foo", 3, INCREF(&EMPTY));
+ Hash_Store_Str(hash, "foo", 3, (Obj*)CFISH_TRUE);
TEST_FALSE(batch, Hash_Equals(hash, (Obj*)other),
"Add one pair and Equals returns false");
- Hash_Store_Str(other, "foo", 3, INCREF(&EMPTY));
+ Hash_Store_Str(other, "foo", 3, (Obj*)CFISH_TRUE);
TEST_TRUE(batch, Hash_Equals(hash, (Obj*)other),
"Add a matching pair and Equals returns true");
Modified: lucy/trunk/core/Lucy/Test/Object/TestVArray.c
URL: http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Test/Object/TestVArray.c?rev=1325062&r1=1325061&r2=1325062&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Test/Object/TestVArray.c (original)
+++ lucy/trunk/core/Lucy/Test/Object/TestVArray.c Wed Apr 11 23:21:11 2012
@@ -35,19 +35,19 @@ test_Equals(TestBatch *batch) {
TEST_TRUE(batch, VA_Equals(array, (Obj*)other),
"Empty arrays are equal");
- VA_Push(array, INCREF(&EMPTY));
+ VA_Push(array, (Obj*)CFISH_TRUE);
TEST_FALSE(batch, VA_Equals(array, (Obj*)other),
"Add one elem and Equals returns false");
- VA_Push(other, INCREF(&EMPTY));
+ VA_Push(other, (Obj*)CFISH_TRUE);
TEST_TRUE(batch, VA_Equals(array, (Obj*)other),
"Add a matching elem and Equals returns true");
- VA_Store(array, 2, INCREF(&EMPTY));
+ VA_Store(array, 2, (Obj*)CFISH_TRUE);
TEST_FALSE(batch, VA_Equals(array, (Obj*)other),
"Add elem after a NULL and Equals returns false");
- VA_Store(other, 2, INCREF(&EMPTY));
+ VA_Store(other, 2, (Obj*)CFISH_TRUE);
TEST_TRUE(batch, VA_Equals(array, (Obj*)other),
"Empty elems don't spoil Equals");
Modified: lucy/trunk/core/Lucy/Test/Search/TestMatchAllQuery.c
URL: http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Test/Search/TestMatchAllQuery.c?rev=1325062&r1=1325061&r2=1325062&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Test/Search/TestMatchAllQuery.c (original)
+++ lucy/trunk/core/Lucy/Test/Search/TestMatchAllQuery.c Wed Apr 11 23:21:11 2012
@@ -31,7 +31,8 @@ test_Dump_Load_and_Equals(TestBatch *bat
TEST_TRUE(batch, MatchAllQuery_Equals(query, (Obj*)clone),
"Dump => Load round trip");
- TEST_FALSE(batch, MatchAllQuery_Equals(query, (Obj*)&EMPTY), "Equals");
+ TEST_FALSE(batch, MatchAllQuery_Equals(query, (Obj*)CFISH_TRUE),
+ "Equals");
DECREF(query);
DECREF(dump);
Modified: lucy/trunk/core/Lucy/Test/Search/TestNoMatchQuery.c
URL: http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Test/Search/TestNoMatchQuery.c?rev=1325062&r1=1325061&r2=1325062&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Test/Search/TestNoMatchQuery.c (original)
+++ lucy/trunk/core/Lucy/Test/Search/TestNoMatchQuery.c Wed Apr 11 23:21:11 2012
@@ -31,7 +31,8 @@ test_Dump_Load_and_Equals(TestBatch *bat
TEST_TRUE(batch, NoMatchQuery_Equals(query, (Obj*)clone),
"Dump => Load round trip");
- TEST_FALSE(batch, NoMatchQuery_Equals(query, (Obj*)&EMPTY), "Equals");
+ TEST_FALSE(batch, NoMatchQuery_Equals(query, (Obj*)CFISH_TRUE),
+ "Equals");
DECREF(query);
DECREF(dump);
Modified: lucy/trunk/core/Lucy/Test/Store/TestCompoundFileReader.c
URL: http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Test/Store/TestCompoundFileReader.c?rev=1325062&r1=1325061&r2=1325062&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Test/Store/TestCompoundFileReader.c (original)
+++ lucy/trunk/core/Lucy/Test/Store/TestCompoundFileReader.c Wed Apr 11 23:21:11 2012
@@ -47,7 +47,8 @@ S_folder_with_contents() {
OutStream_Close(bar_out);
DECREF(foo_out);
DECREF(bar_out);
- RAMFolder_Consolidate(folder, (CharBuf*)&EMPTY);
+ ZombieCharBuf *empty = ZCB_BLANK();
+ RAMFolder_Consolidate(folder, (CharBuf*)empty);
return (Folder*)folder;
}
Modified: lucy/trunk/core/Lucy/Test/Store/TestFolderCommon.c
URL: http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Test/Store/TestFolderCommon.c?rev=1325062&r1=1325061&r2=1325062&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Test/Store/TestFolderCommon.c (original)
+++ lucy/trunk/core/Lucy/Test/Store/TestFolderCommon.c Wed Apr 11 23:21:11 2012
@@ -104,7 +104,8 @@ test_Local_Find_Folder(TestBatch *batch,
local = Folder_Local_Find_Folder(folder, &nope);
TEST_TRUE(batch, local == NULL, "Non-existent entry yields NULL");
- local = Folder_Local_Find_Folder(folder, (CharBuf*)&EMPTY);
+ ZombieCharBuf *empty = ZCB_BLANK();
+ local = Folder_Local_Find_Folder(folder, (CharBuf*)empty);
TEST_TRUE(batch, local == NULL, "Empty string yields NULL");
local = Folder_Local_Find_Folder(folder, &foo_bar);
Modified: lucy/trunk/core/Lucy/Test/Store/TestRAMFolder.c
URL: http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Test/Store/TestRAMFolder.c?rev=1325062&r1=1325061&r2=1325062&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Test/Store/TestRAMFolder.c (original)
+++ lucy/trunk/core/Lucy/Test/Store/TestRAMFolder.c Wed Apr 11 23:21:11 2012
@@ -101,7 +101,8 @@ test_Local_Find_Folder(TestBatch *batch)
local = (RAMFolder*)RAMFolder_Local_Find_Folder(folder, &nope);
TEST_TRUE(batch, local == NULL, "Non-existent entry yields NULL");
- local = (RAMFolder*)RAMFolder_Local_Find_Folder(folder, (CharBuf*)&EMPTY);
+ ZombieCharBuf *empty = ZCB_BLANK();
+ local = (RAMFolder*)RAMFolder_Local_Find_Folder(folder, (CharBuf*)empty);
TEST_TRUE(batch, local == NULL, "Empty string yields NULL");
local = (RAMFolder*)RAMFolder_Local_Find_Folder(folder, &foo_bar);