]> gitweb.factorcode.org Git - factor.git/blob - basis/core-foundation/strings/strings-tests.factor
factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!
[factor.git] / basis / core-foundation / strings / strings-tests.factor
1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: core-foundation.strings core-foundation tools.test kernel
4 strings ;
5 IN: core-foundation
6
7 { } [ "Hello" <CFString> CFRelease ] unit-test
8 { "Hello" } [ "Hello" <CFString> [ CF>string ] [ CFRelease ] bi ] unit-test
9 { "Hello\u003456" } [ "Hello\u003456" <CFString> [ CF>string ] [ CFRelease ] bi ] unit-test
10 { "Hello\u013456" } [ "Hello\u013456" <CFString> [ CF>string ] [ CFRelease ] bi ] unit-test
11 { } [ "\0" <CFString> CFRelease ] unit-test
12 { "\0" } [ "\0" <CFString> [ CF>string ] [ CFRelease ] bi ] unit-test
13
14 ! This shouldn't fail
15 { } [ { 0x123456 } >string <CFString> CFRelease ] unit-test