Beispiel #1
0
        public static void RunTest()
        {
            gxtLog log = new gxtLog();
            log.Initialize();

            gxtConsoleLogListener consoleLogger = new gxtConsoleLogListener();
            consoleLogger.Initialize();

            log.AddListener(consoleLogger);

            gxtLog.WriteLineV(gxtVerbosityLevel.INFORMATIONAL, "Circular Buffer Test");

            gxtRandom rng = new gxtRandom();

            gxtCircularBuffer<int> cbuffer = new gxtCircularBuffer<int>(6);
            for (int i = 0; i < cbuffer.Capacity; i++)
            {
                cbuffer.Enqueue(i);
            }

            for (int i = 0; i < cbuffer.Capacity / 2; i++)
            {
                cbuffer.Enqueue(i * 2);
            }

            gxtLog.WriteLineV(gxtVerbosityLevel.INFORMATIONAL, "Finished Adding Values...Popping off the values now");

            while (!cbuffer.IsEmpty)
            {
                gxtLog.WriteLineV(gxtVerbosityLevel.INFORMATIONAL, cbuffer.Dequeue());
            }
        }
Beispiel #2
0
        public static void RunTest()
        {
            gxtLog log = new gxtLog();
            log.Initialize(true, gxtVerbosityLevel.INFORMATIONAL);

            gxtConsoleLogListener console = new gxtConsoleLogListener();
            console.Initialize();

            log.AddListener(console);

            gxtLog.WriteLineV(gxtVerbosityLevel.INFORMATIONAL, "Starting hashed string test...\n");

            string a = "ccl";
            string b = "gxt";
            string c = "rit";
            string d = "hashedString";
            string e = "123abc";
            string f = "zebra";
            string g = "gazongas";
            string h = "PLAYER_TYPE";
            string i = "ENEMY_TYPE";
            string j = "0";

            gxtHashedString ha = new gxtHashedString(a);
            gxtHashedString hb = new gxtHashedString(b);
            gxtHashedString hc = new gxtHashedString(c);
            gxtHashedString hd = new gxtHashedString(d);
            gxtHashedString he = new gxtHashedString(e);
            gxtHashedString hf = new gxtHashedString(f);
            gxtHashedString hg = new gxtHashedString(g);
            gxtHashedString hh = new gxtHashedString(h);
            gxtHashedString hi = new gxtHashedString(i);
            gxtHashedString hj = new gxtHashedString(j);

            Print(ha);
            Print(hb);
            Print(hc);
            Print(hd);
            Print(he);
            Print(hf);
            Print(hg);
            Print(hh);
            Print(hi);
            Print(hj);

            bool lessThan = (ha < hb);
            gxtLog.WriteLineV(gxtVerbosityLevel.INFORMATIONAL, lessThan);
            bool eq = he.Id == gxtHashedString.Hash("123abc");
            gxtLog.WriteLineV(gxtVerbosityLevel.INFORMATIONAL, eq);

            gxtLog.WriteLineV(gxtVerbosityLevel.INFORMATIONAL, "\nFinished hashed string test...");
        }
Beispiel #3
0
        public static void RuntTest()
        {
            gxtLog log = new gxtLog();
            log.Initialize(true, gxtVerbosityLevel.INFORMATIONAL);

            gxtConsoleLogListener console = new gxtConsoleLogListener();
            console.Initialize();

            log.AddListener(console);

            gxtLog.WriteLineV(gxtVerbosityLevel.INFORMATIONAL, "starting config test...");

            gxtINIFile file = new gxtINIFile();
            file.Initialize();
            file.Read("gxt_default.ini");
            gxtLog.WriteLineV(gxtVerbosityLevel.WARNING, file.DebugTrace());
        }
Beispiel #4
0
        public static void RunTest()
        {
            gxtLog log = new gxtLog();
            //gxtLog log = new gxtLog();
            //gxtLog.Singleton.Enabled;
            gxtConsoleLogListener consolelogger = new gxtConsoleLogListener();
            log.Initialize();
            consolelogger.Initialize();
            log.AddListener(consolelogger);
            gxtHTMLLogListener htmllogger = new gxtHTMLLogListener();
            htmllogger.Initialize();
            log.AddListener(htmllogger);
            //log.Initialize();
            //log.AddListener(consolelogger);

            gxtGamepadManager manager;
            //gxtGamepadManager.Singleton.GetGamepad(Microsoft.Xna.Framework.PlayerIndex.One);
            manager = new gxtGamepadManager();
            gxtGamepadManager manager2;
            manager2 = new gxtGamepadManager();
        }