On Thu, Dec 2, 2010 at 12:58 PM, Grant Ingersoll <[email protected]> wrote:
[...]
>     flds = sort.getSort();
>     assertEquals(flds[0].getType(), SortField.FLOAT);
>     assertEquals(flds[0].getField(), "weight");
> -
> -    try {
> -      //bad number of parens, but the function parser can handle an extra
> close
> -      sort = QueryParsing.parseSort("pow(weight,2)) desc, bday asc",
> schema);
> -    } catch (SolrException e) {
> -      assertTrue(false);
> -    }
> +gvim
>     //Test literals in functions
>     sort = QueryParsing.parseSort("strdist(foo_s, \"junk\", jw) desc",
> schema);
>     flds = sort.getSort();
>
> Namely, it looks like like we had a test that checked for dealing with extra
> parens.

> Then, perhaps you made some typo that inserted the chars: gvim in
> place of that test.

Yeah - the window you see isn't necessarily the window that has the focus :-(

>  Subsequently in rev 1001320 you kind of reverted the
> commit by removing the gvim, but did you intend to restore the test or are
> you seeing it as a bad test?

It was a bad test.
Tests should test for desired functionality, not quirks or
implementation details of the current implementation.
The fact that the past implementation did not error on something like
"add(a,b))"
was a quirk/bug, not a feature.

-Yonik
http://www.lucidimagination.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to