public void ZeroMemoryTest() { MemoryPage m = new MemoryPage(0, 0, "Unit Test", -1); int count = 0; m.ZeroMemory(); for (int i = 0; i < MemoryPage.PAGE_SIZE / 8; i++) { for (int j = 0; j < 8; j++) { if (m.Data[i].GetByte(j) == 0x00) { count++; } } } Assert.IsTrue(count == 256); }
private void btn_Reset_All_Click(object sender, RoutedEventArgs e) { currentPage.ZeroMemory(); UpdateData(); }