From 48e740c514eacc85d5ff0b9eae0c0e6dc1c86844 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Mon, 2 May 2005 23:15:13 +0000 Subject: [PATCH] Added a test for BTextView within our app_server git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12543 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tests/servers/app/textview/Jamfile | 14 ++++++++++ src/tests/servers/app/textview/main.cpp | 35 +++++++++++++++++++++++++ src/tests/servers/app/textview/run | 5 ++++ 3 files changed, 54 insertions(+) create mode 100644 src/tests/servers/app/textview/Jamfile create mode 100644 src/tests/servers/app/textview/main.cpp create mode 100755 src/tests/servers/app/textview/run diff --git a/src/tests/servers/app/textview/Jamfile b/src/tests/servers/app/textview/Jamfile new file mode 100644 index 0000000000..c9c2db7af7 --- /dev/null +++ b/src/tests/servers/app/textview/Jamfile @@ -0,0 +1,14 @@ +SubDir OBOS_TOP src tests servers app textview ; + +UseHeaders [ FDirName os app ] ; +UseHeaders [ FDirName os interface ] ; + +SimpleTest TextView : + main.cpp +# for running natively under R5: +# : be ; +# for running in the Haiku app_server under R5: + : libopenbeos.so ; +# for running on Haiku: +# : libbe.so ; + diff --git a/src/tests/servers/app/textview/main.cpp b/src/tests/servers/app/textview/main.cpp new file mode 100644 index 0000000000..9a56bf395d --- /dev/null +++ b/src/tests/servers/app/textview/main.cpp @@ -0,0 +1,35 @@ +#include +#include +#include + +class window : public BWindow { +public: + window() : BWindow(BRect(10, 10, 300, 300), "BTextView test", B_DOCUMENT_WINDOW, B_ASYNCHRONOUS_CONTROLS) + { + BTextView *textview = new BTextView(Bounds(), "textview", Bounds(), B_WILL_DRAW); + AddChild(textview); + textview->MakeFocus(); + } + +}; + +class application : public BApplication { +public: + application() + :BApplication("application/x-vnd.test") + { + } + + virtual void ReadyToRun() + { + (new window())->Show(); + } + +}; + +int main() +{ + application app; + app.Run(); + return 0; +} diff --git a/src/tests/servers/app/textview/run b/src/tests/servers/app/textview/run new file mode 100755 index 0000000000..30fbbe4120 --- /dev/null +++ b/src/tests/servers/app/textview/run @@ -0,0 +1,5 @@ +#!/bin/sh + +../../../../../distro/x86.R1/beos/system/servers/app_server & +sleep 1s +../../../../../tests/servers/app/textview/TextView