File: create.m

package info (click to toggle)
gnustep-base 1.31.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,580 kB
  • sloc: objc: 239,446; ansic: 36,519; cpp: 122; sh: 112; makefile: 100; xml: 32
file content (29 lines) | stat: -rw-r--r-- 800 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSLocale.h>
#import "ObjectTesting.h"

#if	defined(GS_USE_ICU)
#define	NSLOCALE_SUPPORTED	GS_USE_ICU
#else
#define	NSLOCALE_SUPPORTED	1 /* Assume Apple support */
#endif

int main(void)
{
  START_SET("NSLocale")
  NSLocale *locale;
  
  if (!NSLOCALE_SUPPORTED)
    SKIP("NSLocale not supported\nThe ICU library was not available when GNUstep-base was built")
  locale = [NSLocale systemLocale];
  PASS (locale != nil, "+systemLocale returns non-nil");
  TEST_FOR_CLASS(@"NSLocale", locale, "+systemLocale return a NSLocale");
  
  locale = [NSLocale currentLocale];
  PASS (locale != nil, "+currentLocale return non-nil");
  TEST_FOR_CLASS(@"NSLocale", locale, "+currentLocale return a NSLocale");
  
  END_SET("NSLocale")

  return 0;
}