<< Back to previous view

[LOGIC-153] deftest test-34-unify-with-metadata appears incorrect Created: 23/Dec/13  Updated: 01/Jan/14

Status: Open
Project: core.logic
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Andy Fingerhut Assignee: David Nolen
Resolution: Unresolved Votes: 0
Labels: None

(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.

Comment by David Nolen [ 30/Dec/13 7:20 PM ]

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

Comment by Andy Fingerhut [ 01/Jan/14 12:05 PM ]

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

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

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.

Generated at Sat Jan 20 15:27:42 CST 2018 using JIRA 4.4#649-r158309.