public void Trace_two_words() { IEvmMemory memory = CreateEvmMemory(); memory.SaveWord(EvmMemory.WordSize, new byte[EvmMemory.WordSize]); List <string> trace = memory.GetTrace(); Assert.AreEqual(2, trace.Count); }
public void Trace_when_position_not_on_word_border() { IEvmMemory memory = CreateEvmMemory(); memory.SaveByte(EvmMemory.WordSize / 2, new byte[] { 1 }); List <string> trace = memory.GetTrace(); Assert.AreEqual(1, trace.Count); }
public void Trace_one_word() { IEvmMemory memory = CreateEvmMemory(); memory.SaveWord(0, new byte[EvmPooledMemory.WordSize]); List <string> trace = memory.GetTrace(); Assert.AreEqual(1, trace.Count); }
public void Trace_when_position_not_on_word_border() { IEvmMemory memory = CreateEvmMemory(); UInt256 dest = EvmPooledMemory.WordSize / 2; memory.SaveByte(ref dest, 1); List <string> trace = memory.GetTrace(); Assert.AreEqual(1, trace.Count); }
public void Trace_two_words() { IEvmMemory memory = CreateEvmMemory(); UInt256 dest = EvmPooledMemory.WordSize; memory.SaveWord(ref dest, new byte[EvmPooledMemory.WordSize]); List <string> trace = memory.GetTrace(); Assert.AreEqual(2, trace.Count); }