[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test-[jscocoa] 013 instance

Code

"NSString instantiation"
| s |
s := NSString withString: #hello.
s = #hello ifFalse: [
    self error: 'Wrong String result ',s
].


"NSLocale instantiation"
| o |
o := NSLocale withLocaleIdentifier: #fr_FR.
(o isKindOfClass: NSLocale) ifFalse: [
    self error: 'Wrong object ',o
].

o localeIdentifier = #fr_FR ifFalse: [
    self error: 'Wrong identifier ',o localeIdentifier
].

References