summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-04-23 20:07:45 -0700
committerKaz Kylheku <kaz@kylheku.com>2025-04-23 20:07:45 -0700
commit46268ca86d9666069056db627a2e5c85045ae570 (patch)
treeb64d53181dfeee9aed0947844b05a84356b26b08
parenta6f48a6a2ea89b78be79650c9c74f6b77e7df3d1 (diff)
downloadtxr-46268ca86d9666069056db627a2e5c85045ae570.tar.gz
txr-46268ca86d9666069056db627a2e5c85045ae570.tar.bz2
txr-46268ca86d9666069056db627a2e5c85045ae570.zip
infix: test cases for prefix phony.
* test/012/infix.tl: New tests. (*compiling*) New variable. (unless-compiling): New macro. One :error test elicits a warning during the compiled version of the test that is hard to squelch, so we just remove it from the compiled test case. (fft): Remove unused variable i; all for loops locally bind i.
-rw-r--r--tests/012/infix.tl21
1 files changed, 19 insertions, 2 deletions
diff --git a/tests/012/infix.tl b/tests/012/infix.tl
index 10b98930..b93ca3bb 100644
--- a/tests/012/infix.tl
+++ b/tests/012/infix.tl
@@ -76,6 +76,14 @@
(quadratic-roots 1 0 -4) (2.0 -2.0)
(quadratic-roots 1 2 1) (-1.0 -1.0))
+(defvar *compiling* t)
+
+(compile-only
+ (set *compiling* nil))
+
+(defmacro unless-compiling (form)
+ (unless *compiling* form))
+
(ifx
(mtest
(1 cons 2) (1 . 2)
@@ -84,11 +92,20 @@
(1 cons 2 * 2 + 3 * 3) (1 . 13)
(1 cons 2 * 2 + 3 * 3 cons 29) :error
(1 cons (2 * 2 + 3 * 3) cons 29) (1 13 . 29)
- (1 cons 2 list* (2 + 2) (3 + 3) nil) (1 2 4 6)))
+ (1 cons 2 list* (2 + 2) (3 + 3) nil) (1 2 4 6))
+
+ (mtest
+ (list 1 2) (1 2)
+ (list 2 + 2) (4)
+ (list list 2 + 2) ((4)))
+
+ (unless-compiling
+ (test
+ (list list 2 2) :error)))
(defun fft (data nn isign)
(ifx
- (let (n mmax m j istep i
+ (let (n mmax m j istep
wtemp wpr wpi wr wi theta
tempr tempi (data (copy data)))
(n := nn << 1)