summaryrefslogtreecommitdiffstats
path: root/tests/012/const.tl
blob: e0235e3008d0d65d998d6dd07ff8e36d9e379f9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(load "../common")

(mtest
  (constantp nil) t
  (constantp t) t
  (constantp :key) t
  (constantp 'a) nil)

(mtest
  (constantp ''a) t
  (constantp '(+)) t
  (constantp '(+ 2)) t
  (constantp '(+ 2 2)) t)

(mtest
  (constantp '(+ a)) nil
  (constantp '(+ (* 2 2) (* 3 3))) t
  (constantp '(+ (* 2 2) (* 3 a))) nil)

(mtest
  (constantp '(list 1 2 3)) nil
  (constantp '(symacrolet ((a 1)) (+ a))) t
  (constantp '(let ((a 1)) (+ a))) nil)