Rewind()ing queries will work under Haiku, so check only for error under R5.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10699 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1008,7 +1008,10 @@ TestFetchPredicate(const char *mountPoint, const char *predicate,
|
|||||||
entryCount);
|
entryCount);
|
||||||
BEntry entry;
|
BEntry entry;
|
||||||
while (query.GetNextEntry(&entry) == B_OK) {
|
while (query.GetNextEntry(&entry) == B_OK) {
|
||||||
|
// Haiku supports rewinding queries, R5 does not.
|
||||||
|
#ifdef TEST_R5
|
||||||
CPPUNIT_ASSERT( query.Rewind() == B_ERROR );
|
CPPUNIT_ASSERT( query.Rewind() == B_ERROR );
|
||||||
|
#endif
|
||||||
CPPUNIT_ASSERT( query.CountEntries() == B_ERROR );
|
CPPUNIT_ASSERT( query.CountEntries() == B_ERROR );
|
||||||
BPath path;
|
BPath path;
|
||||||
CPPUNIT_ASSERT( entry.InitCheck() == B_OK );
|
CPPUNIT_ASSERT( entry.InitCheck() == B_OK );
|
||||||
@@ -1026,7 +1029,10 @@ TestFetchPredicate(const char *mountPoint, const char *predicate,
|
|||||||
entryCount);
|
entryCount);
|
||||||
entry_ref ref;
|
entry_ref ref;
|
||||||
while (query.GetNextRef(&ref) == B_OK) {
|
while (query.GetNextRef(&ref) == B_OK) {
|
||||||
|
// Haiku supports rewinding queries, R5 does not.
|
||||||
|
#ifdef TEST_R5
|
||||||
CPPUNIT_ASSERT( query.Rewind() == B_ERROR );
|
CPPUNIT_ASSERT( query.Rewind() == B_ERROR );
|
||||||
|
#endif
|
||||||
CPPUNIT_ASSERT( query.CountEntries() == B_ERROR );
|
CPPUNIT_ASSERT( query.CountEntries() == B_ERROR );
|
||||||
BPath path(&ref);
|
BPath path(&ref);
|
||||||
CPPUNIT_ASSERT( path.InitCheck() == B_OK );
|
CPPUNIT_ASSERT( path.InitCheck() == B_OK );
|
||||||
@@ -1045,7 +1051,10 @@ TestFetchPredicate(const char *mountPoint, const char *predicate,
|
|||||||
char buffer[bufSize];
|
char buffer[bufSize];
|
||||||
dirent *ents = (dirent *)buffer;
|
dirent *ents = (dirent *)buffer;
|
||||||
while (query.GetNextDirents(ents, bufSize, 1) == 1) {
|
while (query.GetNextDirents(ents, bufSize, 1) == 1) {
|
||||||
|
// Haiku supports rewinding queries, R5 does not.
|
||||||
|
#ifdef TEST_R5
|
||||||
CPPUNIT_ASSERT( query.Rewind() == B_ERROR );
|
CPPUNIT_ASSERT( query.Rewind() == B_ERROR );
|
||||||
|
#endif
|
||||||
CPPUNIT_ASSERT( query.CountEntries() == B_ERROR );
|
CPPUNIT_ASSERT( query.CountEntries() == B_ERROR );
|
||||||
entry_ref ref(ents->d_pdev, ents->d_pino, ents->d_name);
|
entry_ref ref(ents->d_pdev, ents->d_pino, ents->d_name);
|
||||||
BPath path(&ref);
|
BPath path(&ref);
|
||||||
@@ -1067,7 +1076,10 @@ TestFetchPredicate(const char *mountPoint, const char *predicate,
|
|||||||
entry_ref ref;
|
entry_ref ref;
|
||||||
BEntry entry;
|
BEntry entry;
|
||||||
while (query.GetNextDirents(ents, bufSize, 1) == 1) {
|
while (query.GetNextDirents(ents, bufSize, 1) == 1) {
|
||||||
|
// Haiku supports rewinding queries, R5 does not.
|
||||||
|
#ifdef TEST_R5
|
||||||
CPPUNIT_ASSERT( query.Rewind() == B_ERROR );
|
CPPUNIT_ASSERT( query.Rewind() == B_ERROR );
|
||||||
|
#endif
|
||||||
CPPUNIT_ASSERT( query.CountEntries() == B_ERROR );
|
CPPUNIT_ASSERT( query.CountEntries() == B_ERROR );
|
||||||
entry_ref entref(ents->d_pdev, ents->d_pino, ents->d_name);
|
entry_ref entref(ents->d_pdev, ents->d_pino, ents->d_name);
|
||||||
BPath entpath(&entref);
|
BPath entpath(&entref);
|
||||||
|
|||||||
Reference in New Issue
Block a user