var assert = require('chai').assert;
var GOL = require('../lib/gol-engine.js');

describe('Test GOL constructor & methods', function() {
  it('Test Constructor, getCols() & getRows()', function() {
    var dims = [[10, 20], [15, 25], [1, 1]];
    dims.forEach(function(dim, index) {
      var gol = new GOL({cols: dim[0], rows: dim[1]});
      assert(dim[0] === gol.getCols(), 'Return value of gol.getCols() is not correct');
      assert(dim[1] === gol.getRows(), 'Return value of gol.getRows() is not correct');
    });
  });
});
@@ -520,12 +520,484 @@
 );%0A  %7D);
+%0A%0A  it('Test Constructor with a matrix as the parameter', function() %7B%0A    var mat = %5B%0A      %5B0, 0, 0, 0, 0, 0, 0%5D,%0A      %5B0, 0, 0, 0, 0, 1, 0%5D,%0A      %5B0, 0, 1, 0, 0, 1, 0%5D,%0A      %5B0, 0, 0, 1, 1, 1, 0%5D,%0A      %5B0, 0, 0, 0, 0, 0, 0%5D,%0A    %5D;%0A%0A    var gol = new GOL(%7B matrix: mat %7D);%0A    assert(mat%5B0%5D.length === gol.getCols(), 'Return value of gol.getCols() is not correct');%0A    assert(mat.length === gol.getRows(), 'Return value of gol.getRows() is not correct');    %0A  %7D);
 %0A%7D);

Test case for Constructor use a matrix as the parameter