git.ucc.asn.au
/
ipdf
/
code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add ObjectType for Object Type
[ipdf/code.git]
/
src
/
tests
/
saveload.cpp
diff --git
a/src/tests/saveload.cpp
b/src/tests/saveload.cpp
index
a2d58cb
..
32dd1d7
100644
(file)
--- a/
src/tests/saveload.cpp
+++ b/
src/tests/saveload.cpp
@@
-2,6
+2,7
@@
#include "../document.h"
#include "../view.h"
#include "../document.h"
#include "../view.h"
+#include "../screen.h"
using namespace std;
using namespace IPDF;
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)
{
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");
}
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;
}
return 0;
}
UCC
git Repository :: git.ucc.asn.au