Skip to content
This repository has been archived by the owner on Feb 3, 2018. It is now read-only.

Commit

Permalink
added test for [1, 2, 3}
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-choi committed May 18, 2009
1 parent 66fd408 commit 69099c1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/test_parse_json.clj
Expand Up @@ -60,10 +60,14 @@

(deftest load-stream
(is (= (j/load-stream "[1, 2, 3]") [1 2 3])
"loading a flat vector containing integers")
"loading a flat array containing integers")
(is (thrown-with-msg? Exception
#"an array is unclosed; \"]\" expected where \"}\" is"
(j/load-stream "[1, 2, 3}") [1 2 3])
"loading an improperly closed array")
(is (= (j/load-stream "[\"a\", \"b\\n\", \"\\u1234\"]")
["a" "b\n" "\u1234"])
"loading a flat vector containing strings")
"loading a flat array containing strings")
(is (= (j/load-stream "{\"a\": 1, \"b\\n\": 2, \"\\u1234\": 3}")
{"a" 1, "b\n" 2, "\u1234" 3})
"loading a flat object containing strings and integers"))
Expand Down

0 comments on commit 69099c1

Please sign in to comment.