Skip to content

Commit

Permalink
Tiny bit more testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Spacerat committed Feb 2, 2025
1 parent 9506dfe commit 7acbe1c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/interruptibleSort/graph.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ describe("familial connections", () => {
const result = sumFamilialConnections(g);
expect(result).toEqual(10);
});
test("full sort of four", () => {
const g: Graph = { a: ["b"], b: ["c"], c: ["d"] };
const result = sumFamilialConnections(g);
expect(result).toEqual(12);
});

test("max familial connections", () => {
expect(maxFamilialConnections(4)).toEqual(12);
expect(maxFamilialConnections(3)).toEqual(6);
expect(maxFamilialConnections(0)).toBeCloseTo(0);
});
Expand Down

0 comments on commit 7acbe1c

Please sign in to comment.