[FFmpeg-devel] [PATCH 1/6] Add more tests to eval, help detecting more apparent errors.

Stefano Sabatini stefano.sabatini-lala
Thu Jun 17 00:36:36 CEST 2010


On date Wednesday 2010-06-16 23:22:47 +0200, Michael Niedermayer encoded:
> On Wed, Jun 16, 2010 at 08:33:26PM +0200, Stefano Sabatini wrote:
> > On date Sunday 2010-06-13 02:31:32 +0200, Michael Niedermayer encoded:
> > > On Sun, Jun 13, 2010 at 12:38:03AM +0200, Stefano Sabatini wrote:
> > > > ---
> > > >  libavutil/eval.c |   38 ++++++++++++++++++++++++++++++++++++++
> > > >  1 files changed, 38 insertions(+), 0 deletions(-)
> > > > 
> > > > diff --git a/libavutil/eval.c b/libavutil/eval.c
> > > > index 59ebd94..cfe71e1 100644
> > > > --- a/libavutil/eval.c
> > > > +++ b/libavutil/eval.c
> > > > @@ -526,6 +526,44 @@ int main(void)
> > > >  {
> > > >      int i;
> > > >      double d;
> > > > +    const char **expr, *exprs[] = {
> > > > +        "",
> > > > +        "1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)",
> > > > +        "80G/80Gi"
> > > > +        "1k",
> > > > +        "1Gi",
> > > > +        "1gi",
> > > > +        "1GiFoo",
> > > > +        "1k+1k",
> > > > +        "1Gi*3foo",
> > > > +        "foo",
> > > > +        "foo(",
> > > > +        "foo()",
> > > > +        "foo)",
> > > > +        "sin",
> > > > +        "sin(",
> > > > +        "sin()",
> > > > +        "sin)",
> > > > +        "sin 10",
> > > > +        "sin(1,2,3)",
> > > > +        "sin(1 )",
> > > > +        "1",
> > > > +        "1foo",
> > > > +        "bar + PI + E + 100f*2 + foo",
> > > > +        "foo(1, 2)",
> > > > +        "1gi",
> > > > +        "1Gi",
> > > > +        NULL
> > > 
> > > thats a huge number of invalid expressions but the only no trivial valid
> > > is copied from the test below
> > 
> > Patch updated with minor changes. I don't want to spend more time on
> > this, but this may be useful as a basis for improving the current
> > test, I'll drop the patch if you don't want this applied.
> 
> patch ok but insuffient for reasonable testing of the code.

Applied.
-- 
FFmpeg = Fiendish and Free Mind-dumbing Pitiless Ermetic Genius



More information about the ffmpeg-devel mailing list