Fixed BDirectory::Contains() test comments and checks for existing entry
uninitialized/badly initialized BDirectory cases. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20224 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ed518e4b22
commit
f7100fce9b
@ -929,11 +929,11 @@ DirectoryTest::ContainsTest()
|
||||
dir.Unset();
|
||||
// existing entry, uninitialized BDirectory
|
||||
// R5: unlike the other version, this one returns false
|
||||
// OBOS: both versions return true
|
||||
// OBOS: both versions return false
|
||||
NextSubTest();
|
||||
CPPUNIT_ASSERT( dir.InitCheck() == B_NO_INIT );
|
||||
CPPUNIT_ASSERT( entry.SetTo(existing) == B_OK );
|
||||
CPPUNIT_ASSERT( equals(dir.Contains(&entry), false, true) );
|
||||
CPPUNIT_ASSERT( dir.Contains(&entry) == false );
|
||||
dir.Unset();
|
||||
entry.Unset();
|
||||
// non-existing entry, uninitialized BDirectory
|
||||
@ -945,12 +945,12 @@ DirectoryTest::ContainsTest()
|
||||
entry.Unset();
|
||||
// existing entry, badly initialized BDirectory
|
||||
// R5: unlike the other version, this one returns false
|
||||
// OBOS: both versions return true
|
||||
// OBOS: both versions return false
|
||||
NextSubTest();
|
||||
CPPUNIT_ASSERT( dir.SetTo(nonExisting) == B_ENTRY_NOT_FOUND );
|
||||
CPPUNIT_ASSERT( dir.InitCheck() == B_ENTRY_NOT_FOUND );
|
||||
CPPUNIT_ASSERT( entry.SetTo(existing) == B_OK);
|
||||
CPPUNIT_ASSERT( equals(dir.Contains(&entry), false, true) );
|
||||
CPPUNIT_ASSERT( dir.Contains(&entry) == false );
|
||||
dir.Unset();
|
||||
entry.Unset();
|
||||
// non-existing entry, badly initialized BDirectory
|
||||
|
Loading…
Reference in New Issue
Block a user