From ff0ed19cd1f66839c93031dd44043d56d944864e Mon Sep 17 00:00:00 2001 From: Tyler Dauwalder Date: Tue, 15 Oct 2002 08:09:45 +0000 Subject: [PATCH] Initial checkin of generic test app code and constants used by GetRecentApps tests. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1523 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../broster/testapps/RecentAppsTestApp.cpp | 17 +++++++++++ .../app/broster/testapps/RecentAppsTestApp.h | 30 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 src/tests/kits/app/broster/testapps/RecentAppsTestApp.cpp create mode 100644 src/tests/kits/app/broster/testapps/RecentAppsTestApp.h diff --git a/src/tests/kits/app/broster/testapps/RecentAppsTestApp.cpp b/src/tests/kits/app/broster/testapps/RecentAppsTestApp.cpp new file mode 100644 index 0000000000..6da3443dee --- /dev/null +++ b/src/tests/kits/app/broster/testapps/RecentAppsTestApp.cpp @@ -0,0 +1,17 @@ +#include "RecentAppsTestApp.h" + +// Test app signatures +const char *kRecentAppsTestAppSigs[] = { + "application/x-vnd.obos-recent-apps-test-qualifying", + "application/x-vnd.obos-recent-apps-test-non-qualifying", + "application/x-vnd.obos-recent-apps-test-empty", + "application/x-vnd.obos-recent-apps-test-control", +}; + +const char *kRecentAppsTestAppFilenames[] = { + "RecentAppsTestQualifyingApp", + "RecentAppsTestNonQualifyingApp", + "RecentAppsTestEmptyApp", + "RecentAppsTestControlApp", +}; + diff --git a/src/tests/kits/app/broster/testapps/RecentAppsTestApp.h b/src/tests/kits/app/broster/testapps/RecentAppsTestApp.h new file mode 100644 index 0000000000..0f59eabfa7 --- /dev/null +++ b/src/tests/kits/app/broster/testapps/RecentAppsTestApp.h @@ -0,0 +1,30 @@ +#ifndef RECENT_APPS_TEST_APP_H +#define RECENT_APPS_TEST_APP_H + +#include + +class RecentAppsTestApp : public BApplication { +public: + RecentAppsTestApp(const char *sig) : BApplication(sig) {} + + virtual void ReadyToRun() { + Quit(); + } +}; + +// App indices, sigs, and filenames: +// 0: Qualifying: BEOS:APP_FLAGS == (B_SINGLE_LAUNCH || B_MULTIPLE_LAUNCH || B_EXCLUSIVE_LAUNCH) +// 1: Non-qualifying: BEOS:APP_FLAGS &== B_BACKGROUND_APP || B_ARGV_ONLY +// 2: Empty: No BEOS:APP_FLAGS attribute +// 3: Control: (same as qualifying, but with a different sig to make sure qualifying apps work correctly) +enum RecentAppsTestAppId { + kQualifyingApp = 0, + kNonQualifyingApp, + kEmptyApp, + kControlApp, +}; +extern const char *kRecentAppsTestAppSigs[]; +extern const char *kRecentAppsTestAppFilenames[]; + + +#endif