123456789101112131415161718192021222324252627 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using NTERA.Core;
- namespace NTERA.Interpreter.Tests
- {
- public static class Common
- {
- public static void AssertLocal(Interpreter interpreter, double value)
- {
- Assert.AreEqual(value, interpreter.Variables["LOCAL"].Real);
- }
- public static Interpreter Create(string code, IConsole console = null)
- {
- Interpreter interpreter = new Interpreter(console, code);
- interpreter.Exec();
- return interpreter;
- }
- }
- }
|