Exemplo n.º 1
0
        /// <summary>
        /// Simple test for the non-interrupt version
        /// </summary>
        /// <param name="zFile"></param>
        // ReSharper disable once UnusedMember.Local
        private static void RunZFileWithoutInterrupts(string zFile)
        {
            var progId = Path.GetFileNameWithoutExtension(zFile);

            _zMachine2 = new ZMachine2(
                new UserIo(progId),
                new ConsoleFileIo(progId),
                LoggerSetup.Create <ZMachine2>()
                );
            _zMachine2.RunFile(File.OpenRead(zFile), false);

            do
            {
                var input = Console.ReadLine();
                _zMachine2.ContinueTillNextRead(input);
            } while (_zMachine2.Running);
        }
Exemplo n.º 2
0
 protected void ShouldRunToCompletion(string zMachineDataFile)
 {
     Should.NotThrow(() => _machine.RunFile(File.OpenRead(zMachineDataFile)));
 }