summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpixel <pixel>2003-12-10 22:00:18 +0000
committerpixel <pixel>2003-12-10 22:00:18 +0000
commit8c80d85f8f61f649767cc936cccbc44572d9693d (patch)
tree51d61aace2e840e5c161a0d6af5ca6f4bddbc705
parent9a7f6c4a58e63ecc415dc14eebd208a9b4e5cebe (diff)
Changed the test system a bit...
-rw-r--r--src/test.cc66
1 files changed, 51 insertions, 15 deletions
diff --git a/src/test.cc b/src/test.cc
index 9a022c4..16f6ed4 100644
--- a/src/test.cc
+++ b/src/test.cc
@@ -16,6 +16,7 @@
#include <Main.h>
#include <Input.h>
#include <Output.h>
+#include <Buffer.h>
#include <BLua.h>
#include <LuaHandle.h>
#include "glbase.h"
@@ -511,10 +512,60 @@ virtual int startup() throw (GeneralException) {
int sx1, sx2, sy1, sy2;
double t = 0;
verbosity = M_INFO;
+ String str;
+ Buffer * b = new Buffer(true);
+ (*b) << "Blah! (1)\n";
+ (*b) << "Blah! (2)\n";
+ (*b) << "Blah! (3)\n";
+
+ (*b) >> str;
+ printm(M_INFO, "Read `" + str + "'\n");
+
+ (*b) << "Blah! (4)\n";
+
+ (*b) >> str;
+ printm(M_INFO, "Read `" + str + "'\n");
+ (*b) >> str;
+ printm(M_INFO, "Read `" + str + "'\n");
+ (*b) >> str;
+ printm(M_INFO, "Read `" + str + "'\n");
+
+ (*b)[10000] = 32;
+
+ printm(M_INFO, "Size = %i\n", b->GetSize());
+
+ b->seek(10000);
+ printm(M_INFO, "Read %i\n", b->readU8());
+
+ Lua * l = new Lua();
+ LuaInput::pushconstruct(l);
+ LuaOutput::pushconstruct(l);
+ LuaBuffer::pushconstruct(l);
+ l->open_math();
+ l->declarefunc("print", myprint);
+#if 1
+ l->load(&Input("particules.lua"), false);
+ l->dump(&Output("particules.out"));
+ l->call();
+#else
+ l->load(&Input("particules.out"));
+#endif
+ l->call("testing");
+ delete l;
+
new Archive("datas.paq");
// bdlload("cl.bdl");
+ Input * t1;
+ Output * t2;
+
+ t1 = new Input("font.bin");
+ t2 = new Output("dump/font.bin");
+ copy(t1, t2);
+ delete(t1);
+ delete(t2);
+
#if 1
mogltk::base * gl = new mogltk::glbase();
mogltk::shape * sh = new mogltk::glshape();
@@ -536,21 +587,6 @@ virtual int startup() throw (GeneralException) {
mogltk::texture * mytex = new mogltk::texture(&Input("pattern6.tex"), true);
- Lua * l = new Lua();
- LuaInput::pushconstruct(l);
- LuaOutput::pushconstruct(l);
- l->open_math();
- l->declarefunc("print", myprint);
-#if 1
- l->load(&Input("particules.lua"), false);
-// l->dump(&Output("particules.out"));
- l->call();
-#else
- l->load(&Input("particules.out"));
-#endif
- l->call("testing");
- delete l;
-
Color AlphaBlue(AQUA);
AlphaBlue.A = 50;