'use strict';

// MODULES //

var bench = require( '@stdlib/bench' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
var pkg = require( './../package.json' ).name;
var randu = require( './../lib' );


// MAIN //

bench( pkg, function benchmark( b ) {
	var z;
	var i;

	b.tic();
	for ( i = 0; i < b.iterations; i++ ) {
		z = randu();
		if ( isnan( z ) ) {
			b.fail( 'should not return NaN' );
		}
	}
	b.toc();
	if ( isnan( z ) ) {
		b.fail( 'should not return NaN' );
	}
	b.pass( 'benchmark finished' );
	b.end();
});

@@ -522,8 +522,333 @@
 ();%0A%7D);%0A
+%0Abench( pkg+'::built-in', function benchmark( b ) %7B%0A%09var z;%0A%09var i;%0A%0A%09b.tic();%0A%09for ( i = 0; i %3C b.iterations; i++ ) %7B%0A%09%09z = Math.random();%0A%09%09if ( isnan( z ) ) %7B%0A%09%09%09b.fail( 'should not return NaN' );%0A%09%09%7D%0A%09%7D%0A%09b.toc();%0A%09if ( isnan( z ) ) %7B%0A%09%09b.fail( 'should not return NaN' );%0A%09%7D%0A%09b.pass( 'benchmark finished' );%0A%09b.end();%0A%7D);%0A

Add benchmark for built-in