Added some output to test archiving functionality.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6661 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-02-20 15:05:40 +00:00
parent 122e979e2d
commit c81fdc88cc

View File

@ -10,6 +10,11 @@
#include <Window.h>
#include <Box.h>
#include <stdio.h>
#define TESTS
class Window : public BWindow {
public:
@ -49,8 +54,33 @@ Window::Window()
scroller->SetBorderHighlighted(true);
box->AddChild(scroller);
#ifdef TESTS
if (i == 7) {
BMessage archive;
if (scroller->Archive(&archive/*, false*/) == B_OK) {
puts("BScrollView archived:");
archive.PrintToStream();
} else
puts("archiving failed!");
BScrollView *second = (BScrollView *)BScrollView::Instantiate(&archive);
archive.MakeEmpty();
if (second != NULL && second->Archive(&archive) == B_OK) {
puts("2. BScrollView archived:");
archive.PrintToStream();
}
}
if (i % 4 == 3)
scroller->SetBorder(B_FANCY_BORDER);
#endif
rect.OffsetBy(120, 0);
}
#ifdef TESTS
printf("sizeof = %lu\n", sizeof(BScrollView));
#endif
}