aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVibhav Pant2017-02-13 13:18:54 +0530
committerVibhav Pant2017-02-13 13:18:54 +0530
commitc24e8290fa4ec18c04cbedffbe741b53de280dd6 (patch)
tree1c9a1983be35498c3c6773f50fe23eaf5eceef63
parent219339e2eb332fc913f898e799d6532a7633a1d3 (diff)
downloademacs-c24e8290fa4ec18c04cbedffbe741b53de280dd6.tar.gz
emacs-c24e8290fa4ec18c04cbedffbe741b53de280dd6.zip
test/lisp/emacs-lisp/bytecomp-tests.el: Add more tests for switch.
-rw-r--r--test/lisp/emacs-lisp/bytecomp-tests.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el
index 2233b28d331..acf9343914d 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -253,7 +253,12 @@ bytecompiled code, and their results compared.")
253 (let ((a 'three)) (cond ((eq a 'one) 1) ((eq a 2) 'two) ((eq a 'three) 3) 253 (let ((a 'three)) (cond ((eq a 'one) 1) ((eq a 2) 'two) ((eq a 'three) 3)
254 (t t))) 254 (t t)))
255 (let ((a 2)) (cond ((eq a 'one) 1) ((eq a 1) 'one) ((eq a 2) 'two) 255 (let ((a 2)) (cond ((eq a 'one) 1) ((eq a 1) 'one) ((eq a 2) 'two)
256 (t nil)))) 256 (t nil)))
257 (let ((a 2.0)) (cond ((eql a 2) 'incorrect) ((eql a 2.00) 'correct)))
258 (let ((a "foobar")) (cond ((equal "notfoobar" a) 'incorrect)
259 ((equal 1 a) 'incorrect)
260 ((equal a "foobar") 'correct)
261 (t 'incorrect))))
257 "List of expressions for testing byte-switch.") 262 "List of expressions for testing byte-switch.")
258 263
259(defun bytecomp-check-1 (pat) 264(defun bytecomp-check-1 (pat)