diff options
author | Mattias Engdegård <mattiase@acm.org> | 2023-07-25 12:15:00 +0200 |
---|---|---|
committer | Mattias Engdegård <mattiase@acm.org> | 2023-07-26 17:34:02 +0200 |
commit | c50f6538cfc43d856b361347c945f6348c6f2dc9 (patch) | |
tree | 2391406c0cf1bd3b97f5cd43b3369c465292b58f /test/lisp/emacs-lisp/bytecomp-tests.el | |
parent | 6572dcc7f5db90a32c35ef43788a8b29a07a0c2c (diff) | |
download | emacs-c50f6538cfc43d856b361347c945f6348c6f2dc9.tar.gz emacs-c50f6538cfc43d856b361347c945f6348c6f2dc9.tar.bz2 emacs-c50f6538cfc43d856b361347c945f6348c6f2dc9.zip |
; bytecode backtrace test clean-up
Diffstat (limited to 'test/lisp/emacs-lisp/bytecomp-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/bytecomp-tests.el | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index 9813e9459c8..16c6408c921 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -1967,17 +1967,17 @@ EXPECTED-POINT BINDINGS (MODES \\='\\='(ruby-mode js-mode python-mode)) \ ;; Test both calling the function directly, and calling ;; a byte-compiled η-expansion (lambda (ARGS...) (FUN ARGS...)) ;; which should turn the function call into a byte-op. - (dolist (byte-op '(nil t)) - (ert-info ((prin1-to-string byte-op) :prefix "byte-op: ") - (let* ((fun - (if byte-op - (let* ((nargs (length (cdr call))) - (formals (mapcar (lambda (i) - (intern (format "x%d" i))) - (number-sequence 1 nargs)))) - (byte-compile - `(lambda ,formals (,fun-sym ,@formals)))) - fun-sym)) + (dolist (mode '(funcall byte-op)) + (ert-info ((symbol-name mode) :prefix "mode: ") + (let* ((fun (pcase-exhaustive mode + ('funcall fun-sym) + ('byte-op + (let* ((nargs (length (cdr call))) + (formals (mapcar (lambda (i) + (intern (format "x%d" i))) + (number-sequence 1 nargs)))) + (byte-compile + `(lambda ,formals (,fun-sym ,@formals))))))) (error-frame (bytecomp-tests--error-frame fun actuals))) (should (consp error-frame)) (should (equal (car error-frame) (list 'error expected-error))) |