~ubuntu-branches/ubuntu/oneiric/haxe/oneiric

« back to all changes in this revision

Viewing changes to haxe/tests/unit/TestBasetypes.hx

  • Committer: Bazaar Package Importer
  • Author(s): Jens Peter Secher
  • Date: 2010-01-31 23:08:43 UTC
  • mfrom: (5.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100131230843-1cxte2x20ypk9c25
Tags: 1:2.5-1
New upstream version, taken from new upstream subversion repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
                eq( Math.round(-10000000000.7) & 0xFFFFFF, 15997951 );
76
76
        }
77
77
 
 
78
        function testParse() {
 
79
                eq( Std.parseInt("0"), 0 );
 
80
                eq( Std.parseInt("0001"), 1 );
 
81
                eq( Std.parseInt("100"), 100 );
 
82
                eq( Std.parseInt("-100"), -100 );
 
83
                eq( Std.parseInt("100x123"), 100 );
 
84
                eq( Std.parseInt(""), null );
 
85
                eq( Std.parseInt("abcd"), null );
 
86
                eq( Std.parseInt(null), null );
 
87
        }
 
88
 
78
89
}