@@ -1957,16 +1957,16 @@ TEST_CLASS(MemoryViewerViewModel_Tests)
19571957 Assert::AreEqual ({0x0U }, viewer.GetAddress ());
19581958 }
19591959
1960- TEST_METHOD (TestOnShiftClickSixTeenBit )
1960+ TEST_METHOD (TestOnShiftClickSixteenBit )
19611961 {
19621962 ra::data::context::mocks::MockConsoleContext mockConsole (PlayStation, L" Playstation" );
19631963
19641964 MemoryViewerViewModelHarness viewer;
19651965 viewer.InitializeMemory (512 ); // 32 rows of 16 bytes
19661966 viewer.SetSize (MemSize::SixteenBit);
1967- viewer.mockEmulatorContext .WriteMemory (0U , MemSize::SixteenBit, 0x20 );
1968- viewer.mockEmulatorContext .WriteMemory (2U , MemSize::SixteenBit, 0xff );
1969- viewer.mockEmulatorContext .WriteMemory (4U , MemSize::SixteenBit, 0xffff );
1967+ viewer.mockEmulatorContext .WriteMemory (0U , MemSize::SixteenBit, 0x0020 );
1968+ viewer.mockEmulatorContext .WriteMemory (2U , MemSize::SixteenBit, 0x0140 );
1969+ viewer.mockEmulatorContext .WriteMemory (4U , MemSize::SixteenBit, 0xFFFF );
19701970
19711971 Assert::AreEqual (MemSize::SixteenBit, viewer.GetSize ());
19721972 Assert::AreEqual ({0U }, viewer.GetAddress ());
@@ -1978,17 +1978,20 @@ TEST_CLASS(MemoryViewerViewModel_Tests)
19781978 Assert::AreEqual ({0x0U }, viewer.GetAddress ());
19791979
19801980 // If not fixed address and Shift click on the first word containing 0x20 should lead to address 0x20
1981+ viewer.SetAddress (0 );
19811982 viewer.SetAddressFixed (false );
19821983 viewer.OnShiftClick (10 * CHAR_WIDTH, CHAR_HEIGHT + 4 );
19831984 Assert::AreEqual ({0x20U }, viewer.GetAddress ());
19841985
1985- // Shift click on the second word containing 0x40 should lead to address 0xFF
1986+ // Shift click on the second word containing 0x0140 should lead to address 0x0140
1987+ viewer.SetAddress (0 );
19861988 viewer.OnShiftClick (15 * CHAR_WIDTH, CHAR_HEIGHT + 4 );
1987- Assert::AreEqual ({0xFFU }, viewer.GetAddress ());
1989+ Assert::AreEqual ({0x0140U }, viewer.GetAddress ());
19881990
19891991 // Shift click on the third word containing 0xFFFF should lead to address 0x1FF as 0xFFFF is bigger than the
19901992 // last address in memory
1991- viewer.OnShiftClick (19 * CHAR_WIDTH, CHAR_HEIGHT + 4 );
1993+ viewer.SetAddress (0 );
1994+ viewer.OnShiftClick (20 * CHAR_WIDTH, CHAR_HEIGHT + 4 );
19921995 Assert::AreEqual ({0x1FFU }, viewer.GetAddress ());
19931996 }
19941997};
0 commit comments