mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-12 16:13:13 +02:00
unit test fix
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
class FWBTreeTest : public CppUnit::TestFixture
|
||||
{
|
||||
bool isStandardFolder(std::string path);
|
||||
QSet<libfwbuilder::FWObject*> getStandardFolders(libfwbuilder::FWObject *root);
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user