mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/stable@32970 72102866-910b-0410-8b05-ffd578937521
32 lines
952 B
Objective-C
32 lines
952 B
Objective-C
#import <Foundation/NSAutoreleasePool.h>
|
|
#import <Foundation/NSLocale.h>
|
|
#import <Foundation/NSCalendar.h>
|
|
#import "ObjectTesting.h"
|
|
|
|
#if defined(GS_USE_ICU)
|
|
#define NSCALENDAR_SUPPORTED GS_USE_ICU
|
|
#else
|
|
#define NSCALENDAR_SUPPORTED 1 /* Assume Apple support */
|
|
#endif
|
|
|
|
int main(void)
|
|
{
|
|
START_SET("NSCalendar create")
|
|
NSCalendar *cal;
|
|
|
|
if (!NSCALENDAR_SUPPORTED)
|
|
SKIP("NSCalendar not supported\nThe ICU library was not available when GNUstep-base was built")
|
|
|
|
cal = [NSCalendar currentCalendar];
|
|
PASS (cal != nil, "+currentCalendar returns non-nil");
|
|
TEST_FOR_CLASS(@"NSCalendar", cal, "+currentCalendar return a NSCalendar");
|
|
|
|
cal = [[NSCalendar alloc] initWithCalendarIdentifier: NSGregorianCalendar];
|
|
PASS (cal != nil, "-initWithCalendarIdentifier: return non-nil");
|
|
TEST_FOR_CLASS(@"NSCalendar", cal,
|
|
"-initWithCalendarIdentifier: return a NSCalendar");
|
|
RELEASE(cal);
|
|
|
|
END_SET("NSCalendar create")
|
|
return 0;
|
|
}
|