public void TestMethodBackward() { List<int> testtape = new List<int> { 0 }; BrainMessInterpreter obj = new BrainMessInterpreter { tape = testtape, tapeHead =1 }; obj.Backward(); Assert.AreEqual(obj.tapeHead, 0); }
public void TestMethodIncrement() { List<int> testtape= new List<int> { 0 }; const int testtapeHead = 0; BrainMessInterpreter obj= new BrainMessInterpreter {tape = testtape,tapeHead = testtapeHead}; obj.Increment(); Assert.AreEqual( testtape[0],1); }
public void TestMethodForward() { List<int> testtape = new List<int> { 0 }; const int testtapeHead = 0; BrainMessInterpreter obj = new BrainMessInterpreter { tape = testtape, tapeHead = testtapeHead }; obj.Forward(); Assert.AreEqual(testtape.Count, 2); }
static void Main() { string phrase = Console.ReadLine(); BrainMessInterpreter objbrainmess = new BrainMessInterpreter(); objbrainmess.Interprate(phrase); Console.ReadLine(); }