[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 175efec 3/8: Add a nativecomp testcase
From: |
Andrea Corallo |
Subject: |
feature/native-comp 175efec 3/8: Add a nativecomp testcase |
Date: |
Wed, 11 Nov 2020 19:03:06 -0500 (EST) |
branch: feature/native-comp
commit 175efec0732fc7317a444a2005f7b968a972b8e6
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
Add a nativecomp testcase
Having this while re-debugging the boostrap would have saved few hours
of debug so let's add it.
* test/src/comp-tests.el (and-3): Add test.
* test/src/comp-test-funcs.el (comp-test-and-3-var): New var.
(comp-test-and-3-f): New function.
---
test/src/comp-test-funcs.el | 6 ++++++
test/src/comp-tests.el | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/test/src/comp-test-funcs.el b/test/src/comp-test-funcs.el
index 35df46a..1b0f305 100644
--- a/test/src/comp-test-funcs.el
+++ b/test/src/comp-test-funcs.el
@@ -348,6 +348,12 @@
(defsubst comp-test-defsubst-f ()
t)
+(defvar comp-test-and-3-var 1)
+(defun comp-test-and-3-f (x)
+ (and (atom x)
+ comp-test-and-3-var
+ 2))
+
;;;;;;;;;;;;;;;;;;;;
;; Tromey's tests ;;
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index 48687d9..8bedad5 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -440,6 +440,10 @@
https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-03/msg00914.html."
'(lambda ()
(delete-region (point-min) (point-max))))))))
+(comp-deftest and-3 ()
+ (should (= (comp-test-and-3-f t) 2))
+ (should (null (comp-test-and-3-f '(1 2)))))
+
;;;;;;;;;;;;;;;;;;;;;
;; Tromey's tests. ;;
- feature/native-comp updated (e20cdf9 -> 2435c10), Andrea Corallo, 2020/11/11
- feature/native-comp e96cd4e 2/8: Add initial nativecomp typeset and range propagation support, Andrea Corallo, 2020/11/11
- feature/native-comp 00b4e0a 4/8: * Fix limple-mode for new type and range limple semantic, Andrea Corallo, 2020/11/11
- feature/native-comp c3d0e2a 1/8: * Rename two nativecomp functions, Andrea Corallo, 2020/11/11
- feature/native-comp a214882 5/8: * Add to elisp-mode `emacs-lisp-native-compile-and-load', Andrea Corallo, 2020/11/11
- feature/native-comp 6b7c257 6/8: * Unline some functions to optimize bootstrap time, Andrea Corallo, 2020/11/11
- feature/native-comp 2435c10 8/8: * Nativecomp testsuite rework for derived return type specifiers, Andrea Corallo, 2020/11/11
- feature/native-comp 175efec 3/8: Add a nativecomp testcase,
Andrea Corallo <=
- feature/native-comp 93a80a4 7/8: * Add nativecomp derived return type specifier computation support, Andrea Corallo, 2020/11/11