Exemple #1
0
        public static void TestRomWithSerial(FileInfo romPath)
        {
            Console.Out.WriteLine($"\n### Running test rom {romPath} ###");
            var    runner = new SerialTestRunner(romPath, Console.Out);
            string result = runner.RunTest();

            Assert.Contains("Passed", result);
        }
        public TestResult RunTest()
        {
            int status  = 0x80;
            int divider = 0;

            while (status == 0x80 && !SerialTestRunner.IsInfiniteLoop(gb))
            {
                gb.Tick();
                if (++divider >= (gb.SpeedMode.Mode == 2 ? 1 : 4))
                {
                    status  = GetTestResult(gb);
                    divider = 0;
                }
            }

            return(new TestResult(status, text.ToString()));
        }