I am working on a test and will add it.


On Thu, Jan 31, 2013 at 3:54 AM, Johann Klähn <notifications@github.com>wrote:

> In src/report.cc:
>
> > @@ -691,6 +691,12 @@ value_t report_t::fn_round(call_scope_t& args)
> >    return args[0].rounded();
> >  }
> >
> > +value_t report_t::fn_roundto(call_scope_t& args)
> > +{
> > +  if(args.has<int>(1))
> > +    return args[0].roundto(args.get<int>(1));
>
> I think it's better to remove the if here. This way resolve (called by get)
> will throw an error if there are too few arguments or arguments of the
> wrong type. I think this is better than failing silently.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/ledger/ledger/pull/140/files#r2841431>.
>
>



-- 
Craig, Corona De Tucson, AZ
enderw88.wordpress.com