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:
@@ -236,6 +236,9 @@ test_find_directory(directory_which dir, BPath &path, dev_t device)
|
|||||||
case B_USER_DIRECTORY:
|
case B_USER_DIRECTORY:
|
||||||
error = path.SetTo("/boot/home");
|
error = path.SetTo("/boot/home");
|
||||||
break;
|
break;
|
||||||
|
case B_USER_CACHE_DIRECTORY:
|
||||||
|
error = path.SetTo("/boot/common/cache");
|
||||||
|
break;
|
||||||
case B_USER_CONFIG_DIRECTORY:
|
case B_USER_CONFIG_DIRECTORY:
|
||||||
error = path.SetTo("/boot/home/config");
|
error = path.SetTo("/boot/home/config");
|
||||||
break;
|
break;
|
||||||
@@ -245,6 +248,9 @@ test_find_directory(directory_which dir, BPath &path, dev_t device)
|
|||||||
case B_USER_BOOT_DIRECTORY:
|
case B_USER_BOOT_DIRECTORY:
|
||||||
error = path.SetTo("/boot/home/config/boot");
|
error = path.SetTo("/boot/home/config/boot");
|
||||||
break;
|
break;
|
||||||
|
case B_USER_DATA_DIRECTORY:
|
||||||
|
error = path.SetTo("/boot/home/config/data");
|
||||||
|
break;
|
||||||
case B_USER_FONTS_DIRECTORY:
|
case B_USER_FONTS_DIRECTORY:
|
||||||
error = path.SetTo("/boot/home/config/fonts");
|
error = path.SetTo("/boot/home/config/fonts");
|
||||||
break;
|
break;
|
||||||
@@ -269,6 +275,9 @@ test_find_directory(directory_which dir, BPath &path, dev_t device)
|
|||||||
case B_USER_SOUNDS_DIRECTORY:
|
case B_USER_SOUNDS_DIRECTORY:
|
||||||
error = path.SetTo("/boot/home/config/sounds");
|
error = path.SetTo("/boot/home/config/sounds");
|
||||||
break;
|
break;
|
||||||
|
case B_SYSTEM_DATA_DIRECTORY:
|
||||||
|
error = path.SetTo("/boot/system/data");
|
||||||
|
break;
|
||||||
// Global directories.
|
// Global directories.
|
||||||
case B_APPS_DIRECTORY:
|
case B_APPS_DIRECTORY:
|
||||||
error = path.SetTo("/boot/system/apps");
|
error = path.SetTo("/boot/system/apps");
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include <MessageQueue.h>
|
#include <MessageQueue.h>
|
||||||
#include <Messenger.h>
|
#include <Messenger.h>
|
||||||
#include <NodeMonitor.h>
|
#include <NodeMonitor.h>
|
||||||
|
#include <ObjectList.h>
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
#include <Path.h>
|
#include <Path.h>
|
||||||
#include <Query.h>
|
#include <Query.h>
|
||||||
@@ -265,7 +266,7 @@ public:
|
|||||||
return (PredicateNode*)children.ItemAt(index);
|
return (PredicateNode*)children.ItemAt(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
BList children;
|
BObjectList<PredicateNode> children;
|
||||||
};
|
};
|
||||||
|
|
||||||
// OpNode
|
// OpNode
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#define _beos_test_app_h_
|
#define _beos_test_app_h_
|
||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <List.h>
|
#include <ObjectList.h>
|
||||||
#include <MessageQueue.h>
|
#include <MessageQueue.h>
|
||||||
|
|
||||||
// TestHandler
|
// TestHandler
|
||||||
@@ -41,8 +41,9 @@ private:
|
|||||||
static int32 _AppThreadStart(void *data);
|
static int32 _AppThreadStart(void *data);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
typedef BObjectList<BTestHandler> TestHandlers;
|
||||||
thread_id fAppThread;
|
thread_id fAppThread;
|
||||||
BList fHandlers;
|
TestHandlers fHandlers;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _beos_test_app_h_
|
#endif // _beos_test_app_h_
|
||||||
|
|||||||
Reference in New Issue
Block a user