From 1f8b3fdb7e10d481850fd91618e7a8b5b57bcace Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 21 Nov 2014 17:41:59 +0100 Subject: [PATCH] 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. --- src/tests/kits/storage/FindDirectoryTest.cpp | 9 +++++++++ src/tests/kits/storage/QueryTest.cpp | 3 ++- src/tests/kits/storage/TestApp.h | 5 +++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/tests/kits/storage/FindDirectoryTest.cpp b/src/tests/kits/storage/FindDirectoryTest.cpp index 63c75794e1..75e8196e9f 100644 --- a/src/tests/kits/storage/FindDirectoryTest.cpp +++ b/src/tests/kits/storage/FindDirectoryTest.cpp @@ -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"); diff --git a/src/tests/kits/storage/QueryTest.cpp b/src/tests/kits/storage/QueryTest.cpp index b645b0921b..ac11ea4be2 100644 --- a/src/tests/kits/storage/QueryTest.cpp +++ b/src/tests/kits/storage/QueryTest.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -265,7 +266,7 @@ public: return (PredicateNode*)children.ItemAt(index); } - BList children; + BObjectList children; }; // OpNode diff --git a/src/tests/kits/storage/TestApp.h b/src/tests/kits/storage/TestApp.h index d43640545d..aad4a40597 100644 --- a/src/tests/kits/storage/TestApp.h +++ b/src/tests/kits/storage/TestApp.h @@ -4,7 +4,7 @@ #define _beos_test_app_h_ #include -#include +#include #include // TestHandler @@ -41,8 +41,9 @@ private: static int32 _AppThreadStart(void *data); private: + typedef BObjectList TestHandlers; thread_id fAppThread; - BList fHandlers; + TestHandlers fHandlers; }; #endif // _beos_test_app_h_