<< Back to previous view

[DJSON-15] A test is written incorrectly so that it tests nothing Created: 23/Dec/13  Updated: 10/Jan/14  Resolved: 10/Jan/14

Status: Closed
Project: data.json
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Trivial
Reporter: Andy Fingerhut Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Attachments: File djson-15-v1.diff    


This test has the structure (is (= expr1) expr2), which can never fail, and tests nothing:

(deftest object-keys-must-be-strings
  (is (= "{\"1\":1,\"2\":2") (json-str (sorted-map 1 1 2 2))))

Found using a pre-release version of the Eastwood Clojure lint tool.

Comment by Andy Fingerhut [ 23/Dec/13 5:43 PM ]

Patch djson-15-v1.diff corrects the test, including adding a missing } character to the string to compare against.

Comment by Stuart Sierra [ 10/Jan/14 11:10 AM ]

Marking old issues as 'closed'

Generated at Thu Sep 21 12:41:42 CDT 2017 using JIRA 4.4#649-r158309.