<!-- 
RSS generated by JIRA (4.4#649-r158309) at Fri May 24 16:34:38 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/si/jira.issueviews:issue-xml/CLJ-931/CLJ-931.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Clojure JIRA</title>
    <link>http://dev.clojure.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>4.4</version>
        <build-number>649</build-number>
        <build-date>25-07-2011</build-date>
    </build-info>

<item>
            <title>[CLJ-931] Syntactically broken clojure.test/are tests succeed</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-931</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;While clojure.test/are is a very useful macro, it has one major flaw.  If the assertion is syntactically incorrect, the test succeeds.  Take this testcase:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(deftest broken-test
  (are [a b c] (= a b c)
       1 1))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;See the error?  The are form takes three values, but I have provided only two.  The test simply passes.&lt;/p&gt;

&lt;p&gt;Latest patch checks the number of arguments to &lt;tt&gt;are&lt;/tt&gt; and throws an exception if they don&apos;t match.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15225">CLJ-931</key>
            <summary>Syntactically broken clojure.test/are tests succeed</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="stuart.sierra">Stuart Sierra</assignee>
                                <reporter username="tsdh">Tassilo Horn</reporter>
                        <labels>
                    </labels>
                <created>Thu, 16 Feb 2012 10:40:15 -0600</created>
                <updated>Fri, 23 Mar 2012 08:40:35 -0500</updated>
                    <resolved>Fri, 23 Mar 2012 08:40:35 -0500</resolved>
                            <version>Release 1.3</version>
                                <fixVersion>Release 1.4</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="27726" author="jafingerhut" created="Thu, 16 Feb 2012 11:36:51 -0600"  >&lt;p&gt;Is this the same issue as &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-806&quot; title=&quot;clojure.test/are does not fail with insufficient arguments&quot;&gt;&lt;del&gt;CLJ-806&lt;/del&gt;&lt;/a&gt;?  If so, it might be nice to close one with a comment that it is a duplicate of the other.  Given &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-806&quot; title=&quot;clojure.test/are does not fail with insufficient arguments&quot;&gt;&lt;del&gt;CLJ-806&lt;/del&gt;&lt;/a&gt; has no patch, and this one does, perhaps preferable to close &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-806&quot; title=&quot;clojure.test/are does not fail with insufficient arguments&quot;&gt;&lt;del&gt;CLJ-806&lt;/del&gt;&lt;/a&gt;?&lt;/p&gt;</comment>
                    <comment id="27728" author="tsdh" created="Thu, 16 Feb 2012 11:46:08 -0600"  >&lt;p&gt;John, you are right.  I didn&apos;t find it searching for &quot;test are&quot; earlier today; now I do.&lt;/p&gt;

&lt;p&gt;I did as you&apos;ve suggested: closed &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-806&quot; title=&quot;clojure.test/are does not fail with insufficient arguments&quot;&gt;&lt;del&gt;CLJ-806&lt;/del&gt;&lt;/a&gt; in favour of this one.&lt;/p&gt;</comment>
                    <comment id="27733" author="jafingerhut" created="Fri, 17 Feb 2012 02:27:05 -0600"  >&lt;p&gt;I&apos;ve tested this patch by hand, and it seems to work fine, and the code looks correct.  I have tried several ways to add a unit test to verify this fix, but haven&apos;t found the right way to do it, if there is one.&lt;/p&gt;</comment>
                    <comment id="27735" author="tsdh" created="Fri, 17 Feb 2012 02:58:54 -0600"  >&lt;p&gt;I&apos;m working on it... &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="27737" author="tsdh" created="Fri, 17 Feb 2012 04:10:11 -0600"  >&lt;p&gt;This patch obsoletes the former on (I&apos;m gonna delete the old one).  It includes:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;an extended fix that catches also the zero-arg given case&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;a fix for a testcase in test/clojure/test_clojure/java_interop.clj which only passed because of the bug this issue is all about&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;a currently #_-disabled test case for testing `are&apos;.  It is disabled, because it fails when run with &quot;ant test&quot;.  However, it works just fine when run inside some REPL.  I presume that&apos;s because ant runs inside its own JVM instance and thus makes catching exceptions from macroexpand/eval forms impossible?!?&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="27738" author="tsdh" created="Fri, 17 Feb 2012 04:36:48 -0600"  >&lt;p&gt;Another minor update.  Now (are [] true) is allowed (but meaningless).  In the previous patch, you got a &quot;divide by zero&quot; in this case.&lt;/p&gt;</comment>
                    <comment id="27925" author="jafingerhut" created="Fri, 9 Mar 2012 09:29:20 -0600"  >&lt;p&gt;Patch 0001-Fix-&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-931&quot; title=&quot;Syntactically broken clojure.test/are tests succeed&quot;&gt;&lt;del&gt;CLJ-931&lt;/del&gt;&lt;/a&gt;-Syntactically-broken-clojure.test-are-te.patch applies, builds, and tests cleanly as of March 9, 2012 latest master.  One author Tassilo has signed CA.&lt;/p&gt;</comment>
                    <comment id="27927" author="stuart.sierra" created="Fri, 9 Mar 2012 10:11:34 -0600"  >&lt;p&gt;I can&apos;t make the test work either. The patch looks good. Just remove the broken test instead of leaving it commented out.&lt;/p&gt;</comment>
                    <comment id="27928" author="jafingerhut" created="Fri, 9 Mar 2012 10:24:42 -0600"  >&lt;p&gt;clj-931-error-on-bad-are-syntax-patch2.txt same as previous one, except removes commented out test.  Applies, builds, and tests cleanly to latest master.&lt;/p&gt;</comment>
                    <comment id="27929" author="stuart.sierra" created="Fri, 9 Mar 2012 10:37:21 -0600"  >&lt;p&gt;Screened.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10920" name="0001-Fix-CLJ-931-Syntactically-broken-clojure.test-are-te.patch" size="3645" author="tsdh" created="Fri, 17 Feb 2012 04:36:48 -0600" />
                    <attachment id="10989" name="clj-931-error-on-bad-are-syntax-patch2.txt" size="2339" author="jafingerhut" created="Fri, 9 Mar 2012 10:24:42 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10007">Ok</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10003" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                <customfieldname>Waiting On</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>richhickey</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>
</channel>
</rss>