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

19 lines
676 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
{ } [ { } <CFDictionary> CFRelease ] unit-test
2009-01-19 00:44:02 -05:00
{ "raps in the back of cars and doesn't afraid of anything" } [
2009-01-19 00:44:02 -05:00
[
"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