mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-16 02:02:51 -07:00
Use only NumberBase to represent radix in CalcViewModel (#797)
This commit is contained in:
parent
b9b0e068cd
commit
1380c7ed83
8 changed files with 46 additions and 54 deletions
|
@ -891,13 +891,13 @@ namespace CalculatorUnitTests
|
|||
};
|
||||
ValidateViewModelByCommands(m_viewModel, items, true);
|
||||
m_viewModel->OnMemoryButtonPressed();
|
||||
m_viewModel->SwitchProgrammerModeBase(RADIX_TYPE::OCT_RADIX);
|
||||
m_viewModel->SwitchProgrammerModeBase(NumberBase::OctBase);
|
||||
MemoryItemViewModel ^ memorySlotOct = (MemoryItemViewModel ^) m_viewModel->MemorizedNumbers->GetAt(0);
|
||||
VERIFY_ARE_EQUAL(Platform::StringReference(L"377"), Utils::GetStringValue(memorySlotOct->Value));
|
||||
m_viewModel->SwitchProgrammerModeBase(RADIX_TYPE::DEC_RADIX);
|
||||
m_viewModel->SwitchProgrammerModeBase(NumberBase::DecBase);
|
||||
MemoryItemViewModel ^ memorySlotDec = (MemoryItemViewModel ^) m_viewModel->MemorizedNumbers->GetAt(0);
|
||||
VERIFY_ARE_EQUAL(Platform::StringReference(L"255"), Utils::GetStringValue(memorySlotDec->Value));
|
||||
m_viewModel->SwitchProgrammerModeBase(RADIX_TYPE::BIN_RADIX);
|
||||
m_viewModel->SwitchProgrammerModeBase(NumberBase::BinBase);
|
||||
MemoryItemViewModel ^ memorySlotBin = (MemoryItemViewModel ^) m_viewModel->MemorizedNumbers->GetAt(0);
|
||||
VERIFY_ARE_EQUAL(Platform::StringReference(L"1111 1111"), Utils::GetStringValue(memorySlotBin->Value));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue