3 unsigned test_objects = 4;
7 unlink("saveload.ipdf");
10 int main(int argc, char ** argv)
12 Debug("TEST STARTING %s", argv[0]);
16 for (unsigned id = 0; id < test_objects; ++id)
18 doc.Add((ObjectType)(rand() % 2), Rect(Random(), Random(), Random(), Random()));
20 doc.Save("saveload.ipdf");
22 Document equ("saveload.ipdf");
23 //doc.Add(Random(), Random(), Random(), Random());
24 if (doc != equ || equ != doc)
26 Error("Loaded document is not equivelant to saved document!");
27 doc.DebugDumpObjects();
28 equ.DebugDumpObjects();
32 doc.Add((ObjectType)(0), Rect());
35 Error("Modified document is still equilant to saved document!?");
36 doc.DebugDumpObjects();
37 equ.DebugDumpObjects();
40 Debug("TEST SUCCESSFUL");