]> git.eshelyaron.com Git - emacs.git/commitdiff
Some clean-up in comp-tests.el
authorAndrea Corallo <acorallo@gnu.org>
Wed, 10 Jul 2024 21:48:19 +0000 (23:48 +0200)
committerEshel Yaron <me@eshelyaron.com>
Thu, 11 Jul 2024 14:39:58 +0000 (16:39 +0200)
* test/src/comp-tests.el (comp-tests-cond-rw-checked-function)
(comp-tests-cond-rw-checker-val)
(comp-tests-cond-rw-expected-type)
(comp-tests-cond-rw-checker-type): Remove.

(cherry picked from commit ffaf1cb235c8b399cd9fb704f9b5879db2f5d6a6)

test/src/comp-tests.el

index 33b127d5d2685ec5beb7ccf64993a49b958307ae..bab5a358290d63a418fca5cc295a78dde5c61946 100644 (file)
@@ -1567,36 +1567,6 @@ folded."
     (should (native-comp-function-p (symbol-function 'comp-tests-pure-fibn-entry-f)))
     (should (= (comp-tests-pure-fibn-entry-f) 6765))))
 
-(defvar comp-tests-cond-rw-checked-function nil
-  "Function to be checked.")
-(defun comp-tests-cond-rw-checker-val (_)
-  "Check we manage to propagate the correct return value."
-  (should
-   (cl-some
-    #'identity
-    (comp-tests-map-checker
-     comp-tests-cond-rw-checked-function
-     (lambda (insn)
-       (pcase insn
-         (`(return ,mvar)
-          (and (comp-cstr-imm-vld-p mvar)
-               (eql (comp-cstr-imm mvar) 123)))))))))
-
-(defvar comp-tests-cond-rw-expected-type nil
-  "Type to expect in `comp-tests-cond-rw-checker-type'.")
-(defun comp-tests-cond-rw-checker-type (_)
-  "Check we manage to propagate the correct return type."
-  (should
-   (cl-some
-    #'identity
-    (comp-tests-map-checker
-     comp-tests-cond-rw-checked-function
-     (lambda (insn)
-       (pcase insn
-         (`(return ,mvar)
-          (equal (comp-mvar-typeset mvar)
-                 comp-tests-cond-rw-expected-type))))))))
-
 (comp-deftest comp-tests-result-lambda ()
   (native-compile 'comp-tests-result-lambda)
   (should (eq (funcall (comp-tests-result-lambda) '(a . b)) 'a)))