factor/basis/core-foundation/dictionaries/dictionaries-tests.factor

18 lines
675 B
Factor
Raw Normal View History

2009-01-16 19:41:21 -05:00
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
2009-01-19 00:44:02 -05:00
USING: tools.test core-foundation core-foundation.dictionaries
arrays destructors core-foundation.strings kernel namespaces ;
2009-01-16 19:41:21 -05:00
IN: core-foundation.dictionaries.tests
2009-01-19 00:44:02 -05:00
[ ] [ { } <CFDictionary> CFRelease ] unit-test
[ "raps in the back of cars and doesn't afraid of anything" ] [
[
"cpst" <CFString> &CFRelease dup "key" set
"raps in the back of cars and doesn't afraid of anything" <CFString> &CFRelease
2array 1array <CFDictionary> &CFRelease
"key" get
CFDictionaryGetValue
dup [ CF>string ] when
] with-destructors
] unit-test