unit test fix

This commit is contained in:
Vadim Kurland
2011-03-12 23:36:39 -08:00
parent fcafb30ade
commit 3341844604
2 changed files with 1 additions and 10 deletions
+1 -9
View File
@@ -51,7 +51,6 @@
using namespace libfwbuilder;
using namespace std;
extern const char* standardFolders[];
void FWBTreeTest::isSystem()
{
@@ -75,19 +74,12 @@ void FWBTreeTest::isSystem()
CPPUNIT_ASSERT(fwbtree.isSystem(&fw) == false);
}
bool FWBTreeTest::isStandardFolder(string path)
{
for (const char **cptr=standardFolders; *cptr!=NULL; cptr++)
if (path == *cptr) return true;
return false;
}
QSet<FWObject*> FWBTreeTest::getStandardFolders(FWObject *root)
{
QSet<FWObject*> res;
for (FWObject::iterator i = root->begin(); i != root->end(); i++)
{
if (isStandardFolder((*i)->getPath(true))) res.insert(*i);
if (FWBTree().isStandardFolder(*i)) res.insert(*i);
res += getStandardFolders(*i);
}
return res;
-1
View File
@@ -34,7 +34,6 @@
class FWBTreeTest : public CppUnit::TestFixture
{
bool isStandardFolder(std::string path);
QSet<libfwbuilder::FWObject*> getStandardFolders(libfwbuilder::FWObject *root);
public: