Storage Kit tests: apply relevant parts of #7025

Patch by Karvjorm. Picked only the code changes as it seems the Jamfile
changes were not needed or already done.
* Use BObjectList instead of BList
* Add some more directory constants to FindDirectory tests.
This commit is contained in:
Adrien Destugues
2014-11-21 17:44:11 +01:00
parent ec1395bda9
commit 1f8b3fdb7e
3 changed files with 14 additions and 3 deletions
@@ -236,6 +236,9 @@ test_find_directory(directory_which dir, BPath &path, dev_t device)
case B_USER_DIRECTORY:
error = path.SetTo("/boot/home");
break;
case B_USER_CACHE_DIRECTORY:
error = path.SetTo("/boot/common/cache");
break;
case B_USER_CONFIG_DIRECTORY:
error = path.SetTo("/boot/home/config");
break;
@@ -245,6 +248,9 @@ test_find_directory(directory_which dir, BPath &path, dev_t device)
case B_USER_BOOT_DIRECTORY:
error = path.SetTo("/boot/home/config/boot");
break;
case B_USER_DATA_DIRECTORY:
error = path.SetTo("/boot/home/config/data");
break;
case B_USER_FONTS_DIRECTORY:
error = path.SetTo("/boot/home/config/fonts");
break;
@@ -269,6 +275,9 @@ test_find_directory(directory_which dir, BPath &path, dev_t device)
case B_USER_SOUNDS_DIRECTORY:
error = path.SetTo("/boot/home/config/sounds");
break;
case B_SYSTEM_DATA_DIRECTORY:
error = path.SetTo("/boot/system/data");
break;
// Global directories.
case B_APPS_DIRECTORY:
error = path.SetTo("/boot/system/apps");
+2 -1
View File
@@ -13,6 +13,7 @@
#include <MessageQueue.h>
#include <Messenger.h>
#include <NodeMonitor.h>
#include <ObjectList.h>
#include <OS.h>
#include <Path.h>
#include <Query.h>
@@ -265,7 +266,7 @@ public:
return (PredicateNode*)children.ItemAt(index);
}
BList children;
BObjectList<PredicateNode> children;
};
// OpNode
+3 -2
View File
@@ -4,7 +4,7 @@
#define _beos_test_app_h_
#include <Application.h>
#include <List.h>
#include <ObjectList.h>
#include <MessageQueue.h>
// TestHandler
@@ -41,8 +41,9 @@ private:
static int32 _AppThreadStart(void *data);
private:
typedef BObjectList<BTestHandler> TestHandlers;
thread_id fAppThread;
BList fHandlers;
TestHandlers fHandlers;
};
#endif // _beos_test_app_h_