Пример #1
0
		public void Ram_Loads_Program_Correctly()
		{
			var ram = new Ram(0x05);
			ram.LoadProgram(0x04,new byte[] { 0xab } );

			Assert.That(ram.ReadValue(0x04), Is.EqualTo(0xab));
		}
Пример #2
0
// ReSharper disable InconsistentNaming
		public void Ram_Initalizes_To_Correct_Values()
		{
			var ram = new Ram(0xffff);
			
			for (int i = 0; i < 0xffff; i++)
			{
				Assert.That(ram.ReadValue(i), Is.EqualTo(0x00));
			}
		}
Пример #3
0
		public void Ram_Writes_Correct_Values()
		{
			var ram = new Ram(0xffff);

			for (int i = 0; i < 0xffff; i++)
			{
				ram.WriteValue(i,0xff);
				Assert.That(ram.ReadValue(i), Is.EqualTo(0xff));
			}
		}