Skip to content

Commit

Permalink
test(matrices): add identity tests
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Feb 19, 2019
1 parent 6da9bb7 commit 6617a6e
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions packages/matrices/test/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
// import * as assert from "assert";
// import * as m from "../src/index";
import * as assert from "assert";
import * as m from "../src/index";
import { range } from "@thi.ng/transducers";

describe("matrices", () => {
it("tests pending");

it("identity (fixed)", () => {
assert.deepEqual(m.identity22([]), m.IDENT22, "m22");
assert.deepEqual(m.identity23([]), m.IDENT23, "m23");
assert.deepEqual(m.identity33([]), m.IDENT33, "m33");
assert.deepEqual(m.identity44([]), m.IDENT44, "m44");
});

it("identity (dyn)", () => {
assert.deepEqual(m.identity([...range(4)]), m.IDENT22, "m22");
assert.deepEqual(m.identity([...range(6)]), m.IDENT23, "m23");
assert.deepEqual(m.identity([...range(9)]), m.IDENT33, "m33");
assert.deepEqual(m.identity([...range(16)]), m.IDENT44, "m44");
});

});

0 comments on commit 6617a6e

Please sign in to comment.