public void Ejemplo14Test() { try { string text = File.ReadAllText("Ejemplo14.txt"); AssemblyInterpreter interpreter = new AssemblyInterpreter(); interpreter.Interpret(text); Assert.IsTrue(true); } catch { Assert.Fail("Hubo un error en ejemplo 14"); } }
public void EjemploPromedio() { try { string text = File.ReadAllText("promedio.txt"); AssemblyInterpreter interpreter = new AssemblyInterpreter(); interpreter.Interpret(text); Assert.IsTrue(true); } catch { Assert.Fail("Hubo un error en promedio"); } }
public void Ejemplo1Test() { try { string text = File.ReadAllText("Ejemplo1.txt"); AssemblyInterpreter interpreter = new AssemblyInterpreter(); interpreter.Interpret(text); Assert.IsTrue(true); } catch { Assert.Fail("Hubo un error en ejemplo 1"); } }
static void Main(string[] args) { AssemblyInterpreter interpreter = new AssemblyInterpreter(); if (args.Length == 0) { Console.WriteLine("Debes arrastrar un archivo al .exe"); Console.ReadKey(); return; } string text = File.ReadAllText(args[0]); //string text = File.ReadAllText("./MegaMental.txt"); interpreter.Interpret(text); string output = DocumentBuilder.GenerateFinalDocument(interpreter.Instructions); File.WriteAllText(@"./output.txt", output); }