X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Ftests%2Fsaveload.cpp;h=32dd1d7d7a77334fe22882913826a444923dbbf1;hp=a2d58cb9299abee98a7d3f7b4d967524d5e253fb;hb=901ea3355265e7f413674a62f7c29806ae35a565;hpb=428f1eb86a616d95dbb72ff08a3d09771d5c47e6;ds=sidebyside diff --git a/src/tests/saveload.cpp b/src/tests/saveload.cpp index a2d58cb..32dd1d7 100644 --- a/src/tests/saveload.cpp +++ b/src/tests/saveload.cpp @@ -2,6 +2,7 @@ #include "../document.h" #include "../view.h" +#include "../screen.h" using namespace std; using namespace IPDF; @@ -14,7 +15,7 @@ int main(int argc, char ** argv) Document doc; for (unsigned id = 0; id < test_objects; ++id) { - doc.Add(Random(), Random(), Random(), Random()); + doc.Add((ObjectType)(rand() % 2), Rect(Random(), Random(), Random(), Random())); } doc.Save("test.ipdf"); @@ -28,5 +29,14 @@ int main(int argc, char ** argv) } + View view(doc); + Screen scr; + + while (scr.PumpEvents()) + { + view.Render(); + scr.Present(); + } + return 0; }