Literal aliens in source files are bade bad
parent
7248af54cc
commit
6ad09779cc
|
@ -1,8 +1,22 @@
|
||||||
IN: db.pools.tests
|
IN: db.pools.tests
|
||||||
USING: db.pools tools.test ;
|
USING: db.pools tools.test continuations io.files namespaces
|
||||||
|
accessors kernel math destructors ;
|
||||||
|
|
||||||
\ <db-pool> must-infer
|
\ <db-pool> must-infer
|
||||||
|
|
||||||
{ 2 0 } [ [ ] with-db-pool ] must-infer-as
|
{ 2 0 } [ [ ] with-db-pool ] must-infer-as
|
||||||
|
|
||||||
{ 1 0 } [ [ ] with-pooled-db ] must-infer-as
|
{ 1 0 } [ [ ] with-pooled-db ] must-infer-as
|
||||||
|
|
||||||
|
! Test behavior after image save/load
|
||||||
|
USE: db.sqlite
|
||||||
|
|
||||||
|
[ "pool-test.db" temp-file delete-file ] ignore-errors
|
||||||
|
|
||||||
|
[ ] [ "pool-test.db" sqlite-db <db-pool> "pool" set ] unit-test
|
||||||
|
|
||||||
|
[ ] [ "pool" get expired>> t >>expired drop ] unit-test
|
||||||
|
|
||||||
|
[ ] [ 1000 [ "pool" get [ ] with-pooled-db ] times ] unit-test
|
||||||
|
|
||||||
|
[ ] [ "pool" get dispose ] unit-test
|
||||||
|
|
|
@ -9,7 +9,7 @@ TUPLE: pool connections disposed expired ;
|
||||||
: check-pool ( pool -- )
|
: check-pool ( pool -- )
|
||||||
dup check-disposed
|
dup check-disposed
|
||||||
dup expired>> expired? [
|
dup expired>> expired? [
|
||||||
ALIEN: 31337 >>expired
|
31337 <alien> >>expired
|
||||||
connections>> delete-all
|
connections>> delete-all
|
||||||
] [ drop ] if ;
|
] [ drop ] if ;
|
||||||
|
|
||||||
|
|
|
@ -1285,10 +1285,10 @@ FUNCTION: void SetLastErrorEx ( DWORD dwErrCode, DWORD dwType ) ;
|
||||||
! FUNCTION: SetWindowPlacement
|
! FUNCTION: SetWindowPlacement
|
||||||
FUNCTION: BOOL SetWindowPos ( HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags ) ;
|
FUNCTION: BOOL SetWindowPos ( HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags ) ;
|
||||||
|
|
||||||
: HWND_BOTTOM ALIEN: 1 ;
|
: HWND_BOTTOM ( -- alien ) 1 <alien> ;
|
||||||
: HWND_NOTOPMOST ALIEN: -2 ;
|
: HWND_NOTOPMOST ( -- alien ) -2 <alien> ;
|
||||||
: HWND_TOP ALIEN: 0 ;
|
: HWND_TOP ( -- alien ) 0 <alien> ;
|
||||||
: HWND_TOPMOST ALIEN: -1 ;
|
: HWND_TOPMOST ( -- alien ) -1 <alien> ;
|
||||||
|
|
||||||
! FUNCTION: SetWindowRgn
|
! FUNCTION: SetWindowRgn
|
||||||
! FUNCTION: SetWindowsHookA
|
! FUNCTION: SetWindowsHookA
|
||||||
|
|
Loading…
Reference in New Issue