diff options
author | Vincent Ambo <tazjin@google.com> | 2020-01-17T17·53+0000 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-01-17T17·53+0000 |
commit | fdcfd59aa4426f1d4351b34a69829320084bda10 (patch) | |
tree | f2edeef16d32d18d45b7ff2ad3aba59a18f3ac8a /third_party/lisp/trivial-backtrace/test | |
parent | 00902daa000ab6fe5299e2b413ac27fb157de3bd (diff) | |
parent | cc026178a94f94fa9c79cedc66cbaf5ab78c21c1 (diff) |
Merge commit 'cc026178a94f94fa9c79cedc66cbaf5ab78c21c1' as 'third_party/lisp/trivial-backtrace' r/392
Diffstat (limited to 'third_party/lisp/trivial-backtrace/test')
-rw-r--r-- | third_party/lisp/trivial-backtrace/test/packages.lisp | 5 | ||||
-rw-r--r-- | third_party/lisp/trivial-backtrace/test/test-setup.lisp | 4 | ||||
-rw-r--r-- | third_party/lisp/trivial-backtrace/test/tests.lisp | 17 |
3 files changed, 26 insertions, 0 deletions
diff --git a/third_party/lisp/trivial-backtrace/test/packages.lisp b/third_party/lisp/trivial-backtrace/test/packages.lisp new file mode 100644 index 000000000000..7dc3eae57682 --- /dev/null +++ b/third_party/lisp/trivial-backtrace/test/packages.lisp @@ -0,0 +1,5 @@ +(in-package #:common-lisp-user) + +(defpackage #:trivial-backtrace-test + (:use #:common-lisp #:lift #:trivial-backtrace)) + diff --git a/third_party/lisp/trivial-backtrace/test/test-setup.lisp b/third_party/lisp/trivial-backtrace/test/test-setup.lisp new file mode 100644 index 000000000000..a46b3a196649 --- /dev/null +++ b/third_party/lisp/trivial-backtrace/test/test-setup.lisp @@ -0,0 +1,4 @@ +(in-package #:trivial-backtrace-test) + +(deftestsuite trivial-backtrace-test () + ()) diff --git a/third_party/lisp/trivial-backtrace/test/tests.lisp b/third_party/lisp/trivial-backtrace/test/tests.lisp new file mode 100644 index 000000000000..9b32090f13e0 --- /dev/null +++ b/third_party/lisp/trivial-backtrace/test/tests.lisp @@ -0,0 +1,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))))) |