test event loop in background
Annotate for file test.lisp
2009-06-06 tobias 1 ;;; sbcl < test.lisp
15:07:40 ' 2 ;;;
' 3 ;;; somehow #'LOADing the test file hangs WITH-APP!?
' 4 ;;; Thus the pipe
' 5 ;;;
' 6
' 7 (in-package :sysdef-user)
' 8
' 9 (defun load-sysdef (pathname system)
' 10 (load pathname)
' 11 (setf (mb.sysdef::pathname-of (find-system system)) pathname))
' 12
' 13 (defun load-sysdef-file (system-name)
' 14 "Loads a mbd file in the current directory."
' 15 (load-sysdef (first (directory "*.mbd"))
' 16 system-name))
' 17
' 18 (load-sysdef-file :cl-smoke.repl)
' 19 (mb:load :cl-smoke.repl)
' 20
' 21 (in-package :cl-smoke.repl)
' 22
' 23 (defun test-event-loop-in-background ()
' 24 (start-event-loop-in-background)
' 25 (qt-eval '(defvar *w* (make-instance 'qt:push-button)))
' 26 (qt-eval '(cxx:show *w*))
' 27 (qt-eval '(setf (cxx:text *w*) "Hello World!"))
' 28 (qt-eval '(assert (string= "Hello World!" (cxx:text *w*))))
' 29 (qt-eval '(cxx:adjust-size *w*))
' 30 (qt-eval '(in-package :smoke))
' 31 (qt-eval '(assert (eql (find-package :smoke) *package*)))
' 32 (qt-eval '(end-event-loop)))
' 33
' 34 (test-event-loop-in-background)
' 35
' 36 (print "success")
' 37
' 38 (sb-ext:quit)