mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
formatting
This commit is contained in:
parent
a4f78bc66f
commit
a9d4e52128
4 changed files with 17 additions and 18 deletions
|
@ -215,7 +215,7 @@ vector<wstring> UnitConverter::StringToVector(const wstring& w, const wchar_t* d
|
|||
}
|
||||
return serializedTokens;
|
||||
}
|
||||
wstring UnitConverter::UnitToString(const Unit& u, const wchar_t * delimiter)
|
||||
wstring UnitConverter::UnitToString(const Unit& u, const wchar_t* delimiter)
|
||||
{
|
||||
wstringstream out(wstringstream::out);
|
||||
out << Quote(std::to_wstring(u.id)) << delimiter << Quote(u.name) << delimiter << Quote(u.abbreviation) << delimiter
|
||||
|
|
|
@ -1152,7 +1152,7 @@ void StandardCalculatorViewModel::OnMemoryClear(_In_ Object ^ memoryItemPosition
|
|||
}
|
||||
}
|
||||
|
||||
void StandardCalculatorViewModel::OnPropertyChanged(String^ propertyname)
|
||||
void StandardCalculatorViewModel::OnPropertyChanged(String ^ propertyname)
|
||||
{
|
||||
if (propertyname == IsScientificPropertyName)
|
||||
{
|
||||
|
|
|
@ -833,22 +833,22 @@ TEST_METHOD(TestSupplementaryResultsWhimsicalUnits)
|
|||
suggestedList.push_back(tuple<wstring, UCM::Unit>(L"", unitWhimSubsequent));
|
||||
suggestedList.push_back(tuple<wstring, UCM::Unit>(L"", unit));
|
||||
|
||||
vm.UpdateSupplementaryResults(suggestedList);
|
||||
WaitForSingleObjectEx(GetCurrentThread(), 1100, FALSE);
|
||||
VERIFY_ARE_EQUAL((UINT)6, vm.SupplementaryResults->Size);
|
||||
while (vm.SupplementaryResults->Size > 1)
|
||||
{
|
||||
VERIFY_IS_FALSE(vm.SupplementaryResults->GetAt(0)->IsWhimsical());
|
||||
vm.SupplementaryResults->RemoveAt(0);
|
||||
}
|
||||
// Last item
|
||||
VERIFY_IS_TRUE(vm.SupplementaryResults->GetAt(0)->Unit->GetModelUnit() == UNITWHIMSY);
|
||||
}
|
||||
vm.UpdateSupplementaryResults(suggestedList);
|
||||
WaitForSingleObjectEx(GetCurrentThread(), 1100, FALSE);
|
||||
VERIFY_ARE_EQUAL((UINT)6, vm.SupplementaryResults->Size);
|
||||
while (vm.SupplementaryResults->Size > 1)
|
||||
{
|
||||
VERIFY_IS_FALSE(vm.SupplementaryResults->GetAt(0)->IsWhimsical());
|
||||
vm.SupplementaryResults->RemoveAt(0);
|
||||
}
|
||||
// Last item
|
||||
VERIFY_IS_TRUE(vm.SupplementaryResults->GetAt(0)->Unit->GetModelUnit() == UNITWHIMSY);
|
||||
}
|
||||
|
||||
TEST_METHOD(TestOnPaste)
|
||||
{
|
||||
shared_ptr<UnitConverterMock> mock = make_shared<UnitConverterMock>();
|
||||
VM::UnitConverterViewModel vm(mock);
|
||||
TEST_METHOD(TestOnPaste)
|
||||
{
|
||||
shared_ptr<UnitConverterMock> mock = make_shared<UnitConverterMock>();
|
||||
VM::UnitConverterViewModel vm(mock);
|
||||
|
||||
// Call count is being set to 1 because we send 'CE' command as the first call in OnPaste method of the ViewModel
|
||||
UINT callCount = 1;
|
||||
|
|
|
@ -60,7 +60,6 @@ namespace CalculatorUnitTests
|
|||
UINT m_sendCommandCallCount;
|
||||
UINT m_setVMCallbackCallCount;
|
||||
|
||||
|
||||
UCM::Category m_curCategory;
|
||||
UCM::Unit m_curFrom;
|
||||
UCM::Unit m_curTo;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue