Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add yet another way to test chr: compare its ret value to (format "%c…

…" codepoint)
  • Loading branch information...
commit 1dbe90836e86ae6d28c2007c91925ad6a02f4f24 1 parent c215ef7
Andy Fingerhut authored February 21, 2012
6  test/com/fingerhutpress/text/unicode/test.clj
@@ -168,8 +168,10 @@
168 168
 
169 169
 (deftest ^:slow test-ord-slow
170 170
   (doseq [i (all-codepoints)]
171  
-    (is (= i (ord (chr i))))
172  
-    (is true (utf16? (chr i)))))
  171
+    (let [s (chr i)]
  172
+      (is (= i (ord s)))
  173
+      (is (= s (format "%c" (Integer. (int i)))))
  174
+      (is (= true (utf16? s))))))
173 175
 
174 176
 
175 177
 (deftest test-bmp-codepoint?

0 notes on commit 1dbe908

Please sign in to comment.
Something went wrong with that request. Please try again.