From 8c80d85f8f61f649767cc936cccbc44572d9693d Mon Sep 17 00:00:00 2001 From: pixel Date: Wed, 10 Dec 2003 22:00:18 +0000 Subject: Changed the test system a bit... --- src/test.cc | 66 +++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 15 deletions(-) (limited to 'src/test.cc') 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 #include #include +#include #include #include #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; -- cgit v1.2.3