From: Andrea Corallo Date: Sun, 17 Nov 2019 07:16:53 +0000 (+0100) Subject: add comp-tests-jump-table-2-f X-Git-Tag: emacs-28.0.90~2727^2~975 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=41bfb91f5db878d139d5c0c631c569475018a7c2;p=emacs.git add comp-tests-jump-table-2-f --- diff --git a/test/src/comp-test-funcs.el b/test/src/comp-test-funcs.el index 3ba12dc2a6a..ca604b748f3 100644 --- a/test/src/comp-test-funcs.el +++ b/test/src/comp-test-funcs.el @@ -111,6 +111,11 @@ ('y 'b) (_ 'c))) +(defun comp-tests-jump-table-2-f (x) + (pcase x + ("aaa" 'a) + ("bbb" 'b))) + (defun comp-tests-conditionals-1-f (x) ;; Generate goto-if-nil (if x 1 2)) diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index a76a4a8c469..0a1d45724fa 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -168,7 +168,11 @@ Check that the resulting binaries do not differ." "Testing jump tables" (should (eq (comp-tests-jump-table-1-f 'x) 'a)) (should (eq (comp-tests-jump-table-1-f 'y) 'b)) - (should (eq (comp-tests-jump-table-1-f 'xxx) 'c))) + (should (eq (comp-tests-jump-table-1-f 'xxx) 'c)) + + ;; Jump table not with eq as test + (should (eq (comp-tests-jump-table-2-f "aaa") 'a)) + (should (eq (comp-tests-jump-table-2-f "bbb") 'b))) (ert-deftest comp-tests-conditionals () "Testing conditionals."