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.
 | 
			
		||||
! See http://factorcode.org/license.txt for BSD license.
 | 
			
		||||
USING: alien.syntax ;
 | 
			
		||||
USING: alien.syntax system math kernel ;
 | 
			
		||||
IN: core-foundation.timers
 | 
			
		||||
 | 
			
		||||
TYPEDEF: void* CFRunLoopTimerRef
 | 
			
		||||
| 
						 | 
				
			
			@ -17,9 +17,12 @@ FUNCTION: CFRunLoopTimerRef CFRunLoopTimerCreate (
 | 
			
		|||
   CFRunLoopTimerContext* context
 | 
			
		||||
) ;
 | 
			
		||||
 | 
			
		||||
: <CFTimer> ( callback -- timer )
 | 
			
		||||
    [ f millis 1000 /f 60 0 0 ] dip f CFRunLoopTimerCreate ;
 | 
			
		||||
 | 
			
		||||
FUNCTION: void CFRunLoopTimerInvalidate (
 | 
			
		||||
   CFRunLoopTimerRef timer
 | 
			
		||||
);
 | 
			
		||||
) ;
 | 
			
		||||
 | 
			
		||||
FUNCTION: void CFRunLoopTimerSetNextFireDate (
 | 
			
		||||
   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