aboutsummaryrefslogtreecommitdiff
path: root/src/clojure/contrib/test_contrib/macro_utils.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/clojure/contrib/test_contrib/macro_utils.clj')
-rw-r--r--src/clojure/contrib/test_contrib/macro_utils.clj18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/clojure/contrib/test_contrib/macro_utils.clj b/src/clojure/contrib/test_contrib/macro_utils.clj
index 25a0fcaf..47d947a5 100644
--- a/src/clojure/contrib/test_contrib/macro_utils.clj
+++ b/src/clojure/contrib/test_contrib/macro_utils.clj
@@ -1,7 +1,7 @@
;; Test routines for macro_utils.clj
;; by Konrad Hinsen
-;; last updated May 4, 2009
+;; last updated May 6, 2009
;; Copyright (c) Konrad Hinsen, 2008. All rights reserved. The use
;; and distribution terms for this software are covered by the Eclipse
@@ -45,15 +45,13 @@
'(symbol-macrolet [x foo z bar]
(fn f ([x y] [x y z]) ([x y z] [x y z]))))
'(do (fn* f ([x y] [x y bar]) ([x y z] [x y z])))))
- (is (= (macroexpand-1
- '(symbol-macrolet [x xx y yy z zz]
- (domonad m [a x b y x z] [a b x z])))
- '(do (let* [m-bind (:m-bind m) m-result (:m-result m)
- m-zero (:m-zero m) m-plus (:m-plus m)]
- (do (m-bind xx (fn* ([a]
- (m-bind yy (fn* ([b]
- (m-bind zz (fn* ([x]
- (m-result [a b x zz]))))))))))))))))
+ (is (= (nth (second (macroexpand-1
+ '(symbol-macrolet [x xx y yy z zz]
+ (domonad m [a x b y x z] [a b x z])))) 2)
+ '(do (m-bind xx (fn* ([a]
+ (m-bind yy (fn* ([b]
+ (m-bind zz (fn* ([x]
+ (m-result [a b x zz]))))))))))))))
(deftest symbol-test
(defsymbolmacro sum-2-3 (plus 2 3))