Skip to content

Commit

Permalink
[TESTS] test method existence on ctors.
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Jun 1, 2015
1 parent 7e61875 commit 91f84e1
Show file tree
Hide file tree
Showing 12 changed files with 8 additions and 12 deletions.
2 changes: 0 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@ TODO
9. sget.raw
10. sset
11. sset.raw
12. ctor
13. ctor.raw

4 changes: 4 additions & 0 deletions test/test.ctor.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ describe( 'Matrix', function tests() {
assert.isFunction( mat.sget );
});

it( 'should create a Matrix having a custom toString method', function test() {
assert.isFunction( mat.toString );
});

it( 'should create a Matrix having a protected dtype property', function test() {
assert.isTrue( mat.hasOwnProperty( 'dtype' ) );
assert.isString( mat.dtype );
Expand Down
4 changes: 4 additions & 0 deletions test/test.ctor.raw.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ describe( 'Matrix.raw', function tests() {
assert.isFunction( mat.sget );
});

it( 'should create a Matrix having a custom toString method', function test() {
assert.isFunction( mat.toString );
});

it( 'should create a Matrix having a dtype property', function test() {
assert.isTrue( mat.hasOwnProperty( 'dtype' ) );
assert.isString( mat.dtype );
Expand Down
1 change: 0 additions & 1 deletion test/test.get.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe( 'matrix#get', function tests() {

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

it( 'should throw an error if provided a row index which is not a nonnegative integer', function test() {
Expand Down
1 change: 0 additions & 1 deletion test/test.get.raw.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe( 'matrix.raw#get', function tests() {

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

it( 'should return a Matrix element', function test() {
Expand Down
1 change: 0 additions & 1 deletion test/test.iget.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe( 'matrix#iget', function tests() {

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

it( 'should throw an error if not provided an integer', function test() {
Expand Down
1 change: 0 additions & 1 deletion test/test.iget.raw.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe( 'matrix.raw#iget', function tests() {

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

it( 'should return a Matrix element', function test() {
Expand Down
1 change: 0 additions & 1 deletion test/test.iset.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe( 'matrix#iset', function tests() {

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

it( 'should throw an error if not provided an integer', function test() {
Expand Down
1 change: 0 additions & 1 deletion test/test.iset.raw.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe( 'matrix.raw#iset', function tests() {

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

it( 'should set a Matrix element', function test() {
Expand Down
1 change: 0 additions & 1 deletion test/test.set.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe( 'matrix#set', function tests() {

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

it( 'should throw an error if provided a row index which is not a nonnegative integer', function test() {
Expand Down
1 change: 0 additions & 1 deletion test/test.set.raw.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe( 'matrix.raw#set', function tests() {

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

it( 'should set a Matrix element', function test() {
Expand Down
2 changes: 0 additions & 2 deletions test/test.toString.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ describe( 'matrix#toString', function tests() {

it( 'should export a function', function test() {
expect( toString ).to.be.a( 'function' );
expect( matrix( [10,10] ).toString ).to.be.a( 'function' );
expect( matrix.raw( [10,10] ).toString ).to.be.a( 'function' );
});

it( 'should convert a Matrix instance to a string', function test() {
Expand Down

0 comments on commit 91f84e1

Please sign in to comment.