File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed
test/clojure/test_clojure Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public class EdnReader{
2424
2525static IFn [] macros = new IFn [256 ];
2626static IFn [] dispatchMacros = new IFn [256 ];
27- static Pattern symbolPat = Pattern .compile ("[:]?([\\ D&&[^/]].*/)?([\\ D&&[^/]][^/]*)" );
27+ static Pattern symbolPat = Pattern .compile ("[:]?+ ([\\ D&&[^/]].*/)?([\\ D&&[^/]][^/]*)" );
2828static Pattern intPat =
2929 Pattern .compile (
3030 "([-+]?)(?:(0)|([1-9][0-9]*)|0[xX]([0-9A-Fa-f]+)|0([0-7]+)|([1-9][0-9]?)[rR]([0-9A-Za-z]+)|0[0-9]+)(N)?" );
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public class LispReader{
5959static IFn [] macros = new IFn [256 ];
6060static IFn [] dispatchMacros = new IFn [256 ];
6161//static Pattern symbolPat = Pattern.compile("[:]?([\\D&&[^:/]][^:/]*/)?[\\D&&[^:/]][^:/]*");
62- static Pattern symbolPat = Pattern .compile ("[:]?([\\ D&&[^/]].*/)?(/|[\\ D&&[^/]][^/]*)" );
62+ static Pattern symbolPat = Pattern .compile ("[:]?+ ([\\ D&&[^/]].*/)?(/|[\\ D&&[^/]][^/]*)" );
6363//static Pattern varPat = Pattern.compile("([\\D&&[^:\\.]][^:\\.]*):([\\D&&[^:\\.]][^:\\.]*)");
6464//static Pattern intPat = Pattern.compile("[-+]?[0-9]+\\.?");
6565static Pattern intPat =
Original file line number Diff line number Diff line change 324324 :set #{3 2 1 }
325325 :set (sorted-set 2 1 3 ))))
326326 (testing " test number equivalence"
327- (is (= :1 (case 1N 1 :1 :else ))))
327+ (is (= :one (case 1N 1 :one :else ))))
328328 (testing " test warn when boxing/hashing expr for all-ints case"
329329 (should-print-err-message
330330 #"Performance warning, .*:\d + - case has int tests, but tested expression is not primitive..*\r ?\n "
348348 (should-not-reflect (Long. (case 1 1 1 ))) ; new Long(long)
349349 (should-not-reflect (Long. (case 1 1 " 1" )))) ; new Long(String)
350350 (testing " non-equivalence of chars and nums"
351- (are [result input] (= result (case input 97 :97 :else ))
351+ (are [result input] (= result (case input 97 :got97 :else ))
352352 :else \a
353353 :else (char \a)
354- :97 (int \a))
354+ :got97 (int \a))
355355 (are [result input] (= result (case input \a :a :else ))
356356 :else 97
357357 :else 97N
Original file line number Diff line number Diff line change 353353 (are [err msg form] (thrown-with-msg? err msg (read-string form))
354354 Exception #"Invalid token: foo:" " foo:"
355355 Exception #"Invalid token: :bar/" " :bar/"
356- Exception #"Invalid token: ::does.not/exist" " ::does.not/exist" ))
356+ Exception #"Invalid token: ::does.not/exist" " ::does.not/exist"
357+ Exception #"Invalid token: :5" " :5" ))
358+
357359; ; Lists
358360
359361(deftest t-Lists )
You can’t perform that action at this time.
0 commit comments