about summary refs log blame commit diff
path: root/third_party/lisp/trivial-backtrace/test/tests.lisp
blob: 9b32090f13e0d65200915b5edf1185f2391f1076 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                          
(in-package #:trivial-backtrace-test)

(deftestsuite generates-backtrace (trivial-backtrace-test)
  ())

(addtest (generates-backtrace)
  test-1
  (let ((output nil))
    (handler-case 
	(let ((x 1))
	  (let ((y (- x (expt 1024 0))))
	    (declare (optimize (safety 3)))
	    (/ 2 y)))
      (error (c)
	(setf output (print-backtrace c :output nil))))
    (ensure (stringp output))
    (ensure (plusp (length output)))))