libs-gui/Tests/gui/NSPopUpButton/defaultSelection.m
rfm 7aac32819c Import testsuite
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32225 72102866-910b-0410-8b05-ffd578937521
2011-02-19 16:57:57 +00:00

28 lines
480 B
Objective-C

/*
copyright 2005 Alexander Malmberg <alexander@malmberg.org>
*/
#include "Testing.h"
#include <AppKit/NSApplication.h>
#include <AppKit/NSPopUpButton.h>
int main(int argc, char **argv)
{
CREATE_AUTORELEASE_POOL(arp);
NSPopUpButton *b;
[NSApplication sharedApplication];
b=[[NSPopUpButton alloc] init];
[b addItemWithTitle: @"foo"];
[b addItemWithTitle: @"bar"];
pass([b indexOfSelectedItem] == 0,"first item is selected by default");
DESTROY(arp);
return 0;
}