aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorAndrea Corallo2024-07-10 23:48:19 +0200
committerAndrea Corallo2024-07-11 16:26:49 +0200
commitffaf1cb235c8b399cd9fb704f9b5879db2f5d6a6 (patch)
treee0beea8ba9e318327406e55a5a141631b0154c5e /test/src
parentbaf74968f9704b6354fff7a254172f72f0ebb747 (diff)
downloademacs-ffaf1cb235c8b399cd9fb704f9b5879db2f5d6a6.tar.gz
emacs-ffaf1cb235c8b399cd9fb704f9b5879db2f5d6a6.zip
Some clean-up in comp-tests.el
* 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.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/comp-tests.el30
1 files changed, 0 insertions, 30 deletions
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index 33b127d5d26..bab5a358290 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -1567,36 +1567,6 @@ folded."
1567 (should (native-comp-function-p (symbol-function 'comp-tests-pure-fibn-entry-f))) 1567 (should (native-comp-function-p (symbol-function 'comp-tests-pure-fibn-entry-f)))
1568 (should (= (comp-tests-pure-fibn-entry-f) 6765)))) 1568 (should (= (comp-tests-pure-fibn-entry-f) 6765))))
1569 1569
1570(defvar comp-tests-cond-rw-checked-function nil
1571 "Function to be checked.")
1572(defun comp-tests-cond-rw-checker-val (_)
1573 "Check we manage to propagate the correct return value."
1574 (should
1575 (cl-some
1576 #'identity
1577 (comp-tests-map-checker
1578 comp-tests-cond-rw-checked-function
1579 (lambda (insn)
1580 (pcase insn
1581 (`(return ,mvar)
1582 (and (comp-cstr-imm-vld-p mvar)
1583 (eql (comp-cstr-imm mvar) 123)))))))))
1584
1585(defvar comp-tests-cond-rw-expected-type nil
1586 "Type to expect in `comp-tests-cond-rw-checker-type'.")
1587(defun comp-tests-cond-rw-checker-type (_)
1588 "Check we manage to propagate the correct return type."
1589 (should
1590 (cl-some
1591 #'identity
1592 (comp-tests-map-checker
1593 comp-tests-cond-rw-checked-function
1594 (lambda (insn)
1595 (pcase insn
1596 (`(return ,mvar)
1597 (equal (comp-mvar-typeset mvar)
1598 comp-tests-cond-rw-expected-type))))))))
1599
1600(comp-deftest comp-tests-result-lambda () 1570(comp-deftest comp-tests-result-lambda ()
1601 (native-compile 'comp-tests-result-lambda) 1571 (native-compile 'comp-tests-result-lambda)
1602 (should (eq (funcall (comp-tests-result-lambda) '(a . b)) 'a))) 1572 (should (eq (funcall (comp-tests-result-lambda) '(a . b)) 'a)))