diff --git a/tests/AEGTree/AEGTree.test.ts b/tests/AEGTree/AEGTree.test.ts index dbc0d5bf..477608aa 100644 --- a/tests/AEGTree/AEGTree.test.ts +++ b/tests/AEGTree/AEGTree.test.ts @@ -116,7 +116,7 @@ describe("AEGTree remove soliloquy:", () => { }); test("Removing a child of the tree one level deep should be successful.", () => { - tree.insert(new AtomNode("A", new Point(0, 4), 3, 3)); + tree.insert(new AtomNode("A", new Point(0, 0), 3, 3)); expect(tree.remove(new Point(2, 2))).toBeTruthy(); }); @@ -145,8 +145,8 @@ describe("AEGTree clear soliloquy:", () => { const tree2: AEGTree = new AEGTree(); - tree2.insert(new AtomNode("C", origin, 2, 2)); - tree2.insert(new AtomNode("P", new Point(origin.x + 5, origin.y + 5), 3, 3)); + tree2.insert(new AtomNode("C", origin, 1, 1)); + tree2.insert(new AtomNode("P", new Point(origin.x + 4, origin.y + 4), 1, 1)); tree2.insert(new CutNode(testEllipse)); test("AEGTree with several children should have no children after clear call.", () => { diff --git a/tests/AEGTree/AtomNode.test.ts b/tests/AEGTree/AtomNode.test.ts index af3de37f..fa7a7f27 100644 --- a/tests/AEGTree/AtomNode.test.ts +++ b/tests/AEGTree/AtomNode.test.ts @@ -8,7 +8,7 @@ import {describe, expect, test} from "vitest"; import {AtomNode} from "../../src/AEG/AtomNode"; import {Point} from "../../src/AEG/Point"; -const atom: AtomNode = new AtomNode("A", new Point(0, 10), 10, 10); +const atom: AtomNode = new AtomNode("A", new Point(0, 0), 10, 10); describe("AtomNode constructor soliloquy:", () => { const pt: Point = new Point(0, 0); @@ -32,7 +32,7 @@ describe("AtomNode constructor soliloquy:", () => { test("AtomNode construction with identifier A and Rectangle with TL vertex (0, 10) and {h, w} = 10 should produce accurate apt results.", () => { expect(atom.identifier).toBe("A"); - expect(atom.origin).toStrictEqual(new Point(0, 10)); + expect(atom.origin).toStrictEqual(new Point(0, 0)); expect(atom.width).toBe(10); expect(atom.height).toBe(10); }); diff --git a/tests/AEGTree/CutNode.test.ts b/tests/AEGTree/CutNode.test.ts index 81ba5ca9..8f7d8940 100644 --- a/tests/AEGTree/CutNode.test.ts +++ b/tests/AEGTree/CutNode.test.ts @@ -233,7 +233,7 @@ describe("CutNode remove soliloquy:", () => { }); test("Removing a child of the Sheet of Assertion should be successful.", () => { - sheetNode.child = new AtomNode("H", new Point(0, 4), 3, 3); + sheetNode.child = new AtomNode("H", new Point(0, 0), 3, 3); expect(sheetNode.remove(new Point(2, 2))).toBeTruthy(); expect(sheetNode.children.length).toBe(0); }); @@ -243,7 +243,7 @@ describe("CutNode remove soliloquy:", () => { }); test("Removing an AtomNode one level deep should be successful.", () => { - cNode.child = new AtomNode("A", new Point(4, 6), 2, 2); + cNode.child = new AtomNode("A", new Point(4, 4), 2, 2); expect(cNode.remove(testCenter)).toBeTruthy(); expect(cNode.children.length).toBe(0); }); @@ -261,7 +261,7 @@ describe("CutNode remove soliloquy:", () => { }); test("Removing a CutNode with children two cut levels deep should be successful.", () => { - const dee: AtomNode = new AtomNode("D", new Point(4, 6), 2, 2); + const dee: AtomNode = new AtomNode("D", new Point(4, 4), 2, 2); const childCut: CutNode = new CutNode(new Ellipse(testCenter, 4, 4)); childCut.child = dee; @@ -272,7 +272,7 @@ describe("CutNode remove soliloquy:", () => { }); test("Removing a CutNode with children several levels deep should be successful.", () => { - const ell: AtomNode = new AtomNode("L", new Point(4, 6), 1.5, 1.5); + const ell: AtomNode = new AtomNode("L", new Point(4, 4), 1.5, 1.5); const childCutThreeDeep: CutNode = new CutNode(new Ellipse(testCenter, 2, 2)); const childCutTwoDeep: CutNode = new CutNode(new Ellipse(testCenter, 3, 3)); const childCutOneDeep: CutNode = new CutNode(new Ellipse(testCenter, 4, 4));