java.jdbc

Two unit tests do not test anything

Details

  • Type: Defect Defect
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

The following two unit tests are of the form (is (= expr1) expr2), which can never fail, because (= expr1) is always true.

(is (= :K_W) (sql/as-keyword :K_W))
    (is (= :k.w) (sql/as-keyword :k.w))))

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

Activity

Hide
Sean Corfield added a comment -

Patch applied.

Show
Sean Corfield added a comment - Patch applied.
Hide
Sean Corfield added a comment -

Thanx Andy!

Show
Sean Corfield added a comment - Thanx Andy!
Hide
Andy Fingerhut added a comment -

Patch jdbc-85-v1.diff simply shuffles around the parens so that the tests are of the probably-intended form (is (= expr1 expr2))

Show
Andy Fingerhut added a comment - Patch jdbc-85-v1.diff simply shuffles around the parens so that the tests are of the probably-intended form (is (= expr1 expr2))

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: