X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fautomated%2Fbyte-compiler-tests.el;h=e4b2520a1a95bcbc3603144b75fab5b9ef94a9fb;hb=82e4ab1667237b94f95aa61634162a89442d132e;hp=21c110f8eac20667abf48a6afc3bc0a7320e6235;hpb=46f51e794ddb493a8a76ec2f3be00b41e3b0be22;p=chise%2Fxemacs-chise.git.1 diff --git a/tests/automated/byte-compiler-tests.el b/tests/automated/byte-compiler-tests.el index 21c110f..e4b2520 100644 --- a/tests/automated/byte-compiler-tests.el +++ b/tests/automated/byte-compiler-tests.el @@ -118,3 +118,104 @@ (before-and-after-compile-equal (- 3)) (before-and-after-compile-equal (- simplyamarker 1)) (before-and-after-compile-equal (- simplyamarker)) + +(before-and-after-compile-equal (let ((z 1)) (or (setq z 42)) z)) + +;; byte-after-unbind-ops + +;; byte-constant +;; byte-dup + +;; byte-symbolp +(before-and-after-compile-equal + (let ((x 's)) + (unwind-protect + (symbolp x) + (setq x 1)))) + +;; byte-consp +(before-and-after-compile-equal + (let ((x '(a b))) + (unwind-protect + (consp x) + (setq x 1)))) + +;; byte-stringp +(before-and-after-compile-equal + (let ((x "a")) + (unwind-protect + (stringp x) + (setq x 1)))) + +;; byte-listp +(before-and-after-compile-equal + (let ((x '(a b c))) + (unwind-protect + (listp x) + (setq x 1)))) + +;; byte-numberp +(before-and-after-compile-equal + (let ((x 1)) + (unwind-protect + (numberp x) + (setq x nil)))) + +;; byte-integerp +(before-and-after-compile-equal + (let ((x 1)) + (unwind-protect + (integerp x) + (setq x nil)))) + +;; byte-equal +(before-and-after-compile-equal + (let ((x 'a) + (y 'a)) + (unwind-protect + (eq x y) + (setq x 'c)))) + +;; byte-not +(before-and-after-compile-equal + (let (x) + (unwind-protect + (not x) + (setq x t)))) + +;; byte-cons +(before-and-after-compile-equal + (equal '(1 . 2) + (let ((x 1) + (y 2)) + (unwind-protect + (cons x y) + (setq x t))))) + +;; byte-list1 +(before-and-after-compile-equal + (equal '(1) + (let ((x 1)) + (unwind-protect + (list x) + (setq x t))))) + +;; byte-list2 +(before-and-after-compile-equal + (equal '(1 . 2) + (let ((x 1) + (y 2)) + (unwind-protect + (list x y) + (setq x t))))) + +;; byte-interactive-p + +;; byte-equal +(before-and-after-compile-equal + (let (x y) + (setq x '(1 . 2)) + (setq y '(1 . 2)) + (unwind-protect + (equal x y) + (setq y '(1 . 3)))))