Ejemplo n.º 1
0
 public void AllocationTest()
 {
     const int memorySize = 100;
     var engine = new Engine(memorySize);
     Assert.AreEqual(engine.Get(), 0);
     for (int i = 0; i < memorySize; ++i)
     {
         engine.Forward();
         Assert.AreEqual(engine.Get(), 0);
     }
 }
Ejemplo n.º 2
0
 public void MovingTest()
 {
     const int memorySize = 100;
     var engine = new Engine(memorySize);
     engine.Add();
     for (int i = 0; i < memorySize; ++i)
     {
         engine.Forward();
     }
     Assert.AreEqual(engine.Get(), 1);
 }