Skip to content

Commit

Permalink
fix #2
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Jan 19, 2015
1 parent a29ba72 commit 7e92ebe
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 2 deletions.
9 changes: 9 additions & 0 deletions js/dist/number.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,4 +388,13 @@ var logloge = function ( n ) {

exports.logloge = logloge;

/* js/src/memory */
/* js/src/memory/copy.js */

var copy = function ( a ) {
return a ;
} ;

exports.copy = copy ;

})(typeof exports === 'undefined' ? this['number'] = {} : exports);
2 changes: 1 addition & 1 deletion js/dist/number.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/dist/number.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions js/src/memory/copy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

var copy = function ( a ) {
return a ;
} ;

exports.copy = copy ;
36 changes: 36 additions & 0 deletions test/js/src/memory.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

var one ;

one = function ( a ) {

var b , x ;

b = number.copy( a ) ;

ok( a === b , a + " === " + b ) ;

x = Math.random( ) ;

a -= x ;

ok( a === b - x , a + " === " + b + " - " + x ) ;

} ;

test( "memory" , function ( ) {

var a , i , n ;

n = 10 ;

for ( i = 0 ; i < n ; ++i ) {
a = Math.random( ) ;
one( a ) ;
}

one( Infinity ) ;
one( 0 ) ;
one( -Infinity ) ;


} )

0 comments on commit 7e92ebe

Please sign in to comment.