Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:halgari/clojure-py

Conflicts:
	tests/core-tests.clj
  • Loading branch information...
commit 72ccb26b4c5860feac1362146ccc9ed8b240e7ac 2 parents a75be5b + 16524d6
@bluepeppers bluepeppers authored
View
2  MANIFEST.in
@@ -1 +1,3 @@
include clojure/core.clj
+include clojure/core-deftype.clj
+include clojure/core-multimethod.clj
View
7 NEWS.md
@@ -5,11 +5,14 @@ Here you will find updates on each version of clojure-py.
-0.2.0 Updates (version next)
+0.2.0 (4/12/2012)
----------------------------
* implemented deftype with protocol support
* implemented defprotocol and extend
* implemented reify
* implemented defrecord (still missing equality tests)
-* binding is supported
+* binding is supported
+* implemented defmulti and defmethod
+* support for derive, supers, bases, etc.
+* numerous other functions
View
144 clojure/core-multimethod.clj
@@ -1,3 +1,4 @@
+(ns clojure.core-multimethod)
(definterface IInitable
(_init [self]))
@@ -17,4 +18,147 @@
(getMethodTable [self])
(getPreferTable [self]))
+(deftype MultiFn [methodName
+ dispatchFn
+ defaultDispatchVal
+ hierarchy
+ methodTable
+ preferTable
+ methodCache
+ cachedHierarchy]
+ IMultiFn
+ (reset [self]
+ (doseq [m ["methodTable"
+ "methodCache"
+ "preferTable"]]
+ (py/setattr self m {}))
+ (py/setattr self "cachedHierarchy" nil))
+
+ (addMethod [self dispatchVal method]
+ (py/setattr self
+ "methodTable"
+ (assoc (.getMethodTable self)
+ dispatchVal
+ method))
+ (.resetCache self))
+
+ (removeMethod [self dispatchVal]
+ (py/setattr self
+ "methodTable"
+ (dissoc (.getMethodTable self)
+ dispatchVal))
+ (.resetCache self))
+
+ (preferMethod [self x y]
+ (if (.prefers self x y)
+ (throw (py/Exception (str "Preference conflict in multimethod "
+ methodName
+ " "
+ x
+ " is already prefered to "
+ y))))
+ (py/setattr self
+ "preferTable"
+ (assoc (.getPreferTable self)
+ x
+ (conj (get (.getPreferTable self) x #{}) y)))
+ (.resetCache self))
+
+ (prefers [self x y]
+ (let [xprefs (get (.getPreferTable self) x)]
+ (cond (and (not (nil? xprefs))
+ (contains? xprefs y))
+ true
+ (some #(.prefers self x (first %)) (parents y))
+ true
+ (some #(.prefers self (first %) y) (parents x))
+ true
+ :default
+ false)))
+
+ (isA [self x y]
+ (isa? @hierarchy x y))
+
+ (dominates [self x y]
+ (or (.prefers self x y)
+ (.isA self x y)))
+
+ (resetCache [self]
+ (py/setattr self "methodCache" (.getMethodTable self))
+ (py/setattr self "cachedHierarchy" @hierarchy)
+ methodCache)
+
+ (getMethod [self dispatchVal]
+ (if (not (= cachedHierarchy @hierarchy))
+ (.resetCache self))
+ (let [targetFn (get methodCache dispatchVal)]
+ (if (not (nil? targetFn))
+ targetFn
+ (let [targetFn (.findAndCacheBestMethod self dispatchVal)]
+ (if (not (nil? targetFn))
+ targetFn
+ (get (.getMethodTable self)
+ defaultDispatchVal))))))
+
+ (getFn [self dispatchVal]
+ (let [targetFn (.getMethod self dispatchVal)]
+ (if (nil? targetFn)
+ (throw (py/Exception (str "No method in multimethod "
+ methodName
+ " for dispatch value "
+ dispatchVal)))
+ targetFn)))
+
+ (findAndCacheBestMethod [self dispatchVal]
+ (let [be (reduce (fn [bestEntry e]
+ (if (.isA self dispatchVal (first e))
+ (if (or (nil? bestEntry)
+ (.dominates self (first e)
+ (first bestEntry)))
+ e
+ (if (not (.dominates self (first bestEntry)
+ (first e)))
+ (throw (py/Exception (str "Multimple methods in multimethod "
+ methodName
+ " match dispatch value "
+ dispatchVal
+ " -> "
+ (first bestEntry)
+ " and "
+ (first e)
+ ", and neither is prefered")))
+ bestEntry))
+ bestEntry))
+ nil
+ (.getMethodTable self))]
+ (cond (nil? be)
+ nil
+ (is? cachedHierarchy @hierarchy)
+ (do (py/setattr self
+ "methodCache"
+ (assoc methodCache
+ dispatchVal
+ (second be)))
+ (second be))
+ :default
+ (do (.resetCache self)
+ (.findAndCacheBestMethod self dispatchVal)))))
+
+ (getMethodTable [self]
+ (.-methodTable self))
+
+ (getPreferTable [self]
+ (.-preferTable self))
+
+ (__call__ [self & args]
+ (apply (.getFn self (apply dispatchFn args))
+ args)))
+
+
+(defn make-multi [name dispatchFn defaultDispatchVal hierarchy]
+ (MultiFn name dispatchFn defaultDispatchVal hierarchy
+ {} {} {} nil))
+
+
+
View
111 clojure/core.clj
@@ -1027,7 +1027,9 @@
"Returns the number of items in the collection. (count nil) returns
0. Also works on strings, arrays, and Java Collections and Maps"
{:added "1.0"}
- [coll] (py/len coll))
+ [coll] (if (nil? coll)
+ 0
+ (py/len coll)))
(defn int
@@ -2342,6 +2344,11 @@
(clojure.lang.persistenthashset/create s)
#{}))
+(defn hash-set
+ "Creates a hash set for the arguments"
+ [& args]
+ (set args))
+
(defn find-ns
"Returns the namespace named by the symbol or nil if it doesn't exist."
{:added "1.0"}
@@ -3311,3 +3318,105 @@
:descendants (tf (:descendants h) parent ta tag td)})
h))))
+(require 'clojure.core-multimethod :only '[make-multi])
+
+(defn ^:private check-valid-options
+ "Throws an exception if the given option map contains keys not listed
+ as valid, else returns nil."
+ [options & valid-keys]
+ (when (seq (apply disj (apply hash-set (keys options)) valid-keys))
+ (throw
+ (py/Exception.
+ (apply str "Only these options are valid: "
+ (first valid-keys)
+ (map #(str ", " %) (rest valid-keys)))))))
+
+(defmacro defmulti
+ "Creates a new multimethod with the associated dispatch function.
+ The docstring and attribute-map are optional.
+
+ Options are key-value pairs and may be one of:
+ :default the default dispatch value, defaults to :default
+ :hierarchy the isa? hierarchy to use for dispatching
+ defaults to the global hierarchy"
+ {:arglists '([name docstring? attr-map? dispatch-fn & options])
+ :added "1.0"}
+ [mm-name & options]
+ (let [docstring (if (string? (first options))
+ (first options)
+ nil)
+ options (if (string? (first options))
+ (next options)
+ options)
+ m (if (map? (first options))
+ (first options)
+ {})
+ options (if (map? (first options))
+ (next options)
+ options)
+ dispatch-fn (first options)
+ options (next options)
+ m (if docstring
+ (assoc m :doc docstring)
+ m)
+ m (if (meta mm-name)
+ (conj (meta mm-name) m)
+ m)]
+ (when (= (count options) 1)
+ (throw (py/Exception. "The syntax for defmulti has changed. Example: (defmulti name dispatch-fn :default dispatch-value)")))
+ (let [options (apply hash-map options)
+ default (get options :default :default)
+ hierarchy (get options :hierarchy #'global-hierarchy)]
+ (check-valid-options options :default :hierarchy)
+ `(let [v# (def ~mm-name)]
+ (when-not (and (.hasRoot v#) (instance? clojure.core-multimethod/MultiFn (deref v#)))
+ (def ~(with-meta mm-name m)
+ (make-multi ~(name mm-name) ~dispatch-fn ~default ~hierarchy)))))))
+
+(defmacro defmethod
+ "Creates and installs a new method of multimethod associated with dispatch-value. "
+ {:added "1.0"}
+ [multifn dispatch-val & fn-tail]
+ `(.addMethod ~(with-meta multifn {:tag 'clojure.lang.MultiFn}) ~dispatch-val (fn ~@fn-tail)))
+
+(defn remove-all-methods
+ "Removes all of the methods of multimethod."
+ {:added "1.2"
+ :static true}
+ [multifn]
+ (.reset multifn))
+
+(defn remove-method
+ "Removes the method of multimethod associated with dispatch-value."
+ {:added "1.0"
+ :static true}
+ [multifn dispatch-val]
+ (.removeMethod multifn dispatch-val))
+
+(defn prefer-method
+ "Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y
+ when there is a conflict"
+ {:added "1.0"
+ :static true}
+ [multifn dispatch-val-x dispatch-val-y]
+ (.preferMethod multifn dispatch-val-x dispatch-val-y))
+
+(defn methods
+ "Given a multimethod, returns a map of dispatch values -> dispatch fns"
+ {:added "1.0"
+ :static true}
+ [multifn] (.getMethodTable multifn))
+
+(defn get-method
+ "Given a multimethod and a dispatch value, returns the dispatch fn
+ that would apply to that value, or nil if none apply and no default"
+ {:added "1.0"
+ :static true}
+ [multifn dispatch-val] (.getMethod multifn dispatch-val))
+
+(defn prefers
+ "Given a multimethod, returns a map of preferred value -> set of other values"
+ {:added "1.0"
+ :static true}
+ [multifn] (.getPreferTable multifn))
+
View
11 clojure/lang/compiler.py
@@ -157,6 +157,8 @@ def compileDef(comp, form):
pass
code.extend(compiledValue)
code.append((CALL_FUNCTION, 1))
+ else:
+ code.append((LOAD_CONST, v))
v.setMeta(sym.meta())
comp.popName()
return code
@@ -1386,7 +1388,7 @@ def compile(self, itm):
c.extend(self.compileForm(itm))
elif itm is None:
c.extend(self.compileNone(itm))
- elif type(itm) in [str, int, types.ClassType, type]:
+ elif type(itm) in [str, int, types.ClassType, type, Var]:
c.extend([(LOAD_CONST, itm)])
elif isinstance(itm, IPersistentVector):
c.extend(compileVector(self, itm))
@@ -1437,7 +1439,12 @@ def executeCode(self, code):
newcode = expandMetas(code, self)
newcode.append((RETURN_VALUE, None))
c = Code(newcode, [], [], False, False, False, str(symbol(self.getNS().__name__, "<string>")), self.filename, 0, None)
- c = c.to_code()
+ try:
+ c = c.to_code()
+ except:
+ for x in newcode:
+ print x
+ raise
# work on .cljs
#from clojure.util.freeze import write, read
View
3  clojure/lang/lispreader.py
@@ -28,6 +28,7 @@
_FN_ = symbol("fn")
_VAR_ = symbol("var")
_APPLY_ = symbol("apply")
+_DEREF_ = symbol("deref")
_HASHMAP_ = symbol("clojure.core", "hashmap")
_CONCAT_ = symbol("clojure.core", "concat")
_LIST_ = symbol("clojure.core", "list")
@@ -1065,7 +1066,7 @@ def evalReaderNotImplemented(rdr, _):
"`": SyntaxQuoteReader(),
"~": unquoteReader,
"\\": characterReader,
- "@": derefNotImplemented, # temporary?
+ "@": wrappingReader(_DEREF_)
}
dispatchMacros = {"\"": regexReader,
View
3  clojure/main.py
@@ -35,7 +35,8 @@ def load_module(self, name):
from clojure.lang.var import pushThreadBindings, popThreadBindings
import cPickle
-VERSION = "0.1.0h"
+VERSION = "0.2.4"
+
View
2  setup.py
@@ -15,7 +15,7 @@
author='Timothy Baldridge',
author_email='tbaldridge@gmail.com',
packages=['clojure', 'clojure/lang', 'clojure/util'],
- package_data={'clojure': ['core.clj']},
+ package_data={'clojure': ['core.clj', 'core-deftype.clj', 'core-multimethod.clj']},
scripts=[],
url='https://github.com/halgari/clojure-py',
license='',
View
5 tests/assertions.clj
@@ -27,3 +27,8 @@
(if (py.bytecode/COMPARE_OP "==" x y)
true
(fail x " does not equal " y)))
+
+(defn assert-not-equal [x y]
+ (if (py.bytecode/COMPARE_OP "!=" x y)
+ true
+ (fail x " equals " y)))
View
140 tests/core-tests.clj
@@ -34,7 +34,10 @@
(py.bytecode/BINARY_ADD 10 10)
(catch py/Exception e e)
(finally 1))))
- )
+
+ (a/assert-equal 20
+ (try (py.bytecode/BINARY_ADD 10 10)
+ (finally (py/print "finally")))))
(deftest if-not-tests
(a/assert-true (if-not false true))
@@ -170,11 +173,11 @@
(a/assert-equal (quot 3 2) 1)
(a/assert-equal (quot 6 4) 1)
(a/assert-equal (quot 0 5) 0)
-
+
;(a/assert-equal (quot 2 1/2) 4)
;(a/assert-equal (quot 2/3 1/2) 1)
;(a/assert-equal (quot 1 2/3) 1)
-
+
(a/assert-equal (quot 4.0 2.0) 2.0)
(a/assert-equal (quot 4.5 2.0) 2.0)
; |num| > |div|, num != k * div
@@ -197,7 +200,7 @@
(a/assert-equal (quot 0 3) 0)
(a/assert-equal (quot 0 -3) 0)
)
-
+
(deftest rem-tests
(a/assert-equal (rem 23 7) 2)
@@ -357,30 +360,27 @@
(a/assert-equal (disj #{:a :b :c} :a) #{:b :c}))
(deftest set-tests
- (a/assert-true (= #{} (set [])))
- (a/assert-true (= #{"foo"} (set ["foo"])))
- (a/assert-true (= #{1 2 3} #{1 3 2}))
-; FIXME vector/map find (a/assert-true (= #{#{1 2 3} [4 5 6] {7 8} 9 10} #{10 9 [4 5 6] {7 8} #{1 2 3}}))
- (a/assert-true (= #{#{1 2 3} 9 10} #{10 9 #{1 2 3}}))
- ;(a/assert-true (not (= #{nil [] {} 0 #{}} #{})))
- ;(a/assert-true (= (count #{nil [] {} 0 #{}}) 5))
- (a/assert-true (= (conj #{1} 1) #{1}))
- (a/assert-true (= (conj #{1} 2) #{2 1}))
- (a/assert-true (= (reduce + #{1 2 3 4 5}) 15))
- (a/assert-true (= 4 (get #{1 2 3 4} 4)))
+ (a/assert-equal #{} (set []))
+ (a/assert-equal #{"foo"} (set ["foo"]))
+ (a/assert-equal #{1 2 3} #{1 3 2})
+ ; FIXME vector/map find (a/assert-equal #{#{1 2 3} [4 5 6] {7 8} 9 10} #{10 9 [4 5 6] {7 8} #{1 2 3}})
+ (a/assert-equal #{#{1 2 3} 9 10} #{10 9 #{1 2 3}})
+ ;(a/assert-not-equal #{nil [] {} 0 #{}} #{})
+ ;(a/assert-equal (count #{nil [] {} 0 #{}}) 5)
+ (a/assert-equal (conj #{1} 1) #{1})
+ (a/assert-equal (conj #{1} 2) #{2 1})
+ (a/assert-equal (reduce + #{1 2 3 4 5}) 15)
+ (a/assert-equal 4 (get #{1 2 3 4} 4))
(a/assert-true (contains? #{1 2 3 4} 4))
;(a/assert-true (contains? #{[] nil 0 {} #{}} {}))
(a/assert-true (contains? #{[1 2 3]} [1 2 3]))
- ;; FIXME
- ;; (a/assert-false (= [] {}))
+ ; FIXME (a/assert-false (= [] {}))
(a/assert-false (= () #{}))
- (a/assert-true (= () []))
- (a/assert-true (= [] ()))
- (a/assert-true (= #{1 2 3} #{1 2 3}))
- (a/assert-true (= #{#{1 2 3}} #{#{1 2 3}}))
- (a/assert-true (= #{[4 5 6]} #{[4 5 6]}))
-
-)
+ (a/assert-equal () [])
+ (a/assert-equal [] ())
+ (a/assert-equal #{1 2 3} #{1 2 3})
+ (a/assert-equal #{#{1 2 3}} #{#{1 2 3}})
+ (a/assert-equal #{[4 5 6]} #{[4 5 6]}))
(deftest find-tests
(a/assert-equal (.getKey (find {:a 1} :a)) :a)
@@ -427,8 +427,8 @@
;;; http://blog.jayfields.com/2011/03/clojure-if-let-and-when-let.html
(deftest if-let-tests
- (a/assert-equal (if-let [a 4] (+ a 4) (+ 10 10)) 8)
- (a/assert-equal (if-let [a nil] (+ a 4) (+ 10 10)) 20))
+ (a/assert-equal (if-let [a 4] (+ a 4) (+ 10 10)) 8)
+ (a/assert-equal (if-let [a nil] (+ a 4) (+ 10 10)) 20))
(deftest when-let-tests
@@ -475,7 +475,7 @@
(deftest mapcat-tests
(a/assert-equal (mapcat reverse [[3 2 1 0] [6 5 4] [9 8 7]]) [0 1 2 3 4 5 6 7 8 9]))
-
+
(deftest filter-tests
(a/assert-equal (filter even? [1 2 3 4 5]) [2 4]))
@@ -522,7 +522,7 @@
(a/assert-equal (merge {:a 1 :b 2} {:a 3 :c 4}) {:a 3 :b 2 :c 4}))
(deftest merge-with-tests
- (a/assert-equal (merge-with +
+ (a/assert-equal (merge-with +
{:a 1 :b 2}
{:a 9 :b 98 :c 0})
{:c 0, :a 10, :b 100}))
@@ -559,7 +559,7 @@
(a/assert-equal (nth [1 2 3] 1) 2))
(deftest partition-tests
- (a/assert-equal (partition 4 (range 20))
+ (a/assert-equal (partition 4 (range 20))
'((0 1 2 3) (4 5 6 7) (8 9 10 11) (12 13 14 15) (16 17 18 19)))
(a/assert-equal (partition 4 6 ["a" "b" "c" "d"] (range 20))
'((0 1 2 3) (6 7 8 9) (12 13 14 15) (18 19 "a" "b"))))
@@ -571,7 +571,7 @@
(doseq [x [1 2 3]
y [1 2 3]]
(py/print (* x y))))
-;; prints
+;; prints
;;[1 2 3 2 4 6 3 6 9]
(deftest do-times
@@ -603,7 +603,7 @@
(deftest memfn-tests
(a/assert-equal (let [f (memfn join ch)]
- (f "," ["1" "2"]))
+ (f "," ["1" "2"]))
"1,2"))
(deftest find-ns-tests
@@ -649,7 +649,7 @@
(deftest map-entry-tests
(a/assert-equal (-> {:1 :2} first first) :1)
(a/assert-equal (-> {:1 :2} first second) :2))
-
+
(deftest reduce-tests
(a/assert-equal (reduce + '(1 2 3 4)) 10)
@@ -702,30 +702,28 @@
(a/assert-false (if false true false))
(a/assert-false (if nil true false)))
-
(deftest defrecord-tests
(defrecord FooRecord [x y] IDeref (deref [self] 42))
(let [foo (FooRecord 1 2)]
(a/assert-equal (:x foo) 1)
(a/assert-equal (:y foo) 2)
- (a/assert-equal (get foo "x") 1)
+ (a/assert-equal (get foo "x") 1)
(a/assert-equal (get foo 'x) 1)
- (a/assert-equal (vec (keys foo)) ["x" "y"])
+ (a/assert-equal (vec (keys foo)) ["x" "y"])
(a/assert-equal (count foo) 2)
(a/assert-equal (:x (.without foo "x")) nil)
(a/assert-equal (deref foo) 42)
- (a/assert-true (= (FooRecord 1 2) foo))
- (a/assert-false (= (FooRecord 2 2) foo))
- (a/assert-true (= (py/hash (FooRecord 1 2))
- (py/hash foo)))
- (a/assert-false (= (py/hash (FooRecord 2 2))
- (py/hash foo)))))
-
+ (a/assert-equal (FooRecord 1 2) foo)
+ (a/assert-not-equal (FooRecord 2 2) foo)
+ (a/assert-equal (py/hash (FooRecord 1 2))
+ (py/hash foo))
+ (a/assert-not-equal (py/hash (FooRecord 2 2))
+ (py/hash foo))))
(deftest extend-tests
(extend py/int ISeq {:seq (fn [self] 42)})
(a/assert-equal (seq 1) 42))
-
+
(deftest binding-tests
(def x 0)
(def y 0)
@@ -746,11 +744,11 @@
(deftype MutatableCloser [state]
IClosable
- (__enter__ [self]
+ (__enter__ [self]
(py/setattr self "state" :enter))
(__exit__ [self]
(py/setattr self "state" :exit)))
-
+
(deftest with-open-tests
(let [mc (MutatableCloser :unknown)]
(a/assert-equal (.-state mc) :unknown)
@@ -765,7 +763,7 @@
(a/assert-equal (seq (gen 3)) [0 1 2])))
(deftest bases-tests
- (a/assert-equal (bases ISeq)
+ (a/assert-equal (bases ISeq)
[IPersistentCollection]))
(deftest supers-tests
@@ -779,25 +777,49 @@
(def AlterVarInt 0)
(deftest alter-var-root-tests
- (a/assert-equal AlterVarInt 0)
- (alter-var-root #'AlterVarInt inc)
- (a/assert-equal AlterVarInt 1))
+ (a/assert-equal AlterVarInt 0)
+ (alter-var-root #'AlterVarInt inc)
+ (a/assert-equal AlterVarInt 1))
(def ^:dynamic unbound)
(def bound 1)
(deftest bound?-tests
- (a/assert-true (bound? #'bound))
- (a/assert-false (bound? #'bound #'unbound)))
+ (a/assert-true (bound? #'bound))
+ (a/assert-false (bound? #'bound #'unbound)))
(deftest thread-bound?-tests
- (a/assert-false (thread-bound? #'unbound))
- (binding [unbound 1]
- (a/assert-true (thread-bound? #'unbound))
- (a/assert-false (thread-bound? #'unbound #'bound))))
+ (a/assert-false (thread-bound? #'unbound))
+ (binding [unbound 1]
+ (a/assert-true (thread-bound? #'unbound))
+ (a/assert-false (thread-bound? #'unbound #'bound))))
(deftest isa?-tests
- (a/assert-true (isa? ISeq Seqable))
- (a/assert-false (isa? Seqable ISeq)))
-
-
+ (a/assert-true (isa? ISeq Seqable))
+ (a/assert-false (isa? Seqable ISeq)))
+
+(defmulti factorial identity)
+
+(defmethod factorial 0 [_] 1)
+(defmethod factorial :default [num]
+ (* num (factorial (dec num))))
+
+
+
+(derive ::rect ::shape)
+
+(defmulti bar (fn [x y] [x y]))
+(defmethod bar [::rect ::shape] [x y] :rect-shape)
+(defmethod bar [::shape ::rect] [x y] :shape-rect)
+(defmethod bar [::circle ::foo] [x y] :circle-foo)
+
+(prefer-method bar [::rect ::shape] [::shape ::rect])
+
+(deftest mult-method-tests
+ (a/assert-equal (factorial 0) 1)
+ (a/assert-equal (factorial 1) 1)
+ (a/assert-equal (factorial 3) 6)
+ (a/assert-equal (factorial 7) 5040)
+ (a/assert-equal (bar ::rect ::rect) :rect-shape)
+ (a/assert-equal (bar ::shape ::rect) :shape-rect)
+ (a/assert-equal (bar ::circle ::foo) :circle-foo))
View
25 tests/lispreader-tests.clj
@@ -1,19 +1,18 @@
(ns tests.lispreader-tests
- (:require [tests.assertions :as assertions])
+ (:require [tests.assertions :as a])
(:require [tests.utils :only [deftest]]))
(deftest literal-char-tests
- (assertions/assert-equal \tab "\t")
- (assertions/assert-equal \space " ")
- (assertions/assert-equal \z "z")
- (assertions/assert-equal \a "a"))
+ (a/assert-equal \tab "\t")
+ (a/assert-equal \space " ")
+ (a/assert-equal \z "z")
+ (a/assert-equal \a "a"))
(deftest syntax-quote-tests
- (assertions/assert-true (= `() ()))
- (assertions/assert-true (= `map 'clojure.core/map))
- (assertions/assert-true (= `if 'clojure.core/if))
- (assertions/assert-true (= `-> 'clojure.core/->))
- (assertions/assert-true (= `recur 'recur))
- (assertions/assert-true (= `quote 'quote))
- (assertions/assert-true (= `deftest 'tests.utils/deftest))
- )
+ (a/assert-equal `() ())
+ (a/assert-equal `map 'clojure.core/map)
+ (a/assert-equal `if 'clojure.core/if)
+ (a/assert-equal `-> 'clojure.core/->)
+ (a/assert-equal `recur 'recur)
+ (a/assert-equal `quote 'quote)
+ (a/assert-equal `deftest 'tests.utils/deftest))
View
1  tests/reader-tests.py
@@ -624,7 +624,6 @@ def gen_baseNIntegerMap_PASS():
# always raises
"#<unreadable object>",
# deref not implemented (yet)
- "@foo",
# reader eval not implemented (yet)
"#=foo",
]
Please sign in to comment.
Something went wrong with that request. Please try again.