Remove obsolete file, add unit tests for core-foundation.run-loop, add <CFTimer> word
parent
36c36a7f83
commit
0ba2c964af
|
@ -1,9 +0,0 @@
|
||||||
! Copyright (C) 2008 Slava Pestov.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: core-foundation tools.test kernel ;
|
|
||||||
IN: core-foundation
|
|
||||||
|
|
||||||
[ ] [ "Hello" <CFString> CFRelease ] unit-test
|
|
||||||
[ "Hello" ] [ "Hello" <CFString> [ CF>string ] [ CFRelease ] bi ] unit-test
|
|
||||||
[ "Hello\u003456" ] [ "Hello\u003456" <CFString> [ CF>string ] [ CFRelease ] bi ] unit-test
|
|
||||||
[ "Hello\u013456" ] [ "Hello\u013456" <CFString> [ CF>string ] [ CFRelease ] bi ] unit-test
|
|
|
@ -1,6 +1,6 @@
|
||||||
! Copyright (C) 2008 Slava Pestov.
|
! Copyright (C) 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: alien.syntax ;
|
USING: alien.syntax system math kernel ;
|
||||||
IN: core-foundation.timers
|
IN: core-foundation.timers
|
||||||
|
|
||||||
TYPEDEF: void* CFRunLoopTimerRef
|
TYPEDEF: void* CFRunLoopTimerRef
|
||||||
|
@ -17,6 +17,9 @@ FUNCTION: CFRunLoopTimerRef CFRunLoopTimerCreate (
|
||||||
CFRunLoopTimerContext* context
|
CFRunLoopTimerContext* context
|
||||||
) ;
|
) ;
|
||||||
|
|
||||||
|
: <CFTimer> ( callback -- timer )
|
||||||
|
[ f millis 1000 /f 60 0 0 ] dip f CFRunLoopTimerCreate ;
|
||||||
|
|
||||||
FUNCTION: void CFRunLoopTimerInvalidate (
|
FUNCTION: void CFRunLoopTimerInvalidate (
|
||||||
CFRunLoopTimerRef timer
|
CFRunLoopTimerRef timer
|
||||||
) ;
|
) ;
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
USING: io.unix.multiplexers.run-loop tools.test
|
||||||
|
destructors ;
|
||||||
|
IN: io.unix.multiplexers.run-loop.tests
|
||||||
|
|
||||||
|
[ ] [ <run-loop-mx> dispose ] unit-test
|
Loading…
Reference in New Issue