From 3c4d1fb885bd408030687c66049ff613f158f2f7 Mon Sep 17 00:00:00 2001 From: slava Date: Fri, 17 Nov 2006 03:05:27 +0000 Subject: [PATCH] Fix search unit ttest --- TODO.FACTOR.txt | 4 +-- library/ui/test/listener.factor | 4 ++- library/ui/test/search.factor | 46 ++++++++++++++++++--------------- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 0f05d8def9..8f0f2505b1 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -1,8 +1,6 @@ + 0.87: - claim: if module fails to load, reloading it doesn't work? - -- fix search unit test - these things are "Too Slow": - all-words - make-image @@ -40,6 +38,7 @@ -fomit-frame-pointer or not - doesn't show #labels - we don't know if signal handlers run with the same stack or not +- got a random sig11 while reloading/recompiling + ui: @@ -91,6 +90,7 @@ + misc: +- tuple shape changes - should be possible to reload any source file in library - growable data heap - minor GC takes too long now, we should card mark code heap diff --git a/library/ui/test/listener.factor b/library/ui/test/listener.factor index a14da9909e..1ac8963d8e 100644 --- a/library/ui/test/listener.factor +++ b/library/ui/test/listener.factor @@ -1,6 +1,8 @@ IN: temporary USING: gadgets-listener words arrays namespaces test kernel -freetype ; +freetype timers ; + +timers [ init-timers ] unless [ "listener" set diff --git a/library/ui/test/search.factor b/library/ui/test/search.factor index 477eece152..3aa482b446 100644 --- a/library/ui/test/search.factor +++ b/library/ui/test/search.factor @@ -1,22 +1,26 @@ -! IN: temporary -! USING: gadgets-search io test namespaces gadgets -! sequences threads ; -! -! [ "hey man (score: 123)" ] -! [ -! [ -! { "hey man" 123 } [ ] string-completion. -! ] string-out -! ] unit-test -! -! "set-word-prop" [ ] "search" set -! "search" get graft* -! -! 1000 sleep -! -! [ f ] -! [ "search" get live-search-list control-value empty? ] -! unit-test -! -! "search" get ungraft* +IN: temporary +USING: gadgets-search io test namespaces gadgets +sequences threads freetype timers kernel ; +timers get [ init-timers ] unless + +[ + [ "hey man (score: 123)" ] + [ + [ + { "hey man" 123 } [ ] string-completion. + ] string-out + ] unit-test + + "set-word-prop" [ ] "search" set + "search" get graft + + 1000 sleep + do-timers + + [ f ] + [ "search" get live-search-list control-value empty? ] + unit-test + + "search" get ungraft +] with-freetype