|
1 | 1 | import { Matrix } from './matrix';
|
2 | 2 |
|
3 | 3 | describe('Matrix', () => {
|
4 | | - test('extract row from one number matrix', () => { |
| 4 | + test('extract row from one number matrix', () => { |
5 | 5 | expect(new Matrix('1').rows[0]).toEqual([1]);
|
6 | 6 | });
|
7 | 7 |
|
8 | | - xtest('can extract row', () => { |
| 8 | + test('can extract row', () => { |
9 | 9 | expect(new Matrix('1 2\n3 4').rows[1]).toEqual([3, 4]);
|
10 | 10 | });
|
11 | 11 |
|
12 | | - xtest('extract row where numbers have different widths', () => { |
| 12 | + test('extract row where numbers have different widths', () => { |
13 | 13 | expect(new Matrix('1 2\n10 20').rows[1]).toEqual([10, 20]);
|
14 | 14 | });
|
15 | 15 |
|
16 | | - xtest('can extract row from non-square matrix with no corresponding column', () => { |
| 16 | + test('can extract row from non-square matrix with no corresponding column', () => { |
17 | 17 | expect(new Matrix('1 2 3\n4 5 6\n7 8 9\n8 7 6').rows[3]).toEqual([8, 7, 6]);
|
18 | 18 | });
|
19 | 19 |
|
20 | | - xtest('extract column from one number matrix', () => { |
| 20 | + test('extract column from one number matrix', () => { |
21 | 21 | expect(new Matrix('1').columns[0]).toEqual([1]);
|
22 | 22 | });
|
23 | 23 |
|
24 | | - xtest('can extract column', () => { |
| 24 | + test('can extract column', () => { |
25 | 25 | expect(new Matrix('1 2 3\n4 5 6\n7 8 9').columns[2]).toEqual([3, 6, 9]);
|
26 | 26 | });
|
27 | 27 |
|
28 | | - xtest('can extract column from non-square matrix with no corresponding row', () => { |
| 28 | + test('can extract column from non-square matrix with no corresponding row', () => { |
29 | 29 | expect(new Matrix('1 2 3 4\n5 6 7 8\n9 8 7 6').columns[3]).toEqual([4, 8, 6]);
|
30 | 30 | });
|
31 | 31 |
|
32 | | - xtest('can extract column from non-square matrix with more columns than rows', () => { |
| 32 | + test('can extract column from non-square matrix with more columns than rows', () => { |
33 | 33 | expect(new Matrix('1 2 3\n4 5 6').columns[2]).toEqual([3, 6]);
|
34 | 34 | });
|
35 | 35 |
|
36 | | - xtest('extract column where numbers have different widths', () => { |
| 36 | + test('extract column where numbers have different widths', () => { |
37 | 37 | expect(new Matrix('89 1903 3\n18 3 1\n9 4 800').columns[1]).toEqual([1903, 3, 4]);
|
38 | 38 | });
|
39 | 39 | });
|
0 commit comments