drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: Please don't use assert in unit tests
Date Fri, 29 May 2015 22:21:20 GMT
But it is impossible to enforce that code be run with assertions enabled in
any given foreign environment.



On Fri, May 29, 2015 at 7:56 AM, Aditya <adityakishore@gmail.com> wrote:

> It is trivial to enable Java assertion for all code executed from within
> eclipse by modifying the JRE settings[1].
>
>
> [1]
>
> http://stackoverflow.com/questions/11415160/how-to-enable-the-java-keyword-assert-in-eclipse-program-wise#answer-21786986
>
> On Fri, May 29, 2015 at 2:47 AM, Ted Dunning <ted.dunning@gmail.com>
> wrote:
>
> > On Thu, May 28, 2015 at 11:44 AM, Chris Westin <chriswestin42@gmail.com>
> > wrote:
> >
> > > I'm beginning to think we should go the Google route and not allow Java
> > > assert anywhere, instead always throwing real exceptions (possibly
> > > indirectly by using the Preconditions package). But I'm not quite ready
> > to
> > > go there yet. For now I'll stick to asking that we not use Java assert
> in
> > > tests and test support code.
> > >
> >
> > The one use of assert that I still find interesting is to signal IDE's
> that
> > a particularly invariant is known to be true.
> >
> > This is a weak argument, however.
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message