[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/ops.as
From: |
zou lunkai |
Subject: |
Re: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/ops.as |
Date: |
Mon, 27 Aug 2007 13:17:13 +0800 |
yes. All tests in ops.as has been verified.
NaN == NaN does returns true,
but Number(NaN) == NaN returns false according to tests. There might
be some subtle difference between the Object NaN and primitive NaN.
On 8/27/07, Chad Musick <address@hidden> wrote:
> Hmm. Is this behavior based on the PP? The ECMAScript 3 standard says
> that all NaN values are equal to each other (Section 8.5), even if the
> implementation can tell them apart. The proposed ECMAScript 4 standard
> says there should be a single global NaN object.
>
> On Mon, 2007-08-27 at 11:50 +0800, zou lunkai wrote:
> > > x = new String("a");
> > > y = --x;
> > > +check_equals(typeof(y), 'number');
> > > +xcheck(y!=NaN); // uh ? is it a different NaN ?
> > > +check(! (NaN!=NaN));
> > > check(isNaN(y));
> > > +check(isNaN(NaN));
> >
> > Tests confirmed.
> >
> > yes, y might be a differnt NaN(y is an object).
> >
> > see added tests below:
> >
> > +x = new Number(NaN);
> > +y = NaN;
> > +check(isNaN(x));
> > +check(isNaN(y));
> > +xcheck(x != y); ----->[1]
> >
> > As we see, [1] should return true. All I can think about is that x
> > is an Number object, and y is a primitive number. Doesn't mean much,
> > but might help the valueOf model...
> >
> > zou
> >
> > On 8/26/07, Sandro Santilli <address@hidden> wrote:
> > > CVSROOT: /sources/gnash
> > > Module name: gnash
> > > Changes by: Sandro Santilli <strk> 07/08/25 19:07:46
> > >
> > > Modified files:
> > > . : ChangeLog
> > > testsuite/actionscript.all: ops.as
> > >
> > > Log message:
> > > * testsuite/actionscript.all/ops.as: more tests about
> > > isNaN(x) when
> > > x != NaN (odd)
> > >
> > > CVSWeb URLs:
> > > http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4101&r2=1.4102
> > > http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/ops.as?cvsroot=gnash&r1=1.19&r2=1.20
> > >
> > > Patches:
> > > Index: ChangeLog
> > > ===================================================================
> > > RCS file: /sources/gnash/gnash/ChangeLog,v
> > > retrieving revision 1.4101
> > > retrieving revision 1.4102
> > > diff -u -b -r1.4101 -r1.4102
> > > --- ChangeLog 25 Aug 2007 16:10:37 -0000 1.4101
> > > +++ ChangeLog 25 Aug 2007 19:07:45 -0000 1.4102
> > > @@ -1,5 +1,10 @@
> > > 2007-08-25 Sandro Santilli <address@hidden>
> > >
> > > + * testsuite/actionscript.all/ops.as: more tests about isNaN(x)
> > > when
> > > + x != NaN (odd)
> > > +
> > > +2007-08-25 Sandro Santilli <address@hidden>
> > > +
> > > * server/vm/ASHandlers.cpp (ActionNewLessThan): convert operands to
> > > primitive value before proceeding.
> > > * testsuite/actionscript.all/ops.as: xcheck => check
> > >
> > > Index: testsuite/actionscript.all/ops.as
> > > ===================================================================
> > > RCS file: /sources/gnash/gnash/testsuite/actionscript.all/ops.as,v
> > > retrieving revision 1.19
> > > retrieving revision 1.20
> > > diff -u -b -r1.19 -r1.20
> > > --- testsuite/actionscript.all/ops.as 25 Aug 2007 16:10:37 -0000
> > > 1.19
> > > +++ testsuite/actionscript.all/ops.as 25 Aug 2007 19:07:46 -0000
> > > 1.20
> > > @@ -20,7 +20,7 @@
> > > * Test binary predicates (equal, less_then, greater_then, logical and
> > > bitwise ops)
> > > */
> > >
> > > -rcsid="$Id: ops.as,v 1.19 2007/08/25 16:10:37 strk Exp $";
> > > +rcsid="$Id: ops.as,v 1.20 2007/08/25 19:07:46 strk Exp $";
> > >
> > > #include "check.as"
> > >
> > > @@ -550,8 +550,11 @@
> > >
> > > x = new String("a");
> > > y = --x;
> > > -xcheck(y!=NaN);
> > > +check_equals(typeof(y), 'number');
> > > +xcheck(y!=NaN); // uh ? is it a different NaN ?
> > > +check(! (NaN!=NaN));
> > > check(isNaN(y));
> > > +check(isNaN(NaN));
> > >
> > > //------------------------------------------------
> > > // Increment Operator (ACTION_DECREMENT: 0x50)
> > >
> > >
> > > _______________________________________________
> > > Gnash-commit mailing list
> > > address@hidden
> > > http://lists.gnu.org/mailman/listinfo/gnash-commit
> > >
> >
> >
> > _______________________________________________
> > Gnash-commit mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/gnash-commit
>
>
- [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/ops.as, Zou Lunkai, 2007/08/01
- [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/ops.as, Zou Lunkai, 2007/08/02
- [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/ops.as, Sandro Santilli, 2007/08/02
- [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/ops.as, Zou Lunkai, 2007/08/06
- [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/ops.as, Sandro Santilli, 2007/08/06
- [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/ops.as, Sandro Santilli, 2007/08/19
- [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/ops.as, Sandro Santilli, 2007/08/25
- [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/ops.as, Zou Lunkai, 2007/08/26