mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 02:51:31 -08:00
fix varset and add a test
This commit is contained in:
parent
59a428ed6c
commit
fca675dae3
3 changed files with 10 additions and 4 deletions
|
|
@ -647,7 +647,7 @@ the annotation emission."
|
|||
(byte-varset
|
||||
(comp-emit (comp-call 'set_internal
|
||||
(make-comp-mvar :constant arg)
|
||||
(comp-slot))))
|
||||
(comp-slot-next))))
|
||||
(byte-varbind ;; Verify
|
||||
(comp-emit (comp-call 'specbind
|
||||
(make-comp-mvar :constant arg)
|
||||
|
|
|
|||
|
|
@ -50,8 +50,11 @@
|
|||
(defun comp-tests-cons-cdr-f (x)
|
||||
(cdr (cons 'foo x)))
|
||||
|
||||
(defun comp-tests-varset-f ()
|
||||
(defun comp-tests-varset0-f ()
|
||||
(setq comp-tests-var1 55))
|
||||
(defun comp-tests-varset1-f ()
|
||||
(setq comp-tests-var1 66)
|
||||
4)
|
||||
|
||||
(defun comp-tests-length-f ()
|
||||
(length '(1 2 3)))
|
||||
|
|
|
|||
|
|
@ -71,8 +71,11 @@
|
|||
|
||||
(ert-deftest comp-tests-varset ()
|
||||
"Testing varset."
|
||||
(comp-tests-varset-f)
|
||||
(should (= comp-tests-var1 55)))
|
||||
(comp-tests-varset0-f)
|
||||
(should (= comp-tests-var1 55))
|
||||
|
||||
(should (= (comp-tests-varset1-f) 4))
|
||||
(should (= comp-tests-var1 66)))
|
||||
|
||||
(ert-deftest comp-tests-length ()
|
||||
"Testing length."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue