1 line
3.1 KiB
Plaintext
1 line
3.1 KiB
Plaintext
;; This is a collection of tests from the GCHAX.NoteFile. It tests the GCHAX library package. All the functions documented in GCHAX except \SHOW.CLOSED.WINDOWS are tested minimally to ensure they are there and do not blow up. This set of tests can take several minutes to run as some tests search for references to pointers. Also, they will ask several times "Shall I search for pointers to this object?" And answer itself "no" each time after a wait if the tester does not answer. The individual test files for each of the functions have been appended together in this big file to share common code and gain diagnostic information by testing the functions in a particular order.
|
||
;;
|
||
;; The source for the text file listing is the NoteCards database at {Erinyes}<Test>Lisp>Lyric>Plans>GCHAX.NoteFile. Changes are made only to the NoteFile. The listings are
|
||
;; Filed As: {eris}<lispcore>test>GCHAX>GCHAX.test
|
||
|
||
(do-test "load GCHACKS" (not (expect-errors (error) (il:filesload gchax))))
|
||
(do-test-group ("\\showgc" :before (defstruct our-test-structure (x)))
|
||
(do-test "error free \\showgc" (il:\\showgc 'our-test-structure) t)
|
||
(do-test "\\showgc with collect one reference"
|
||
(setq x (make-our-test-structure))
|
||
(eql 1 (length (il:\\showgc 'our-test-structure t))))
|
||
(do-test "\\SHOWGC when ONLYTYPES=NIL"
|
||
(il:\\showgc nil t nil nil nil 100) t))
|
||
(do-test "\\#collisions" (setq collisions (il:\\#collisions))
|
||
(and (eql 3 (length collisions))
|
||
(integerp (first collisions))
|
||
(integerp (second collisions))
|
||
(floatp (third collisions))))
|
||
(do-test "\\collectinuse" (integerp (il:\\refcnt (car (il:\\collectinuse 'our-test-structure)))))
|
||
(do-test-group "\\FINDPOINTER"
|
||
(do-test "simple no errors \\findpointer collect"
|
||
(listp (il:\\findpointer (car (il:\\collectinuse 'our-test-structure))
|
||
'il:collect))))
|
||
(do-test-group (do-test "error free \\FINDPOINTERS.OF.TYPE"
|
||
(il:\\findpointers.of.type 'stream
|
||
'(not
|
||
(il:openp ptr))) t))
|
||
(do-test "simple no errors \\SHOWCIRCULARITY"
|
||
(il:\\showcircularity (car (il:\\collectinuse 'our-test-structure)) 1) t)
|
||
|
||
|
||
STOP |