core.logic

deftest test-34-unify-with-metadata appears incorrect

Details

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

Description

(deftest test-34-unify-with-metadata
  (is (run* [q]
            (== q (quote ^:haz-meta-daytuhs (form form form))))
      '((^:haz-meta-daytuhs (form form form)))))

I am not sure what was intended for this, but replacing it with the following causes the test to fail.

(deftest test-34-unify-with-metadata
  (is (= (run* [q]
               (== q (quote ^:haz-meta-daytuhs (form form form))))
         '((^:haz-meta-daytuhs (form form form))))))

I think the correct version is probably close to that, though.

Activity

Hide
David Nolen added a comment -

I'm pretty sure meta data on forms caused exceptions and that's what this test was for.

Show
David Nolen added a comment - I'm pretty sure meta data on forms caused exceptions and that's what this test was for.
Hide
Andy Fingerhut added a comment -

As that test is written now, it is of the form:

(is (run* [q] (expr))
    '(expr2))

The second argument to the macro 'is' is optional, and if present should be a string, not something like '(expr2). The test passes if (run* [q] (expr)) returns true without throwing an exception, and '(expr2) is ignored completely. That is why the test appears to be written incorrectly.

Show
Andy Fingerhut added a comment - As that test is written now, it is of the form:
(is (run* [q] (expr))
    '(expr2))
The second argument to the macro 'is' is optional, and if present should be a string, not something like '(expr2). The test passes if (run* [q] (expr)) returns true without throwing an exception, and '(expr2) is ignored completely. That is why the test appears to be written incorrectly.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated: