Commit 6c062fff authored by Sanford Jonathan Edelist's avatar Sanford Jonathan Edelist
Browse files

Upload New File

parent 8a65e137
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
class ObjectSetTests {

    @Test
    void testObjectCreationAndComparison() {
        ObjectSet os = new ObjectSet();
        int objId1 = os.makeObject(new Point(1, 2, 3), new Point(4, 5, 6));
        int objId2 = os.makeObject(new Point(1, 2, 3), new Point(4, 5, 6));

        assertEquals(2, ObjectSet.objects.size());
        assertTrue(ObjectSet.compareObjects(objId1, objId2));
    }

    @Test
    void testObjectCombination() {
        ObjectSet os = new ObjectSet();
        int objId1 = os.makeObject(new Point(0, 0, 0));
        int objId2 = os.makeObject(new Point(1, 1, 1));
        os.combineObjects(objId1, objId2);

        assertEquals(1, ObjectSet.objects.size()); // should be combined into one
    }
}