Skip to content

Commit 4713940

Browse files
committed
Update invalid tests that assumed namespace is ignored.
1 parent 801d770 commit 4713940

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

test/reader.wisp

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -112,47 +112,47 @@
112112
'(hello you)))
113113

114114

115-
(is (= 1 (reader/read-string "1")))
116-
(is (= 2 (reader/read-string "#_nope 2")))
117-
(is (= -1 (reader/read-string "-1")))
118-
(is (= -1.5 (reader/read-string "-1.5")))
119-
(is (= [3 4] (reader/read-string "[3 4]")))
120-
(is (= "foo" (reader/read-string "\"foo\"")))
121-
(is (= ':hello (reader/read-string ":hello")))
122-
(is (= 'goodbye (reader/read-string "goodbye")))
123-
(is (= '#{1 2 3} (reader/read-string "#{1 2 3}")))
124-
(is (= '(7 8 9) (reader/read-string "(7 8 9)")))
125-
(is (= '(deref foo) (reader/read-string "@foo")))
126-
(is (= '(quote bar) (reader/read-string "'bar")))
115+
(is (= 1 (read-string "1")))
116+
(is (= 2 (read-string "#_nope 2")))
117+
(is (= -1 (read-string "-1")))
118+
(is (= -1.5 (read-string "-1.5")))
119+
(is (= [3 4] (read-string "[3 4]")))
120+
(is (= "foo" (read-string "\"foo\"")))
121+
(is (= ':hello (read-string ":hello")))
122+
(is (= 'goodbye (read-string "goodbye")))
123+
(is (= '#{1 2 3} (read-string "#{1 2 3}")))
124+
(is (= '(7 8 9) (read-string "(7 8 9)")))
125+
(is (= '(deref foo) (read-string "@foo")))
126+
(is (= '(quote bar) (read-string "'bar")))
127127

128128
;; TODO: Implement `namespace` fn and proper namespace support ?
129-
;;(assert (= 'foo/bar (reader/read-string "foo/bar")))
130-
;;(assert (= ':foo/bar (reader/read-string ":foo/bar")))
131-
(is (= \a (reader/read-string "\\a")))
129+
;;(assert (= 'foo/bar (read-string "foo/bar")))
130+
;;(assert (= ':foo/bar (read-string ":foo/bar")))
131+
(is (= \a (read-string "\\a")))
132132
(is (= 'String
133-
(:tag (meta (reader/read-string "^String {:a 1}")))))
133+
(:tag (meta (read-string "^String {:a 1}")))))
134134
;; TODO: In quoted sets both keys and values should remain quoted
135135
;; (assert (= [:a 'b '#{c {:d [:e :f :g]}}]
136-
;; (reader/read-string "[:a b #{c {:d [:e :f :g]}}]")))
137-
(is (= nil (reader/read-string "nil")))
138-
(is (= true (reader/read-string "true")))
139-
(is (= false (reader/read-string "false")))
140-
(is (= "string" (reader/read-string "\"string\"")))
136+
;; (read-string "[:a b #{c {:d [:e :f :g]}}]")))
137+
(is (= nil (read-string "nil")))
138+
(is (= true (read-string "true")))
139+
(is (= false (read-string "false")))
140+
(is (= "string" (read-string "\"string\"")))
141141
(is (= "escape chars \t \r \n \\ \" \b \f"
142-
(reader/read-string "\"escape chars \\t \\r \\n \\\\ \\\" \\b \\f\"")))
142+
(read-string "\"escape chars \\t \\r \\n \\\\ \\\" \\b \\f\"")))
143143

144144

145145
;; queue literals
146146
(is (= '(PersistentQueue. [])
147-
(reader/read-string "#queue []")))
147+
(read-string "#queue []")))
148148
(is (= '(PersistentQueue. [1])
149-
(reader/read-string "#queue [1]")))
149+
(read-string "#queue [1]")))
150150
(is (= '(PersistentQueue. [1 2])
151-
(reader/read-string "#queue [1 2]")))
151+
(read-string "#queue [1 2]")))
152152

153153
;; uuid literals
154154
(is (= '(UUID. "550e8400-e29b-41d4-a716-446655440000")
155-
(reader/read-string "#uuid \"550e8400-e29b-41d4-a716-446655440000\"")))
155+
(read-string "#uuid \"550e8400-e29b-41d4-a716-446655440000\"")))
156156

157157
(let [assets
158158
["اختبار" ; arabic
@@ -204,7 +204,7 @@
204204
(is
205205
(= :threw
206206
(try
207-
(reader/read-string unicode-error)
207+
(read-string unicode-error)
208208
:failed-to-throw
209209
(catch e :threw)))
210210
(str "Failed to throw reader error for: " unicode-error)))

0 commit comments

Comments
 (0)