gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Numb...


From: Benjamin Wolsey
Subject: AW: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Numb...
Date: Thu, 8 Nov 2007 14:50:28 +0000 (GMT)

Can anyone verify these cases? I'm assuming the comments in as_value.cpp are 
accurate.

----- Urspr√ľngliche Mail ----
> Von: Benjamin Wolsey <address@hidden>
> An: address@hidden
> Gesendet: Donnerstag, den 8. November 2007, 15:47:56 Uhr
> Betreff: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Numb...
> 
> CVSROOT:    /sources/gnash
> Module name:    gnash
> Changes by:    Benjamin Wolsey     07/11/08 14:47:56
> 
> Modified files:
>     .              : ChangeLog 
>     testsuite/actionscript.all: Number.as 
> 
> Log message:
>         * testsuite/actionscript.all/Number.as: add tests for
> number
> 
 formatting
>           based on comments in server/as_value.cpp. Presently
> they
> 
 should fail
>           for locales with a comma decimal separator.
> 
> CVSWeb URLs:
> http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4805&r2=1
> .4806
> http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Number.as?c
> vsroot=gnash&r1=1.32&r2=1.33
> 
> Patches:
> Index: ChangeLog
> ===================================================================
> RCS file: /sources/gnash/gnash/ChangeLog,v
> retrieving revision 1.4805
> retrieving revision 1.4806
> diff -u -b -r1.4805 -r1.4806
> --- ChangeLog    8 Nov 2007 14:31:55 -0000    1.4805
> +++ ChangeLog    8 Nov 2007 14:47:55 -0000    1.4806
> @@ -1,3 +1,9 @@
> +2007-11-08 Benjamin Wolsey 
> +
> +    * testsuite/actionscript.all/Number.as: add tests for
> number
> 
 formatting
> +      based on comments in server/as_value.cpp. Presently they
> should
> 
 fail
> +      for locales with a comma decimal separator.
> +
>  2007-11-08 Sandro Santilli 
>  
>      * server/vm/ASHandlers.cpp: fix compiler warnings
> 
> Index: testsuite/actionscript.all/Number.as
> ===================================================================
> RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Number.as,v
> retrieving revision 1.32
> retrieving revision 1.33
> diff -u -b -r1.32 -r1.33
> --- testsuite/actionscript.all/Number.as    6 Oct 2007 08:20:05
> -0000
> 
    1.32
> +++ testsuite/actionscript.all/Number.as    8 Nov 2007 14:47:55
> -0000
> 
    1.33
> @@ -27,7 +27,7 @@
>  // TODO: test with SWF target != 6 (the only one tested so far)
>  //    
>  
> -rcsid="$Id: Number.as,v 1.32 2007/10/06 08:20:05 strk Exp $";
> +rcsid="$Id: Number.as,v 1.33 2007/11/08 14:47:55 bwy Exp $";
>  
>  #include "check.as"
>  
> @@ -406,5 +406,52 @@
>  check_equals(450 - undefined, 450);
>  #endif
>  
> +//-----------------------------------------------------------
> +// Check number formatting as documented in as_value.cpp. Not
> +// verified with the proprietary player. Rules are:
> +// Numbers should be rounded to 15 significant digits.
> +// Numbers above 10e+15 are expressed with exponent.
> +// Numbers below 0 with more than 4 leading zeros expressed
> +//     with exponent.
> +// Exponent has no leading zero.
> +// Trailing zeros are always trimmed.
> +//-----------------------------------------------------------
> +
> +a=new Number(11111111111111.11111111);
> +check_equals(a.toString(), "11111111111111.1");
> +
> +a=new Number(111111111111111.1111111);
> +check_equals(a.toString(), "111111111111111");
> +
> +a=new Number(1111111111111111.1111111);
> +check_equals(a.toString(), "1.11111111111111e+15");
> +
> +a=new Number(0.000123456789012346);
> +check_equals(a.toString(), "0.000123456789012346");
> +
> +a=new Number(0.0000123456789012346);
> +check_equals(a.toString(), "0.0000123456789012346");
> +
> +a=new Number(0.00000123456789012346);
> +check_equals(a.toString(), "1.23456789012346e-6");
> +
> +a=new Number(0.000000123456789012346);
> +check_equals(a.toString(), "1.23456789012346e-7");
> +
> +a=new Number(0.0999999999999999);
> +check_equals(a.toString(), "0.0999999999999999");
> +
> +a=new Number(0.99999999999999938);
> +check_equals(a.toString(), "0.999999999999999");
> +
> +a=new Number(9.9999999999999939 / 10);
> +check_equals(a.toString(), "0.999999999999999");
> +
> +a=new Number(5.4 / 100000);
> +check_equals(a.toString(), "0.000054");
> +
> +a=new Number(5.4 / 1000000);
> +check_equals(a.toString(), "5.4e-6");
> +
>  check( isNaN(0/0) );
>  totals();
> 
> 
> _______________________________________________
> Gnash-commit mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnash-commit
> 




        __________________________________  Ihr erstes Baby? Holen Sie sich 
Tipps von anderen Eltern.  www.yahoo.de/clever




reply via email to

[Prev in Thread] Current Thread [Next in Thread]