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");
     }
 }
示例#2
0
 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");
     }
 }
示例#3
0
 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");
     }
 }
示例#4
0
        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);
        }
 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");
     }
 }