1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-15 09:47:20 +00:00

Add a nativecomp testcase

Having this while re-debugging the boostrap would have saved few hours
of debug so let's add it.

	* test/src/comp-tests.el (and-3): Add test.
	* test/src/comp-test-funcs.el (comp-test-and-3-var): New var.
	(comp-test-and-3-f): New function.
This commit is contained in:
Andrea Corallo 2020-11-11 16:17:03 +01:00
parent e96cd4e82c
commit 175efec073
2 changed files with 10 additions and 0 deletions

View File

@ -348,6 +348,12 @@
(defsubst comp-test-defsubst-f ()
t)
(defvar comp-test-and-3-var 1)
(defun comp-test-and-3-f (x)
(and (atom x)
comp-test-and-3-var
2))
;;;;;;;;;;;;;;;;;;;;
;; Tromey's tests ;;

View File

@ -440,6 +440,10 @@ https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-03/msg00914.html."
'(lambda ()
(delete-region (point-min) (point-max))))))))
(comp-deftest and-3 ()
(should (= (comp-test-and-3-f t) 2))
(should (null (comp-test-and-3-f '(1 2)))))
;;;;;;;;;;;;;;;;;;;;;
;; Tromey's tests. ;;