'use strict';

// BEGIN-EXISTING-TESTS
// TODO Convert to Mocha framework

var i;
var assert = require( 'chai' ).assert;
var randMod = require( '../rando' );

var toyRandFunc = randMod.makeRandWithAM(3,31,9);
var toyRandList = randMod.genRandList( 30, toyRandFunc );
var toyRandExpectedList = 
	[27,19,26,16,17,20,29,25,13,8,24,10,30,28,22,
	4,12,5,15,14,11,2,6,18,23,7,21,1,3,9];

var randFunc = randMod.makeRand(1);
var randList = randMod.genRandList(10000, randFunc);
randList.reverse();
var randList16 = randList.slice(0,16);

var expectedResult = [1043618065,
1484786315, 925166085, 1614852353, 721631166,
173942219, 1229443779, 789328014, 570809709, 
1760109362, 270600523, 2108528931, 16480421, 
519782231, 162430624, 372212905];

//for( i = 0; i < 16; i++) {
//	console.log( i + ') ' + randList[ i ] );
//}
//console.log(randList16);

// console.log('toyRandList = ' + toyRandList);
// console.log('toyRandExpectedList = ' + toyRandExpectedList);
assert.deepEqual(randList16, expectedResult);

// END-EXISTING-TESTS




// MODULES //

var // Expectation library:
	chai = require( 'chai' ),

	// Module to be tested:
	lib = require( './../lib' );


// VARIABLES //

var expect = chai.expect,
	assert = chai.assert;


// TESTS //

describe( 'compute-htfrand', function tests() {

	it( 'should export a function', function test() {
		expect( lib ).to.be.a( 'function' );
	});

	it( 'should do something' );

});

@@ -12,74 +12,8 @@
 ';%0A%0A
-// BEGIN-EXISTING-TESTS%0A// TODO Convert to Mocha framework%0A%0Avar i;
 %0Avar
@@ -36,22 +36,17 @@
 e( '
-chai' ).
 assert
+' )
 ;%0Ava
@@ -74,13 +74,20 @@
 '../
-rando
+lib/index.js
 ' );
@@ -667,16 +667,23 @@
 2905%5D;%0A%0A
+var i;%0A
 //for( i
@@ -891,16 +891,19 @@
 dList);%0A
+%0A//
 assert.d
@@ -945,34 +945,379 @@
 );%0A%0A
-// END-EXISTING-TESTS
+describe( 'htfrand', function() %7B%0A%09describe( 'randList16 test', function() %7B%0A%09%09it( 'should be equal to expectedResult', function() %7B%0A%09%09%09assert.deepEqual(randList16, expectedResult);%0A%09%09%7D)%0A%09%7D)%0A%09describe('toyRandList test', function() %7B%0A%09%09it( 'should be equal to toyRandExpectedList', function() %7B%0A%09%09%09assert.deepEqual( toyRandList, toyRandExpectedList );%0A%09%09%7D)%0A%09%7D)%0A%7D)%0A%0A
 %0A%0A%0A%0A%0A
+%0A
 // M
@@ -1323,24 +1323,26 @@
 MODULES //%0A%0A
+//
 var // Expec
@@ -1357,16 +1357,18 @@
 ibrary:%0A
+//
 %09chai = 
@@ -1412,16 +1412,18 @@
 tested:%0A
+//
 %09lib = r
@@ -1463,16 +1463,18 @@
 LES //%0A%0A
+//
 var expe
@@ -1491,16 +1491,18 @@
 expect,%0A
+//
 %09assert 
@@ -1531,16 +1531,19 @@
 STS //%0A%0A
+/*%0A
 describe
@@ -1710,12 +1710,16 @@
 ng' );%0A%0A%7D);%0A
+*/%0A%0A

Revise existing 2 tests so they run with mocha and with make test.