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 2010/04/03 21:20:19 UTC
svn commit: r930566 - in /lucene/lucy/trunk/core/Lucy/Test: Object/ Store/
Util/
Author: marvin
Date: Sat Apr 3 19:20:18 2010
New Revision: 930566
URL: http://svn.apache.org/viewvc?rev=930566&view=rev
Log:
Change over core/Lucy/Test to C99-style line comments.
Modified:
lucene/lucy/trunk/core/Lucy/Test/Object/TestBitVector.c
lucene/lucy/trunk/core/Lucy/Test/Object/TestByteBuf.c
lucene/lucy/trunk/core/Lucy/Test/Object/TestCharBuf.c
lucene/lucy/trunk/core/Lucy/Test/Object/TestHash.c
lucene/lucy/trunk/core/Lucy/Test/Object/TestVArray.c
lucene/lucy/trunk/core/Lucy/Test/Store/TestCompoundFileWriter.c
lucene/lucy/trunk/core/Lucy/Test/Store/TestFSDirHandle.c
lucene/lucy/trunk/core/Lucy/Test/Store/TestFSFileHandle.c
lucene/lucy/trunk/core/Lucy/Test/Store/TestFSFolder.c
lucene/lucy/trunk/core/Lucy/Test/Store/TestFolder.c
lucene/lucy/trunk/core/Lucy/Test/Store/TestFolderCommon.c
lucene/lucy/trunk/core/Lucy/Test/Store/TestIOChunks.c
lucene/lucy/trunk/core/Lucy/Test/Store/TestIOPrimitives.c
lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMDirHandle.c
lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMFileHandle.c
lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMFolder.c
lucene/lucy/trunk/core/Lucy/Test/Util/TestJson.c
lucene/lucy/trunk/core/Lucy/Test/Util/TestNumberUtils.c
lucene/lucy/trunk/core/Lucy/Test/Util/TestStringHelper.c
Modified: lucene/lucy/trunk/core/Lucy/Test/Object/TestBitVector.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Object/TestBitVector.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Object/TestBitVector.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Object/TestBitVector.c Sat Apr 3 19:20:18 2010
@@ -393,7 +393,7 @@ test_To_Array(TestBatch *batch)
long num_unique = 0;
long i;
- /* Unique the random ints. */
+ // Unique the random ints.
Sort_quicksort(source_ints, 20, sizeof(uint64_t),
S_compare_u64s, NULL);
for (i = 0; i < 19; i++) {
@@ -403,12 +403,12 @@ test_To_Array(TestBatch *batch)
}
}
- /* Set bits. */
+ // Set bits.
for (i = 0; i < num_unique; i++) {
BitVec_Set(bit_vec, (uint32_t)source_ints[i]);
}
- /* Create the array and compare it to the source. */
+ // Create the array and compare it to the source.
array = BitVec_To_Array(bit_vec);
for (i = 0; i < num_unique; i++) {
if (I32Arr_Get(array, i) != (int32_t)source_ints[i]) { break; }
@@ -422,7 +422,7 @@ test_To_Array(TestBatch *batch)
}
-/* Valgrind only - detect off-by-one error. */
+// Valgrind only - detect off-by-one error.
static void
test_off_by_one_error()
{
Modified: lucene/lucy/trunk/core/Lucy/Test/Object/TestByteBuf.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Object/TestByteBuf.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Object/TestByteBuf.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Object/TestByteBuf.c Sat Apr 3 19:20:18 2010
@@ -8,7 +8,7 @@
static void
test_Equals(TestBatch *batch)
{
- ByteBuf *wanted = BB_new_bytes("foo", 4); /* Include terminating NULL. */
+ ByteBuf *wanted = BB_new_bytes("foo", 4); // Include terminating NULL.
ByteBuf *got = BB_new_bytes("foo", 4);
ASSERT_TRUE(batch, BB_Equals(wanted, (Obj*)got), "Equals");
Modified: lucene/lucy/trunk/core/Lucy/Test/Object/TestCharBuf.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Object/TestCharBuf.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Object/TestCharBuf.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Object/TestCharBuf.c Sat Apr 3 19:20:18 2010
@@ -144,7 +144,7 @@ test_Trim(TestBatch *batch)
uint32_t i;
CharBuf *got = CB_new(0);
- /* Surround a smiley with lots of whitespace. */
+ // Surround a smiley with lots of whitespace.
for (i = 0; i < num_spaces; i++) { CB_Cat_Char(got, spaces[i]); }
CB_Cat_Char(got, 0x263A);
for (i = 0; i < num_spaces; i++) { CB_Cat_Char(got, spaces[i]); }
@@ -158,7 +158,7 @@ test_Trim(TestBatch *batch)
ASSERT_TRUE(batch, CB_Equals_Str(got, smiley, smiley_len),
"Trim_Top and Trim_Tail worked");
- /* Build the spacey smiley again. */
+ // Build the spacey smiley again.
CB_Truncate(got, 0);
for (i = 0; i < num_spaces; i++) { CB_Cat_Char(got, spaces[i]); }
CB_Cat_Char(got, 0x263A);
Modified: lucene/lucy/trunk/core/Lucy/Test/Object/TestHash.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Object/TestHash.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Object/TestHash.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Object/TestHash.c Sat Apr 3 19:20:18 2010
@@ -131,7 +131,7 @@ static void
test_Keys_Values_Iter(TestBatch *batch)
{
uint32_t i;
- Hash *hash = Hash_new(0); /* trigger multiple rebuilds. */
+ Hash *hash = Hash_new(0); // trigger multiple rebuilds.
VArray *expected = VA_new(100);
VArray *keys;
VArray *values;
@@ -243,7 +243,7 @@ static void
test_stress(TestBatch *batch)
{
uint32_t i;
- Hash *hash = Hash_new(0); /* trigger multiple rebuilds. */
+ Hash *hash = Hash_new(0); // trigger multiple rebuilds.
VArray *expected = VA_new(1000);
VArray *keys;
VArray *values;
@@ -260,7 +260,7 @@ test_stress(TestBatch *batch)
VA_Sort(expected, NULL, NULL);
- /* Overwrite for good measure. */
+ // Overwrite for good measure.
for (i = 0; i < 1000; i++) {
CharBuf *cb = (CharBuf*)VA_Fetch(expected, i);
Hash_Store(hash, (Obj*)cb, INCREF(cb));
Modified: lucene/lucy/trunk/core/Lucy/Test/Object/TestVArray.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Object/TestVArray.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Object/TestVArray.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Object/TestVArray.c Sat Apr 3 19:20:18 2010
@@ -40,8 +40,8 @@ test_Equals(TestBatch *batch)
ASSERT_FALSE(batch, VA_Equals(array, (Obj*)other),
"Non-matching value spoils Equals");
- VA_Splice(array, 1, 2); /* removes empty elems */
- VA_Delete(other, 1); /* leaves NULL in place of deleted elem */
+ VA_Splice(array, 1, 2); // removes empty elems
+ VA_Delete(other, 1); // leaves NULL in place of deleted elem
VA_Delete(other, 2);
ASSERT_FALSE(batch, VA_Equals(array, (Obj*)other),
"Empty trailing elements spoil Equals");
Modified: lucene/lucy/trunk/core/Lucy/Test/Store/TestCompoundFileWriter.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Store/TestCompoundFileWriter.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Store/TestCompoundFileWriter.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Store/TestCompoundFileWriter.c Sat Apr 3 19:20:18 2010
@@ -37,7 +37,7 @@ test_Consolidate(TestBatch *batch)
Folder *folder = S_folder_with_contents();
FileHandle *fh;
- /* Fake up detritus from failed consolidation. */
+ // Fake up detritus from failed consolidation.
fh = Folder_Open_FileHandle(folder, &cf_file,
FH_CREATE | FH_WRITE_ONLY | FH_EXCLUSIVE );
DECREF(fh);
Modified: lucene/lucy/trunk/core/Lucy/Test/Store/TestFSDirHandle.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Store/TestFSDirHandle.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Store/TestFSDirHandle.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Store/TestFSDirHandle.c Sat Apr 3 19:20:18 2010
@@ -1,11 +1,11 @@
#include "Lucy/Util/ToolSet.h"
-/* rmdir */
+// rmdir
#ifdef CHY_HAS_DIRECT_H
#include <direct.h>
#endif
-/* rmdir */
+// rmdir
#ifdef CHY_HAS_UNISTD_H
#include <unistd.h>
#endif
Modified: lucene/lucy/trunk/core/Lucy/Test/Store/TestFSFileHandle.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Store/TestFSFileHandle.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Store/TestFSFileHandle.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Store/TestFSFileHandle.c Sat Apr 3 19:20:18 2010
@@ -1,4 +1,4 @@
-#include <stdio.h> /* for remove() */
+#include <stdio.h> // for remove()
#define C_LUCY_CHARBUF
#define C_LUCY_FSFILEHANDLE
@@ -6,9 +6,9 @@
#include "Lucy/Util/ToolSet.h"
#ifdef CHY_HAS_UNISTD_H
- #include <unistd.h> /* close */
+ #include <unistd.h> // close
#elif defined(CHY_HAS_IO_H)
- #include <io.h> /* close */
+ #include <io.h> // close
#endif
#include "Lucy/Test.h"
@@ -108,7 +108,7 @@ test_Read_Write(TestBatch *batch)
if (!FSFH_Close(fh)) { RETHROW(INCREF(Err_get_error())); }
DECREF(fh);
- /* Reopen for reading. */
+ // Reopen for reading.
Err_set_error(NULL);
fh = FSFH_open(test_filename, FH_READ_ONLY);
@@ -153,8 +153,8 @@ test_Close(TestBatch *batch)
ASSERT_TRUE(batch, FSFH_Close(fh), "Close returns true for write-only");
DECREF(fh);
- /* Simulate an OS error when closing the file descriptor. This
- * approximates what would happen if, say, we run out of disk space. */
+ // Simulate an OS error when closing the file descriptor. This
+ // approximates what would happen if, say, we run out of disk space.
remove((char*)CB_Get_Ptr8(test_filename));
fh = FSFH_open(test_filename,
FH_CREATE | FH_WRITE_ONLY | FH_EXCLUSIVE);
@@ -190,7 +190,7 @@ test_Window(TestBatch *batch)
}
if (!FSFH_Close(fh)) { RETHROW(INCREF(Err_get_error())); }
- /* Reopen for reading. */
+ // Reopen for reading.
DECREF(fh);
fh = FSFH_open(test_filename, FH_READ_ONLY);
if (!fh) { RETHROW(INCREF(Err_get_error())); }
Modified: lucene/lucy/trunk/core/Lucy/Test/Store/TestFSFolder.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Store/TestFSFolder.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Store/TestFSFolder.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Store/TestFSFolder.c Sat Apr 3 19:20:18 2010
@@ -1,16 +1,16 @@
#include "Lucy/Util/ToolSet.h"
-/* mkdir, rmdir */
+// mkdir, rmdir
#ifdef CHY_HAS_DIRECT_H
#include <direct.h>
#endif
-/* rmdir */
+// rmdir
#ifdef CHY_HAS_UNISTD_H
#include <unistd.h>
#endif
-/* mkdir, stat */
+// mkdir, stat
#ifdef CHY_HAS_SYS_STAT_H
#include <sys/stat.h>
#endif
@@ -109,13 +109,13 @@ test_protect_symlinks(TestBatch *batch)
DECREF(folder);
S_tear_down();
#else
- /* TODO: Add test for Windows. */
+ // TODO: Add test for Windows.
SKIP(batch, "No symlink() function");
SKIP(batch, "No symlink() function");
SKIP(batch, "No symlink() function");
SKIP(batch, "No symlink() function");
SKIP(batch, "No symlink() function");
-#endif /* CHY_HAS_UNISTD_H */
+#endif // CHY_HAS_UNISTD_H
}
void
Modified: lucene/lucy/trunk/core/Lucy/Test/Store/TestFolder.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Store/TestFolder.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Store/TestFolder.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Store/TestFolder.c Sat Apr 3 19:20:18 2010
@@ -413,7 +413,7 @@ test_Delete_Tree(TestBatch *batch)
FileHandle *fh;
bool_t result;
- /* Create tree to be deleted. */
+ // Create tree to be deleted.
Folder_MkDir(folder, &foo);
Folder_MkDir(folder, &foo_bar);
Folder_MkDir(folder, &foo_bar_baz);
@@ -421,7 +421,7 @@ test_Delete_Tree(TestBatch *batch)
FH_CREATE | FH_WRITE_ONLY);
DECREF(fh);
- /* Create bystanders. */
+ // Create bystanders.
Folder_MkDir(folder, &bar);
fh = Folder_Open_FileHandle(folder, &baz, FH_CREATE | FH_WRITE_ONLY);
DECREF(fh);
@@ -435,13 +435,13 @@ test_Delete_Tree(TestBatch *batch)
ASSERT_TRUE(batch, Folder_Exists(folder, &baz),
"local file with same name as nested dir left intact");
- /* Kill off the bystanders. */
+ // Kill off the bystanders.
result = Folder_Delete_Tree(folder, &bar);
ASSERT_TRUE(batch, result, "Delete_Tree() on empty dir");
result = Folder_Delete_Tree(folder, &baz);
ASSERT_TRUE(batch, result, "Delete_Tree() on file");
- /* Create new tree to be deleted. */
+ // Create new tree to be deleted.
Folder_MkDir(folder, &foo);
Folder_MkDir(folder, &foo_bar);
Folder_MkDir(folder, &foo_bar_baz);
@@ -449,7 +449,7 @@ test_Delete_Tree(TestBatch *batch)
FH_CREATE | FH_WRITE_ONLY);
DECREF(fh);
- /* Remove tree in subdir. */
+ // Remove tree in subdir.
result = Folder_Delete_Tree(folder, &foo_bar);
ASSERT_TRUE(batch, result, "Delete_Tree() of subdir succeeded");
ASSERT_FALSE(batch, Folder_Exists(folder, &foo_bar),
Modified: lucene/lucy/trunk/core/Lucy/Test/Store/TestFolderCommon.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Store/TestFolderCommon.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Store/TestFolderCommon.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Store/TestFolderCommon.c Sat Apr 3 19:20:18 2010
@@ -258,7 +258,7 @@ test_Rename(TestBatch *batch, set_up_t s
OutStream_Close(outstream);
DECREF(outstream);
- /* Move files. */
+ // Move files.
result = Folder_Rename(folder, &boffo, &banana);
ASSERT_TRUE(batch, result, "Rename succeeds and returns true");
@@ -301,7 +301,7 @@ test_Rename(TestBatch *batch, set_up_t s
Folder_Delete(folder, &boffo);
}
- /* Move Dirs. */
+ // Move Dirs.
Folder_MkDir(folder, &baz);
result = Folder_Rename(folder, &baz, &boffo);
@@ -325,7 +325,7 @@ test_Rename(TestBatch *batch, set_up_t s
ASSERT_FALSE(batch, Folder_Exists(folder, &foo_foo),
"Folder no longer exists at old path");
- /* Test failed clobbers. */
+ // Test failed clobbers.
Err_set_error(NULL);
result = Folder_Rename(folder, &foo_boffo, &foo_bar);
@@ -347,7 +347,7 @@ test_Rename(TestBatch *batch, set_up_t s
ASSERT_TRUE(batch, Folder_Exists(folder, &foo_boffo),
"File still exists after failed clobber");
- /* Test that "renaming" succeeds where to and from are the same. */
+ // Test that "renaming" succeeds where to and from are the same.
result = Folder_Rename(folder, &foo_boffo, &foo_boffo);
ASSERT_TRUE(batch, result, "Renaming file to itself succeeds");
@@ -359,7 +359,7 @@ test_Rename(TestBatch *batch, set_up_t s
ASSERT_TRUE(batch, Folder_Exists(folder, &foo_bar),
"Dir still exists");
- /* Invalid filepaths. */
+ // Invalid filepaths.
Err_set_error(NULL);
result = Folder_Rename(folder, &foo_boffo, &nope_nyet);
@@ -395,7 +395,7 @@ test_Hard_Link(TestBatch *batch, set_up_
outstream = Folder_Open_Out(folder, &boffo);
DECREF(outstream);
- /* Link files. */
+ // Link files.
result = Folder_Hard_Link(folder, &boffo, &banana);
ASSERT_TRUE(batch, result, "Hard_Link succeeds and returns true");
@@ -421,7 +421,7 @@ test_Hard_Link(TestBatch *batch, set_up_
"File still exists at old path");
Folder_Delete(folder, &foo_bar_boffo);
- /* Invalid clobbers. */
+ // Invalid clobbers.
outstream = Folder_Open_Out(folder, &boffo);
DECREF(outstream);
@@ -442,7 +442,7 @@ test_Hard_Link(TestBatch *batch, set_up_
"File still exists at old path");
Folder_Delete(folder, &baz);
- /* Invalid Hard_Link of dir. */
+ // Invalid Hard_Link of dir.
Folder_MkDir(folder, &baz);
result = Folder_Hard_Link(folder, &baz, &banana);
@@ -453,14 +453,14 @@ test_Hard_Link(TestBatch *batch, set_up_
"Folder still exists at old path");
Folder_Delete(folder, &baz);
- /* Test that linking to yourself fails. */
+ // Test that linking to yourself fails.
result = Folder_Hard_Link(folder, &foo_boffo, &foo_boffo);
ASSERT_FALSE(batch, result, "Hard_Link file to itself fails");
ASSERT_TRUE(batch, Folder_Exists(folder, &foo_boffo),
"File still exists");
- /* Invalid filepaths. */
+ // Invalid filepaths.
Err_set_error(NULL);
result = Folder_Rename(folder, &foo_boffo, &nope_nyet);
Modified: lucene/lucy/trunk/core/Lucy/Test/Store/TestIOChunks.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Store/TestIOChunks.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Store/TestIOChunks.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Store/TestIOChunks.c Sat Apr 3 19:20:18 2010
@@ -70,7 +70,7 @@ test_Buf(TestBatch *batch)
ASSERT_INT_EQ(batch, instream->limit - buf, IO_STREAM_BUF_SIZE,
"Small request bumped up");
- buf += IO_STREAM_BUF_SIZE - 10; /* 10 bytes left in buffer. */
+ buf += IO_STREAM_BUF_SIZE - 10; // 10 bytes left in buffer.
InStream_Advance_Buf(instream, buf);
buf = InStream_Buf(instream, 10);
Modified: lucene/lucy/trunk/core/Lucy/Test/Store/TestIOPrimitives.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Store/TestIOPrimitives.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Store/TestIOPrimitives.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Store/TestIOPrimitives.c Sat Apr 3 19:20:18 2010
@@ -73,7 +73,7 @@ test_i32(TestBatch *batch)
InStream *instream;
uint32_t i;
- /* Test boundaries. */
+ // Test boundaries.
ints[0] = I32_MIN;
ints[1] = I32_MIN + 1;
ints[2] = I32_MAX;
@@ -112,7 +112,7 @@ test_u32(TestBatch *batch)
InStream *instream;
uint32_t i;
- /* Test boundaries. */
+ // Test boundaries.
ints[0] = 0;
ints[1] = 1;
ints[2] = U32_MAX;
@@ -151,7 +151,7 @@ test_i64(TestBatch *batch)
InStream *instream;
uint32_t i;
- /* Test boundaries. */
+ // Test boundaries.
ints[0] = I64_MIN;
ints[1] = I64_MIN + 1;
ints[2] = I64_MAX;
@@ -191,7 +191,7 @@ test_u64(TestBatch *batch)
InStream *instream;
uint32_t i;
- /* Test boundaries. */
+ // Test boundaries.
ints[0] = 0;
ints[1] = 1;
ints[2] = U64_MAX;
@@ -230,7 +230,7 @@ test_c32(TestBatch *batch)
InStream *instream;
uint32_t i;
- /* Test boundaries. */
+ // Test boundaries.
ints[0] = 0;
ints[1] = 1;
ints[2] = U32_MAX;
@@ -272,7 +272,7 @@ test_c64(TestBatch *batch)
InStream *raw_instream;
uint32_t i;
- /* Test boundaries. */
+ // Test boundaries.
ints[0] = 0;
ints[1] = 1;
ints[2] = U64_MAX;
@@ -334,12 +334,12 @@ test_f32(TestBatch *batch)
InStream *instream;
uint32_t i;
- /* Truncate. */
+ // Truncate.
for (i = 0; i < 1000; i++) {
values[i] = (float)f64s[i];
}
- /* Test boundaries. */
+ // Test boundaries.
values[0] = 0.0f;
values[1] = 1.0f;
@@ -376,7 +376,7 @@ test_f64(TestBatch *batch)
InStream *instream;
uint32_t i;
- /* Test boundaries. */
+ // Test boundaries.
values[0] = 0.0;
values[1] = 1.0;
Modified: lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMDirHandle.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMDirHandle.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMDirHandle.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMDirHandle.c Sat Apr 3 19:20:18 2010
@@ -20,7 +20,7 @@ test_all(TestBatch *batch)
bool_t boffo_was_dir = false;
int count = 0;
- /* Set up folder contents. */
+ // Set up folder contents.
RAMFolder_MkDir(folder, foo);
FileHandle *fh = RAMFolder_Open_FileHandle(folder, boffo,
FH_CREATE | FH_WRITE_ONLY);
Modified: lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMFileHandle.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMFileHandle.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMFileHandle.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMFileHandle.c Sat Apr 3 19:20:18 2010
@@ -48,7 +48,7 @@ test_Read_Write(TestBatch *batch)
ASSERT_TRUE(batch, Err_get_error() != NULL,
"Reading from a write-only handle sets error");
- /* Reopen for reading. */
+ // Reopen for reading.
DECREF(fh);
fh = RAMFH_open(NULL, FH_READ_ONLY, file);
ASSERT_TRUE(batch, RAMFile_Read_Only(file),
@@ -115,7 +115,7 @@ test_Window(TestBatch *batch)
}
RAMFH_Close(fh);
- /* Reopen for reading. */
+ // Reopen for reading.
DECREF(fh);
fh = RAMFH_open(NULL, FH_READ_ONLY, file);
Modified: lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMFolder.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMFolder.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMFolder.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMFolder.c Sat Apr 3 19:20:18 2010
@@ -240,7 +240,7 @@ test_Rename(TestBatch *batch)
fh = RAMFolder_Open_FileHandle(folder, &boffo, FH_CREATE | FH_WRITE_ONLY);
DECREF(fh);
- /* Move files. */
+ // Move files.
result = RAMFolder_Rename(folder, &boffo, &banana);
ASSERT_TRUE(batch, result, "Rename succeeds and returns true");
@@ -273,7 +273,7 @@ test_Rename(TestBatch *batch)
ASSERT_FALSE(batch, RAMFolder_Exists(folder, &boffo),
"File no longer exists at old path");
- /* Move Dirs. */
+ // Move Dirs.
RAMFolder_MkDir(folder, &baz);
result = RAMFolder_Rename(folder, &baz, &boffo);
@@ -297,7 +297,7 @@ test_Rename(TestBatch *batch)
ASSERT_FALSE(batch, RAMFolder_Exists(folder, &foo_foo),
"Folder no longer exists at old path");
- /* Test failed clobbers. */
+ // Test failed clobbers.
Err_set_error(NULL);
result = RAMFolder_Rename(folder, &foo_boffo, &foo_bar);
@@ -319,7 +319,7 @@ test_Rename(TestBatch *batch)
ASSERT_TRUE(batch, RAMFolder_Exists(folder, &foo_boffo),
"File still exists after failed clobber");
- /* Test that "renaming" succeeds where to and from are the same. */
+ // Test that "renaming" succeeds where to and from are the same.
result = RAMFolder_Rename(folder, &foo_boffo, &foo_boffo);
ASSERT_TRUE(batch, result, "Renaming file to itself succeeds");
@@ -331,7 +331,7 @@ test_Rename(TestBatch *batch)
ASSERT_TRUE(batch, RAMFolder_Exists(folder, &foo_bar),
"Dir still exists");
- /* Invalid filepaths. */
+ // Invalid filepaths.
Err_set_error(NULL);
result = RAMFolder_Rename(folder, &foo_boffo, &nope_nyet);
@@ -362,7 +362,7 @@ test_Hard_Link(TestBatch *batch)
fh = RAMFolder_Open_FileHandle(folder, &boffo, FH_CREATE | FH_WRITE_ONLY);
DECREF(fh);
- /* Link files. */
+ // Link files.
result = RAMFolder_Hard_Link(folder, &boffo, &banana);
ASSERT_TRUE(batch, result, "Hard_Link succeeds and returns true");
@@ -388,7 +388,7 @@ test_Hard_Link(TestBatch *batch)
"File still exists at old path");
RAMFolder_Delete(folder, &foo_bar_boffo);
- /* Invalid clobbers. */
+ // Invalid clobbers.
fh = RAMFolder_Open_FileHandle(folder, &boffo, FH_CREATE | FH_WRITE_ONLY);
DECREF(fh);
@@ -409,7 +409,7 @@ test_Hard_Link(TestBatch *batch)
"File still exists at old path");
RAMFolder_Delete(folder, &baz);
- /* Invalid Hard_Link of dir. */
+ // Invalid Hard_Link of dir.
RAMFolder_MkDir(folder, &baz);
result = RAMFolder_Hard_Link(folder, &baz, &banana);
@@ -420,14 +420,14 @@ test_Hard_Link(TestBatch *batch)
"Folder still exists at old path");
RAMFolder_Delete(folder, &baz);
- /* Test that linking to yourself fails. */
+ // Test that linking to yourself fails.
result = RAMFolder_Hard_Link(folder, &foo_boffo, &foo_boffo);
ASSERT_FALSE(batch, result, "Hard_Link file to itself fails");
ASSERT_TRUE(batch, RAMFolder_Exists(folder, &foo_boffo),
"File still exists");
- /* Invalid filepaths. */
+ // Invalid filepaths.
Err_set_error(NULL);
result = RAMFolder_Rename(folder, &foo_boffo, &nope_nyet);
Modified: lucene/lucy/trunk/core/Lucy/Test/Util/TestJson.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Util/TestJson.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Util/TestJson.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Util/TestJson.c Sat Apr 3 19:20:18 2010
@@ -6,8 +6,8 @@
#include "Lucy/Store/FileHandle.h"
#include "Lucy/Store/RAMFolder.h"
-/* Create a test data structure including at least one each of Hash, VArray,
- * and CharBuf. */
+// Create a test data structure including at least one each of Hash, VArray,
+// and CharBuf.
static Obj*
S_make_dump()
{
Modified: lucene/lucy/trunk/core/Lucy/Test/Util/TestNumberUtils.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Util/TestNumberUtils.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Util/TestNumberUtils.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Util/TestNumberUtils.c Sat Apr 3 19:20:18 2010
@@ -186,7 +186,7 @@ test_bigend_u16(TestBatch *batch)
uint64_t *ints = TestUtils_random_u64s(NULL, count, 0, U16_MAX + 1);
size_t amount = (count + 1) * sizeof(uint16_t);
char *allocated = (char*)CALLOCATE(amount, sizeof(char));
- char *encoded = allocated + 1; /* Intentionally misaligned. */
+ char *encoded = allocated + 1; // Intentionally misaligned.
char *target = encoded;
for (size_t i = 0; i < count; i++) {
@@ -216,7 +216,7 @@ test_bigend_u32(TestBatch *batch)
uint64_t *ints = TestUtils_random_u64s(NULL, count, 0, U64_C(1) + U32_MAX);
size_t amount = (count + 1) * sizeof(uint32_t);
char *allocated = (char*)CALLOCATE(amount, sizeof(char));
- char *encoded = allocated + 1; /* Intentionally misaligned. */
+ char *encoded = allocated + 1; // Intentionally misaligned.
char *target = encoded;
for (size_t i = 0; i < count; i++) {
@@ -246,7 +246,7 @@ test_bigend_u64(TestBatch *batch)
uint64_t *ints = TestUtils_random_u64s(NULL, count, 0, U64_MAX);
size_t amount = (count + 1) * sizeof(uint64_t);
char *allocated = (char*)CALLOCATE(amount, sizeof(char));
- char *encoded = allocated + 1; /* Intentionally misaligned. */
+ char *encoded = allocated + 1; // Intentionally misaligned.
char *target = encoded;
for (size_t i = 0; i < count; i++) {
@@ -276,7 +276,7 @@ test_bigend_f32(TestBatch *batch)
size_t count = 3;
size_t amount = (count + 1) * sizeof(float);
uint8_t *allocated = (uint8_t*)CALLOCATE(amount, sizeof(uint8_t));
- uint8_t *encoded = allocated + 1; /* Intentionally misaligned. */
+ uint8_t *encoded = allocated + 1; // Intentionally misaligned.
uint8_t *target = encoded;
for (size_t i = 0; i < count; i++) {
@@ -311,7 +311,7 @@ test_bigend_f64(TestBatch *batch)
size_t count = 3;
size_t amount = (count + 1) * sizeof(double);
uint8_t *allocated = (uint8_t*)CALLOCATE(amount, sizeof(uint8_t));
- uint8_t *encoded = allocated + 1; /* Intentionally misaligned. */
+ uint8_t *encoded = allocated + 1; // Intentionally misaligned.
uint8_t *target = encoded;
for (size_t i = 0; i < count; i++) {
Modified: lucene/lucy/trunk/core/Lucy/Test/Util/TestStringHelper.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Util/TestStringHelper.c?rev=930566&r1=930565&r2=930566&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Util/TestStringHelper.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Util/TestStringHelper.c Sat Apr 3 19:20:18 2010
@@ -9,9 +9,8 @@ test_SKIP_and_TRAILING(TestBatch *batch)
{
uint8_t i, max;
- /* Some of the upper max boundaries are skipped (e.g. 127)
- * because they may not appear as initial bytes in legal UTF-8.
- */
+ // Some of the upper max boundaries are skipped (e.g. 127)
+ // because they may not appear as initial bytes in legal UTF-8.
for (i = 0, max = 127; i < max; i++) {
ASSERT_INT_EQ(batch, StrHelp_UTF8_SKIP[i], 1,
"UTF8_SKIP ascii %d", (int)i);
@@ -102,11 +101,11 @@ test_utf8_round_trip(TestBatch *batch)
{
uint32_t code_points[] = {
0,
- 0xA, /* newline */
+ 0xA, // newline
'a',
- 128, /* two-byte */
- 0x263A, /* smiley (three-byte) */
- 0x10FFFF, /* Max legal code point (four-byte). */
+ 128, // two-byte
+ 0x263A, // smiley (three-byte)
+ 0x10FFFF, // Max legal code point (four-byte).
};
uint32_t num_code_points = sizeof(code_points) / sizeof(uint32_t);
uint32_t i;