Clojure

Correct a few unit tests

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: Release 1.5, Release 1.6
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test
  • Approval:
    Triaged

Description

Several unit tests do not test what they appear to have been intended to test, because of missing is statements around (= expr1 expr2) expressions, or because of use of (is (thrown? ...)) instead of (is (thrown-with-msg? ...))

Found with pre-release version of Eastwood Clojure lint tool.

  1. clj-1313-v1.diff
    23/Dec/13 3:11 AM
    3 kB
    Andy Fingerhut
  2. clj-1313-v2.diff
    31/Jan/14 3:29 PM
    3 kB
    Andy Fingerhut

Activity

Hide
Andy Fingerhut added a comment -

Patch clj-1313-v1.diff wraps (is ...) around several = expressions in unit tests that appeared to have been missing them, and changes several thrown? to thrown-with-msg? when there were regexes that were unused.

Show
Andy Fingerhut added a comment - Patch clj-1313-v1.diff wraps (is ...) around several = expressions in unit tests that appeared to have been missing them, and changes several thrown? to thrown-with-msg? when there were regexes that were unused.
Andy Fingerhut made changes -
Field Original Value New Value
Attachment clj-1313-v1.diff [ 12549 ]
Andy Fingerhut made changes -
Patch Code [ 10001 ]
Hide
Stuart Halloway added a comment -

please update to apply cleanly on master

Show
Stuart Halloway added a comment - please update to apply cleanly on master
Stuart Halloway made changes -
Patch Code [ 10001 ] Code and Test [ 10002 ]
Approval Incomplete [ 10006 ]
Hide
Andy Fingerhut added a comment -

clj-1313-v2.diff is identical to clj-1313-v1.diff except that it removes the portion that conflicts with the latest Clojure master. That portion needs updating for a different reason anyway (ticket CLJ-1328), and is probably best put into a patch for that ticket.

Show
Andy Fingerhut added a comment - clj-1313-v2.diff is identical to clj-1313-v1.diff except that it removes the portion that conflicts with the latest Clojure master. That portion needs updating for a different reason anyway (ticket CLJ-1328), and is probably best put into a patch for that ticket.
Andy Fingerhut made changes -
Attachment clj-1313-v2.diff [ 12737 ]
Alex Miller made changes -
Approval Incomplete [ 10006 ]
Alex Miller made changes -
Approval Triaged [ 10120 ]

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: