Spelling (#135)
This commit is contained in:
parent
07f4cc1926
commit
84941c698e
@ -124,7 +124,7 @@ Steps:
|
|||||||
m. “( )" Parenthesis
|
m. “( )" Parenthesis
|
||||||
|
|
||||||
|
|
||||||
**All Calulators Test: Verify memory functions**
|
**All Calculators Test: Verify memory functions**
|
||||||
Steps:
|
Steps:
|
||||||
1. Launch the "Calculator" app.
|
1. Launch the "Calculator" app.
|
||||||
2. Navigate to "Standard" Calculator.
|
2. Navigate to "Standard" Calculator.
|
||||||
|
@ -20,7 +20,7 @@ public static class CalculatorAppLauncher
|
|||||||
{
|
{
|
||||||
public const string CoreWindowClassName = "Windows.UI.Core.CoreWindow";
|
public const string CoreWindowClassName = "Windows.UI.Core.CoreWindow";
|
||||||
|
|
||||||
// This doesn't actually work right now becaue popup will disappear
|
// This doesn't actually work right now because popup will disappear
|
||||||
// Bug 13713223: ContentDialog/Popup does not show up in the UIA tree when Windows.Current.Content has an AutomationName set.
|
// Bug 13713223: ContentDialog/Popup does not show up in the UIA tree when Windows.Current.Content has an AutomationName set.
|
||||||
// public static readonly UICondition TopLevelWindowUICondition = UICondition.CreateFromId(Constants.TopLevelWindowAutomationId);
|
// public static readonly UICondition TopLevelWindowUICondition = UICondition.CreateFromId(Constants.TopLevelWindowAutomationId);
|
||||||
public static readonly UICondition CoreWindowUICondition = UICondition.CreateFromClassName(CoreWindowClassName)
|
public static readonly UICondition CoreWindowUICondition = UICondition.CreateFromClassName(CoreWindowClassName)
|
||||||
|
@ -36,6 +36,6 @@ public class PerfConstants
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// These are uses with the DataSource test property to specify iteration info.
|
/// These are uses with the DataSource test property to specify iteration info.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string AppLifecycleInterationsSource = "Table:" + ConfigDirectory + "AppLifecycle.Iterations.xml#PerformanceConfigurations";
|
public const string AppLifecycleIterationsSource = "Table:" + ConfigDirectory + "AppLifecycle.Iterations.xml#PerformanceConfigurations";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file defines a table of preformance configuration for use with
|
This file defines a table of performance configuration for use with
|
||||||
TAEF Table Based Data-driven Testing.
|
TAEF Table Based Data-driven Testing.
|
||||||
|
|
||||||
This table specifies we will run the test three times (each iteration has a
|
This table specifies we will run the test three times (each iteration has a
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
<Buffers Value="15" />
|
<Buffers Value="15" />
|
||||||
</EventCollector>
|
</EventCollector>
|
||||||
|
|
||||||
<EventCollector Id="EC_Responsiveness.HighCost.Verbose" Name="User Session Logger Higcost Verbose">
|
<EventCollector Id="EC_Responsiveness.HighCost.Verbose" Name="User Session Logger HighCost Verbose">
|
||||||
<BufferSize Value="1024" />
|
<BufferSize Value="1024" />
|
||||||
<Buffers Value="3" PercentageOfTotalMemory="true" MaximumBufferSpace="60" />
|
<Buffers Value="3" PercentageOfTotalMemory="true" MaximumBufferSpace="60" />
|
||||||
</EventCollector>
|
</EventCollector>
|
||||||
|
@ -34,7 +34,7 @@ public void MethodCleanup()
|
|||||||
/// The test launches the application, suspend and resumes it and then terminates the app.
|
/// The test launches the application, suspend and resumes it and then terminates the app.
|
||||||
///
|
///
|
||||||
/// A TAEF data source is used to specify the Windows Performance Recorder profile and
|
/// A TAEF data source is used to specify the Windows Performance Recorder profile and
|
||||||
/// regions of interest file to use and defines threee different configurations to execute this test with.
|
/// regions of interest file to use and defines three different configurations to execute this test with.
|
||||||
/// Cold: The initial run to get dlls loaded into memory and to execute any first-run app logic.
|
/// Cold: The initial run to get dlls loaded into memory and to execute any first-run app logic.
|
||||||
/// Warm: The run that will produce consistent results and that would be used for measures.
|
/// Warm: The run that will produce consistent results and that would be used for measures.
|
||||||
/// Memory: A run that is focused on collecting more info on allocations.
|
/// Memory: A run that is focused on collecting more info on allocations.
|
||||||
@ -42,7 +42,7 @@ public void MethodCleanup()
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
[TestProperty("RunAs", "User")]
|
[TestProperty("RunAs", "User")]
|
||||||
[TestProperty("Category", "Performance")]
|
[TestProperty("Category", "Performance")]
|
||||||
[TestProperty(WinperfConstants.DataSource, PerfConstants.AppLifecycleInterationsSource)]
|
[TestProperty(WinperfConstants.DataSource, PerfConstants.AppLifecycleIterationsSource)]
|
||||||
public void AppLifecycleTest()
|
public void AppLifecycleTest()
|
||||||
{
|
{
|
||||||
AppLifecycle.Run(Constants.PackageAppUserModelId);
|
AppLifecycle.Run(Constants.PackageAppUserModelId);
|
||||||
|
@ -136,7 +136,7 @@ void CHistoryCollector::ChangeLastBinOp(int nOpCode, bool fPrecInvToHigher)
|
|||||||
TruncateEquationSzFromIch(m_lastBinOpStartIndex);
|
TruncateEquationSzFromIch(m_lastBinOpStartIndex);
|
||||||
if (fPrecInvToHigher)
|
if (fPrecInvToHigher)
|
||||||
{
|
{
|
||||||
EnclosePrecInvertionBrackets();
|
EnclosePrecInversionBrackets();
|
||||||
}
|
}
|
||||||
AddBinOpToHistory(nOpCode);
|
AddBinOpToHistory(nOpCode);
|
||||||
}
|
}
|
||||||
@ -180,7 +180,7 @@ void CHistoryCollector::AddCloseBraceToHistory()
|
|||||||
m_bLastOpndBrace = true;
|
m_bLastOpndBrace = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHistoryCollector::EnclosePrecInvertionBrackets()
|
void CHistoryCollector::EnclosePrecInversionBrackets()
|
||||||
{
|
{
|
||||||
// Top of the Opnd starts index or 0 is nothing is in top
|
// Top of the Opnd starts index or 0 is nothing is in top
|
||||||
int ichStart = (m_curOperandIndex > 0) ? m_operandIndices[m_curOperandIndex - 1] : 0;
|
int ichStart = (m_curOperandIndex > 0) ? m_operandIndices[m_curOperandIndex - 1] : 0;
|
||||||
@ -401,9 +401,9 @@ int CHistoryCollector::AddCommand(_In_ const std::shared_ptr<IExpressionCommand>
|
|||||||
throw(CALC_E_OUTOFMEMORY);
|
throw(CALC_E_OUTOFMEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int nCommmands = 0;
|
unsigned int nCommands = 0;
|
||||||
m_spCommands->GetSize(&nCommmands);
|
m_spCommands->GetSize(&nCommands);
|
||||||
return nCommmands - 1;
|
return nCommands - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//To Update the operands in the Expression according to the current Radix
|
//To Update the operands in the Expression according to the current Radix
|
||||||
|
@ -271,7 +271,7 @@ void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
|
|||||||
// 1 + (2 Or 3)
|
// 1 + (2 Or 3)
|
||||||
if (ni <= nx)
|
if (ni <= nx)
|
||||||
{
|
{
|
||||||
m_HistoryCollector.EnclosePrecInvertionBrackets();
|
m_HistoryCollector.EnclosePrecInversionBrackets();
|
||||||
}
|
}
|
||||||
m_HistoryCollector.PopLastOpndStart();
|
m_HistoryCollector.PopLastOpndStart();
|
||||||
goto DoPrecedenceCheckAgain;
|
goto DoPrecedenceCheckAgain;
|
||||||
@ -507,7 +507,7 @@ void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
|
|||||||
nx = NPrecedenceOfOp(m_nOpCode);
|
nx = NPrecedenceOfOp(m_nOpCode);
|
||||||
if (ni <= nx)
|
if (ni <= nx)
|
||||||
{
|
{
|
||||||
m_HistoryCollector.EnclosePrecInvertionBrackets();
|
m_HistoryCollector.EnclosePrecInversionBrackets();
|
||||||
}
|
}
|
||||||
m_HistoryCollector.PopLastOpndStart();
|
m_HistoryCollector.PopLastOpndStart();
|
||||||
|
|
||||||
@ -600,7 +600,7 @@ void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
|
|||||||
nx = NPrecedenceOfOp(m_nOpCode);
|
nx = NPrecedenceOfOp(m_nOpCode);
|
||||||
if (ni <= nx)
|
if (ni <= nx)
|
||||||
{
|
{
|
||||||
m_HistoryCollector.EnclosePrecInvertionBrackets();
|
m_HistoryCollector.EnclosePrecInversionBrackets();
|
||||||
}
|
}
|
||||||
m_HistoryCollector.PopLastOpndStart();
|
m_HistoryCollector.PopLastOpndStart();
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ namespace CalculationManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Callback from the CalculatorControll
|
/// Callback from the CalculatorControl
|
||||||
/// Passed in string representations of memorized numbers get passed to the client
|
/// Passed in string representations of memorized numbers get passed to the client
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="memorizedNumber">vector containing wstring values of memorized numbers</param>
|
/// <param name="memorizedNumber">vector containing wstring values of memorized numbers</param>
|
||||||
@ -429,7 +429,7 @@ namespace CalculationManager
|
|||||||
*commandItr <= MEMORY_COMMAND_TO_UNSIGNED_CHAR(MemoryCommand::MemorizedNumberClearAll))
|
*commandItr <= MEMORY_COMMAND_TO_UNSIGNED_CHAR(MemoryCommand::MemorizedNumberClearAll))
|
||||||
{
|
{
|
||||||
//MemoryCommands(which have values above 255) are pushed on m_savedCommands upon casting to unsigned char.
|
//MemoryCommands(which have values above 255) are pushed on m_savedCommands upon casting to unsigned char.
|
||||||
//SerializeCommands uses m_savedCommands, which is then used in DeSerializeCommnds.
|
//SerializeCommands uses m_savedCommands, which is then used in DeSerializeCommands.
|
||||||
//Hence, a simple cast to MemoryCommand is not sufficient.
|
//Hence, a simple cast to MemoryCommand is not sufficient.
|
||||||
MemoryCommand memoryCommand = static_cast<MemoryCommand>(*commandItr + UCHAR_MAX + 1);
|
MemoryCommand memoryCommand = static_cast<MemoryCommand>(*commandItr + UCHAR_MAX + 1);
|
||||||
unsigned int indexOfMemory = 0;
|
unsigned int indexOfMemory = 0;
|
||||||
@ -505,7 +505,7 @@ namespace CalculationManager
|
|||||||
/// Recall the memorized number.
|
/// Recall the memorized number.
|
||||||
/// The memorized number gets loaded to the primary display
|
/// The memorized number gets loaded to the primary display
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="indexOfMemeory">Index of the target memory</param>
|
/// <param name="indexOfMemory">Index of the target memory</param>
|
||||||
void CalculatorManager::MemorizedNumberLoad(_In_ unsigned int indexOfMemory)
|
void CalculatorManager::MemorizedNumberLoad(_In_ unsigned int indexOfMemory)
|
||||||
{
|
{
|
||||||
SaveMemoryCommand(MemoryCommand::MemorizedNumberLoad, indexOfMemory);
|
SaveMemoryCommand(MemoryCommand::MemorizedNumberLoad, indexOfMemory);
|
||||||
@ -521,7 +521,7 @@ namespace CalculationManager
|
|||||||
/// It adds primary display value to the selected memory
|
/// It adds primary display value to the selected memory
|
||||||
/// Notify the client with new the new memorize value vector
|
/// Notify the client with new the new memorize value vector
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="indexOfMemeory">Index of the target memory</param>
|
/// <param name="indexOfMemory">Index of the target memory</param>
|
||||||
void CalculatorManager::MemorizedNumberAdd(_In_ unsigned int indexOfMemory)
|
void CalculatorManager::MemorizedNumberAdd(_In_ unsigned int indexOfMemory)
|
||||||
{
|
{
|
||||||
SaveMemoryCommand(MemoryCommand::MemorizedNumberAdd, indexOfMemory);
|
SaveMemoryCommand(MemoryCommand::MemorizedNumberAdd, indexOfMemory);
|
||||||
@ -559,7 +559,7 @@ namespace CalculationManager
|
|||||||
/// It adds primary display value to the selected memory
|
/// It adds primary display value to the selected memory
|
||||||
/// Notify the client with new the new memorize value vector
|
/// Notify the client with new the new memorize value vector
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="indexOfMemeory">Index of the target memory</param>
|
/// <param name="indexOfMemory">Index of the target memory</param>
|
||||||
void CalculatorManager::MemorizedNumberSubtract(_In_ unsigned int indexOfMemory)
|
void CalculatorManager::MemorizedNumberSubtract(_In_ unsigned int indexOfMemory)
|
||||||
{
|
{
|
||||||
SaveMemoryCommand(MemoryCommand::MemorizedNumberSubtract, indexOfMemory);
|
SaveMemoryCommand(MemoryCommand::MemorizedNumberSubtract, indexOfMemory);
|
||||||
@ -603,7 +603,7 @@ namespace CalculationManager
|
|||||||
/// Helper function that selects a memory from the vector and set it to CCalcEngine
|
/// Helper function that selects a memory from the vector and set it to CCalcEngine
|
||||||
/// Saved RAT number needs to be copied and passed in, as CCalcEngine destroyed the passed in RAT
|
/// Saved RAT number needs to be copied and passed in, as CCalcEngine destroyed the passed in RAT
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="indexOfMemeory">Index of the target memory</param>
|
/// <param name="indexOfMemory">Index of the target memory</param>
|
||||||
void CalculatorManager::MemorizedNumberSelect(_In_ unsigned int indexOfMemory)
|
void CalculatorManager::MemorizedNumberSelect(_In_ unsigned int indexOfMemory)
|
||||||
{
|
{
|
||||||
if (!(m_currentCalculatorEngine->FInErrorState()))
|
if (!(m_currentCalculatorEngine->FInErrorState()))
|
||||||
@ -617,7 +617,7 @@ namespace CalculationManager
|
|||||||
/// Helper function that needs to be executed when memory is modified
|
/// Helper function that needs to be executed when memory is modified
|
||||||
/// When memory is modified, destroy the old RAT and put the new RAT in vector
|
/// When memory is modified, destroy the old RAT and put the new RAT in vector
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="indexOfMemeory">Index of the target memory</param>
|
/// <param name="indexOfMemory">Index of the target memory</param>
|
||||||
void CalculatorManager::MemorizedNumberChanged(_In_ unsigned int indexOfMemory)
|
void CalculatorManager::MemorizedNumberChanged(_In_ unsigned int indexOfMemory)
|
||||||
{
|
{
|
||||||
if (!(m_currentCalculatorEngine->FInErrorState()))
|
if (!(m_currentCalculatorEngine->FInErrorState()))
|
||||||
|
@ -26,7 +26,7 @@ public:
|
|||||||
void AddCloseBraceToHistory();
|
void AddCloseBraceToHistory();
|
||||||
void PushLastOpndStart(int ichOpndStart = -1);
|
void PushLastOpndStart(int ichOpndStart = -1);
|
||||||
void PopLastOpndStart();
|
void PopLastOpndStart();
|
||||||
void EnclosePrecInvertionBrackets();
|
void EnclosePrecInversionBrackets();
|
||||||
bool FOpndAddedToHistory();
|
bool FOpndAddedToHistory();
|
||||||
void CompleteHistoryLine(std::wstring_view numStr);
|
void CompleteHistoryLine(std::wstring_view numStr);
|
||||||
void ClearHistoryLine(std::wstring_view errStr);
|
void ClearHistoryLine(std::wstring_view errStr);
|
||||||
|
@ -183,7 +183,7 @@ void divrat( PRAT *pa, PRAT b, int32_t precision)
|
|||||||
// RETURN: None, changes first pointer.
|
// RETURN: None, changes first pointer.
|
||||||
//
|
//
|
||||||
// DESCRIPTION: Does the rational equivalent of *pa += b.
|
// DESCRIPTION: Does the rational equivalent of *pa += b.
|
||||||
// Assumes base is internal througought.
|
// Assumes base is internal throughout.
|
||||||
//
|
//
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ void subrat( PRAT *pa, PRAT b, int32_t precision)
|
|||||||
// RETURN: None, changes first pointer.
|
// RETURN: None, changes first pointer.
|
||||||
//
|
//
|
||||||
// DESCRIPTION: Does the rational equivalent of *pa += b.
|
// DESCRIPTION: Does the rational equivalent of *pa += b.
|
||||||
// Assumes base is internal througought.
|
// Assumes base is internal throughout.
|
||||||
//
|
//
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ namespace CalculatorApp { namespace Common
|
|||||||
return Windows::UI::Xaml::DependencyProperty::UnsetValue; // Can't convert
|
return Windows::UI::Xaml::DependencyProperty::UnsetValue; // Can't convert
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Platform::Object^ ConverBack(
|
virtual Platform::Object^ ConvertBack(
|
||||||
Platform::Object^ /*value*/,
|
Platform::Object^ /*value*/,
|
||||||
Windows::UI::Xaml::Interop::TypeName /*targetType*/,
|
Windows::UI::Xaml::Interop::TypeName /*targetType*/,
|
||||||
Platform::Object^ /*parameter*/,
|
Platform::Object^ /*parameter*/,
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
namespace CalculatorApp::Common::Automation
|
namespace CalculatorApp::Common::Automation
|
||||||
{
|
{
|
||||||
// This class exists so that the app can run on RS2 and use LiveRegions
|
// This class exists so that the app can run on RS2 and use LiveRegions
|
||||||
// to host notifiactions on those builds.
|
// to host notifications on those builds.
|
||||||
// When the app switches to min version RS3, this class can be removed
|
// When the app switches to min version RS3, this class can be removed
|
||||||
// and the app will switch to using the Notification API.
|
// and the app will switch to using the Notification API.
|
||||||
// TODO - MSFT 12735088
|
// TODO - MSFT 12735088
|
||||||
|
@ -199,7 +199,7 @@ CategoryGroupType NavCategory::GetGroupType(ViewMode mode)
|
|||||||
: CategoryGroupType::None;
|
: CategoryGroupType::None;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetIndex is 0-based, GetPostion is 1-based
|
// GetIndex is 0-based, GetPosition is 1-based
|
||||||
int NavCategory::GetIndex(ViewMode mode)
|
int NavCategory::GetIndex(ViewMode mode)
|
||||||
{
|
{
|
||||||
int position = NavCategory::GetPosition(mode);
|
int position = NavCategory::GetPosition(mode);
|
||||||
@ -228,7 +228,7 @@ int NavCategory::GetFlatIndex(ViewMode mode)
|
|||||||
: -1;
|
: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetIndex is 0-based, GetPostion is 1-based
|
// GetIndex is 0-based, GetPosition is 1-based
|
||||||
int NavCategory::GetIndexInGroup(ViewMode mode, CategoryGroupType type)
|
int NavCategory::GetIndexInGroup(ViewMode mode, CategoryGroupType type)
|
||||||
{
|
{
|
||||||
int index = -1;
|
int index = -1;
|
||||||
@ -249,7 +249,7 @@ int NavCategory::GetIndexInGroup(ViewMode mode, CategoryGroupType type)
|
|||||||
: -1;
|
: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetIndex is 0-based, GetPostion is 1-based
|
// GetIndex is 0-based, GetPosition is 1-based
|
||||||
int NavCategory::GetPosition(ViewMode mode)
|
int NavCategory::GetPosition(ViewMode mode)
|
||||||
{
|
{
|
||||||
int position = 0;
|
int position = 0;
|
||||||
|
@ -170,7 +170,7 @@ namespace CalculatorApp
|
|||||||
static Platform::String^ GetNameResourceKey(ViewMode mode);
|
static Platform::String^ GetNameResourceKey(ViewMode mode);
|
||||||
static CategoryGroupType GetGroupType(ViewMode mode);
|
static CategoryGroupType GetGroupType(ViewMode mode);
|
||||||
|
|
||||||
// GetIndex is 0-based, GetPostion is 1-based
|
// GetIndex is 0-based, GetPosition is 1-based
|
||||||
static int GetIndex(ViewMode mode);
|
static int GetIndex(ViewMode mode);
|
||||||
static int GetFlatIndex(ViewMode mode);
|
static int GetFlatIndex(ViewMode mode);
|
||||||
static int GetIndexInGroup(ViewMode mode, CategoryGroupType type);
|
static int GetIndexInGroup(ViewMode mode, CategoryGroupType type);
|
||||||
|
@ -23,7 +23,7 @@ namespace CalculatorApp { namespace Common
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Platform::Object^ ConverBack(
|
virtual Platform::Object^ ConvertBack(
|
||||||
Platform::Object^ value,
|
Platform::Object^ value,
|
||||||
Windows::UI::Xaml::Interop::TypeName /*targetType*/,
|
Windows::UI::Xaml::Interop::TypeName /*targetType*/,
|
||||||
Platform::Object^ /*parameter*/,
|
Platform::Object^ /*parameter*/,
|
||||||
@ -56,7 +56,7 @@ namespace CalculatorApp { namespace Common
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Platform::Object^ ConverBack(
|
virtual Platform::Object^ ConvertBack(
|
||||||
Platform::Object^ value,
|
Platform::Object^ value,
|
||||||
Windows::UI::Xaml::Interop::TypeName /*targetType*/,
|
Windows::UI::Xaml::Interop::TypeName /*targetType*/,
|
||||||
Platform::Object^ /*parameter*/,
|
Platform::Object^ /*parameter*/,
|
||||||
|
@ -588,7 +588,7 @@ bool CurrencyDataLoader::TryParseAllRatiosData(_In_ String^ rawJson, _Inout_ Cur
|
|||||||
//
|
//
|
||||||
// There are a few ways we can get the data needed for Currency Converter, including from cache or from web.
|
// There are a few ways we can get the data needed for Currency Converter, including from cache or from web.
|
||||||
// This function accepts the data from any source, and acts as a 'last-steps' for the converter to be ready.
|
// This function accepts the data from any source, and acts as a 'last-steps' for the converter to be ready.
|
||||||
// This includes identifying which units will be selected and building the map of curreny ratios.
|
// This includes identifying which units will be selected and building the map of currency ratios.
|
||||||
#pragma optimize("", off) // Turn off optimizations to work around DevDiv 393321
|
#pragma optimize("", off) // Turn off optimizations to work around DevDiv 393321
|
||||||
task<void> CurrencyDataLoader::FinalizeUnits(_In_ const vector<UCM::CurrencyStaticData>& staticData, _In_ const CurrencyRatioMap& ratioMap)
|
task<void> CurrencyDataLoader::FinalizeUnits(_In_ const vector<UCM::CurrencyStaticData>& staticData, _In_ const CurrencyRatioMap& ratioMap)
|
||||||
{
|
{
|
||||||
|
@ -87,7 +87,7 @@ DateCalculatorViewModel::DateCalculatorViewModel() :
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* In the ClipTime function, we used to change timezone to UTC before clipping the time.
|
/* In the ClipTime function, we used to change timezone to UTC before clipping the time.
|
||||||
The comment from the previous delopers said this was done to eliminate the effects of
|
The comment from the previous developers said this was done to eliminate the effects of
|
||||||
Daylight Savings Time. We can't think of a good reason why this change in timezone is
|
Daylight Savings Time. We can't think of a good reason why this change in timezone is
|
||||||
necessary and did find bugs related to the change, therefore, we have removed the
|
necessary and did find bugs related to the change, therefore, we have removed the
|
||||||
change. Just in case, we will see if the clipped time is ever a different day from the
|
change. Just in case, we will see if the clipped time is ever a different day from the
|
||||||
|
@ -98,7 +98,7 @@ namespace CalculatorApp
|
|||||||
void UpdateDisplayResult();
|
void UpdateDisplayResult();
|
||||||
void UpdateStrDateDiffResultAutomationName();
|
void UpdateStrDateDiffResultAutomationName();
|
||||||
void UpdateStrDateResultAutomationName();
|
void UpdateStrDateResultAutomationName();
|
||||||
void InitializeDateOutputFormats(Platform::String^ calendarIdentifer);
|
void InitializeDateOutputFormats(Platform::String^ calendarIdentifier);
|
||||||
Platform::String^ GetDateDiffString() const;
|
Platform::String^ GetDateDiffString() const;
|
||||||
Platform::String^ GetDateDiffStringInDays() const;
|
Platform::String^ GetDateDiffStringInDays() const;
|
||||||
Platform::String^ GetLocalizedNumberString(int value) const;
|
Platform::String^ GetLocalizedNumberString(int value) const;
|
||||||
|
@ -674,7 +674,7 @@ void UnitConverterViewModel::Deserialize(Platform::String^ state)
|
|||||||
RaisePropertyChanged(nullptr); // Update since all props have been updated.
|
RaisePropertyChanged(nullptr); // Update since all props have been updated.
|
||||||
}
|
}
|
||||||
|
|
||||||
//Saving User Prefernces of Category and Associated-Units across Sessions.
|
//Saving User Preferences of Category and Associated-Units across Sessions.
|
||||||
void UnitConverterViewModel::SaveUserPreferences()
|
void UnitConverterViewModel::SaveUserPreferences()
|
||||||
{
|
{
|
||||||
if (UnitsAreValid())
|
if (UnitsAreValid())
|
||||||
@ -695,7 +695,7 @@ void UnitConverterViewModel::SaveUserPreferences()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Restoring User Prefernces of Category and Associated-Units.
|
//Restoring User Preferences of Category and Associated-Units.
|
||||||
void UnitConverterViewModel::RestoreUserPreferences()
|
void UnitConverterViewModel::RestoreUserPreferences()
|
||||||
{
|
{
|
||||||
if (!IsCurrencyCurrentCategory)
|
if (!IsCurrencyCurrentCategory)
|
||||||
|
@ -74,7 +74,7 @@ namespace CalculatorApp
|
|||||||
Platform::String^ get() { return ref new Platform::String(m_original.abbreviation.c_str()); }
|
Platform::String^ get() { return ref new Platform::String(m_original.abbreviation.c_str()); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method is used to return the desired automation name for default unit in UnitConveter combo box.
|
// This method is used to return the desired automation name for default unit in UnitConverter combo box.
|
||||||
Platform::String^ ToString() override
|
Platform::String^ ToString() override
|
||||||
{
|
{
|
||||||
return AccessibleName;
|
return AccessibleName;
|
||||||
@ -243,7 +243,7 @@ namespace CalculatorApp
|
|||||||
Platform::String^ Serialize();
|
Platform::String^ Serialize();
|
||||||
void Deserialize(Platform::String^ state);
|
void Deserialize(Platform::String^ state);
|
||||||
|
|
||||||
//Saving And Restoring User Prefernces of Category and Associated-Units across Sessions.
|
//Saving And Restoring User Preferences of Category and Associated-Units across Sessions.
|
||||||
void SaveUserPreferences();
|
void SaveUserPreferences();
|
||||||
void RestoreUserPreferences();
|
void RestoreUserPreferences();
|
||||||
|
|
||||||
@ -333,7 +333,7 @@ namespace CalculatorApp
|
|||||||
std::wstring m_valueFromUnlocalized;
|
std::wstring m_valueFromUnlocalized;
|
||||||
std::wstring m_valueToUnlocalized;
|
std::wstring m_valueToUnlocalized;
|
||||||
bool m_relocalizeStringOnSwitch;
|
bool m_relocalizeStringOnSwitch;
|
||||||
// For Saving the User Preferences only if the Unit convertyer ViewModel is initialised for the first time
|
// For Saving the User Preferences only if the Unit converter ViewModel is initialised for the first time
|
||||||
bool m_IsFirstTime;
|
bool m_IsFirstTime;
|
||||||
|
|
||||||
Platform::String^ m_localizedValueFromFormat;
|
Platform::String^ m_localizedValueFromFormat;
|
||||||
|
@ -275,7 +275,7 @@ namespace CalculatorApp { namespace Common
|
|||||||
return Windows::UI::Xaml::DependencyProperty::UnsetValue; // Can't convert
|
return Windows::UI::Xaml::DependencyProperty::UnsetValue; // Can't convert
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Platform::Object^ ConverBack(
|
virtual Platform::Object^ ConvertBack(
|
||||||
Platform::Object^ /*value*/,
|
Platform::Object^ /*value*/,
|
||||||
Windows::UI::Xaml::Interop::TypeName /*targetType*/,
|
Windows::UI::Xaml::Interop::TypeName /*targetType*/,
|
||||||
Platform::Object^ /*parameter*/,
|
Platform::Object^ /*parameter*/,
|
||||||
|
@ -22,7 +22,7 @@ namespace Numbers
|
|||||||
OBSERVABLE_PROPERTY_RW(Platform::String^, SlotValue);
|
OBSERVABLE_PROPERTY_RW(Platform::String^, SlotValue);
|
||||||
};
|
};
|
||||||
|
|
||||||
// This class is to be consumbed exclusively by Blend and the VS designer
|
// This class is to be consumed exclusively by Blend and the VS designer
|
||||||
// with this class Blend will be able to populate the controls, the CalculationResults control for example,
|
// with this class Blend will be able to populate the controls, the CalculationResults control for example,
|
||||||
// with the hardcoded strings so whoever is working on the UI can actually see how the app would look like
|
// with the hardcoded strings so whoever is working on the UI can actually see how the app would look like
|
||||||
// with semi-realistic data.
|
// with semi-realistic data.
|
||||||
|
@ -2601,7 +2601,7 @@
|
|||||||
</data>
|
</data>
|
||||||
<data name="xorButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve">
|
<data name="xorButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve">
|
||||||
<value>x or</value>
|
<value>x or</value>
|
||||||
<comment>Auditory feedback for Screen Reader users. Users will hear "Display is 7 x or" when the button is pressed. XOR is a mathematical operation on two binary values. Here the feedback is "x or" in order to get the correct pronounciation.</comment>
|
<comment>Auditory feedback for Screen Reader users. Users will hear "Display is 7 x or" when the button is pressed. XOR is a mathematical operation on two binary values. Here the feedback is "x or" in order to get the correct pronunciation.</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="andButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve">
|
<data name="andButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve">
|
||||||
<value>and</value>
|
<value>and</value>
|
||||||
|
@ -3085,7 +3085,7 @@
|
|||||||
</data>
|
</data>
|
||||||
<data name="xorButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve">
|
<data name="xorButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve">
|
||||||
<value>x or</value>
|
<value>x or</value>
|
||||||
<comment>Auditory feedback for Screen Reader users. Users will hear "Display is 7 x or" when the button is pressed. XOR is a mathematical operation on two binary values. Here the feedback is "x or" in order to get the correct pronounciation.</comment>
|
<comment>Auditory feedback for Screen Reader users. Users will hear "Display is 7 x or" when the button is pressed. XOR is a mathematical operation on two binary values. Here the feedback is "x or" in order to get the correct pronunciation.</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="andButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve">
|
<data name="andButton.[using:CalculatorApp.Controls]CalculatorButton.AuditoryFeedback" xml:space="preserve">
|
||||||
<value>and</value>
|
<value>and</value>
|
||||||
|
@ -260,7 +260,7 @@ namespace CalculatorManagerTest
|
|||||||
VERIFY_IS_LESS_THAN(0, pCalculatorDisplay->GetMaxDigitsCalledCount());
|
VERIFY_IS_LESS_THAN(0, pCalculatorDisplay->GetMaxDigitsCalledCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerialzieAndDeSerialize()
|
void SerializeAndDeSerialize()
|
||||||
{
|
{
|
||||||
auto serializedCommands = m_calculatorManager->SerializeCommands();
|
auto serializedCommands = m_calculatorManager->SerializeCommands();
|
||||||
auto serializedMemory = m_calculatorManager->GetSerializedMemory();
|
auto serializedMemory = m_calculatorManager->GetSerializedMemory();
|
||||||
@ -278,7 +278,7 @@ namespace CalculatorManagerTest
|
|||||||
auto savedPrimary = m_calculatorDisplayTester->GetPrimaryDisplay();
|
auto savedPrimary = m_calculatorDisplayTester->GetPrimaryDisplay();
|
||||||
auto savedExpression = m_calculatorDisplayTester->GetExpression();
|
auto savedExpression = m_calculatorDisplayTester->GetExpression();
|
||||||
auto savedMemory = m_calculatorDisplayTester->GetMemorizedNumbers();
|
auto savedMemory = m_calculatorDisplayTester->GetMemorizedNumbers();
|
||||||
SerialzieAndDeSerialize();
|
SerializeAndDeSerialize();
|
||||||
VERIFY_ARE_EQUAL(savedPrimary, m_calculatorDisplayTester->GetPrimaryDisplay());
|
VERIFY_ARE_EQUAL(savedPrimary, m_calculatorDisplayTester->GetPrimaryDisplay());
|
||||||
VERIFY_ARE_EQUAL(savedExpression, m_calculatorDisplayTester->GetExpression());
|
VERIFY_ARE_EQUAL(savedExpression, m_calculatorDisplayTester->GetExpression());
|
||||||
auto loadedMemory = m_calculatorDisplayTester->GetMemorizedNumbers();
|
auto loadedMemory = m_calculatorDisplayTester->GetMemorizedNumbers();
|
||||||
@ -889,7 +889,7 @@ namespace CalculatorManagerTest
|
|||||||
VerifyPersistence();
|
VerifyPersistence();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1 + 2 then serialize and deserialze 3 times
|
// 1 + 2 then serialize and deserialize 3 times
|
||||||
// Check if the values are persisted correctly
|
// Check if the values are persisted correctly
|
||||||
void CalculatorManagerTest::CalculatorManagerTestSerializeMultiple()
|
void CalculatorManagerTest::CalculatorManagerTestSerializeMultiple()
|
||||||
{
|
{
|
||||||
@ -915,7 +915,7 @@ namespace CalculatorManagerTest
|
|||||||
Command commands[] = { Command::Command1, Command::CommandDIV, Command::Command3, Command::CommandEQU, Command::CommandNULL };
|
Command commands[] = { Command::Command1, Command::CommandDIV, Command::Command3, Command::CommandEQU, Command::CommandNULL };
|
||||||
ExecuteCommands(commands);
|
ExecuteCommands(commands);
|
||||||
|
|
||||||
SerialzieAndDeSerialize();
|
SerializeAndDeSerialize();
|
||||||
|
|
||||||
Command commands2[] = { Command::CommandMUL, Command::Command3, Command::CommandEQU, Command::CommandNULL };
|
Command commands2[] = { Command::CommandMUL, Command::Command3, Command::CommandEQU, Command::CommandNULL };
|
||||||
ExecuteCommands(commands2);
|
ExecuteCommands(commands2);
|
||||||
@ -944,7 +944,7 @@ namespace CalculatorManagerTest
|
|||||||
wstring primaryDisplay = pCalculatorDisplay->GetPrimaryDisplay();
|
wstring primaryDisplay = pCalculatorDisplay->GetPrimaryDisplay();
|
||||||
wstring expressionDisplay = pCalculatorDisplay->GetExpression();
|
wstring expressionDisplay = pCalculatorDisplay->GetExpression();
|
||||||
|
|
||||||
SerialzieAndDeSerialize();
|
SerializeAndDeSerialize();
|
||||||
|
|
||||||
vector<wstring> memorizedNumbersAfterDeSerialize = pCalculatorDisplay->GetMemorizedNumbers();
|
vector<wstring> memorizedNumbersAfterDeSerialize = pCalculatorDisplay->GetMemorizedNumbers();
|
||||||
wstring primaryDisplayAfterDeSerialize = pCalculatorDisplay->GetPrimaryDisplay();
|
wstring primaryDisplayAfterDeSerialize = pCalculatorDisplay->GetPrimaryDisplay();
|
||||||
@ -975,7 +975,7 @@ namespace CalculatorManagerTest
|
|||||||
primaryDisplay = pCalculatorDisplay->GetPrimaryDisplay();
|
primaryDisplay = pCalculatorDisplay->GetPrimaryDisplay();
|
||||||
expressionDisplay = pCalculatorDisplay->GetExpression();
|
expressionDisplay = pCalculatorDisplay->GetExpression();
|
||||||
|
|
||||||
SerialzieAndDeSerialize();
|
SerializeAndDeSerialize();
|
||||||
|
|
||||||
memorizedNumbersAfterDeSerialize = pCalculatorDisplay->GetMemorizedNumbers();
|
memorizedNumbersAfterDeSerialize = pCalculatorDisplay->GetMemorizedNumbers();
|
||||||
primaryDisplayAfterDeSerialize = pCalculatorDisplay->GetPrimaryDisplay();
|
primaryDisplayAfterDeSerialize = pCalculatorDisplay->GetPrimaryDisplay();
|
||||||
@ -1016,7 +1016,7 @@ namespace CalculatorManagerTest
|
|||||||
primaryDisplay = pCalculatorDisplay->GetPrimaryDisplay();
|
primaryDisplay = pCalculatorDisplay->GetPrimaryDisplay();
|
||||||
expressionDisplay = pCalculatorDisplay->GetExpression();
|
expressionDisplay = pCalculatorDisplay->GetExpression();
|
||||||
|
|
||||||
SerialzieAndDeSerialize();
|
SerializeAndDeSerialize();
|
||||||
|
|
||||||
memorizedNumbersAfterDeSerialize = pCalculatorDisplay->GetMemorizedNumbers();
|
memorizedNumbersAfterDeSerialize = pCalculatorDisplay->GetMemorizedNumbers();
|
||||||
primaryDisplayAfterDeSerialize = pCalculatorDisplay->GetPrimaryDisplay();
|
primaryDisplayAfterDeSerialize = pCalculatorDisplay->GetPrimaryDisplay();
|
||||||
|
@ -439,7 +439,7 @@ namespace CalculatorUnitTests
|
|||||||
12. octal numbers
|
12. octal numbers
|
||||||
13. very large number
|
13. very large number
|
||||||
14. number with some escape characters in b/w like ",/. \n\r ", '"
|
14. number with some escape characters in b/w like ",/. \n\r ", '"
|
||||||
15. expression involving sin, cos or other mathematic functions
|
15. expression involving sin, cos or other mathematical functions
|
||||||
16. expression having more than one operator in b/w operands
|
16. expression having more than one operator in b/w operands
|
||||||
17. expression involving open and close parenthesis (, )
|
17. expression involving open and close parenthesis (, )
|
||||||
|
|
||||||
@ -483,25 +483,25 @@ namespace CalculatorUnitTests
|
|||||||
void CopyPasteManagerTest::ValidateProgrammerHexPasteExpressionTest()
|
void CopyPasteManagerTest::ValidateProgrammerHexPasteExpressionTest()
|
||||||
{
|
{
|
||||||
String^ qwordPositiveInput[] = { L"123", L"123+456", L"1,234", L"1 2 3", L"1'2'3'4", L"1_2_3_4", L"12345e-23"/*note: here is considered as E of hex*/, L"\n\r1,234\n", L"\f\n1+2\t\r\v\x85", L"\f\n1+2\t\r\v\x85", L"\n 1+\n2 ", L"e+234", L"1\"2", L"(123)+(456)", L"abcdef", L"ABab", L"ABCDF21abc41a"/*within boundary*/, L"0x1234", L"0xab12", L"0X1234", L"AB12h", L"BC34H", L"1234u", L"1234ul", L"1234ULL", L"2+2=", L"2+2= " };
|
String^ qwordPositiveInput[] = { L"123", L"123+456", L"1,234", L"1 2 3", L"1'2'3'4", L"1_2_3_4", L"12345e-23"/*note: here is considered as E of hex*/, L"\n\r1,234\n", L"\f\n1+2\t\r\v\x85", L"\f\n1+2\t\r\v\x85", L"\n 1+\n2 ", L"e+234", L"1\"2", L"(123)+(456)", L"abcdef", L"ABab", L"ABCDF21abc41a"/*within boundary*/, L"0x1234", L"0xab12", L"0X1234", L"AB12h", L"BC34H", L"1234u", L"1234ul", L"1234ULL", L"2+2=", L"2+2= " };
|
||||||
String^ qwordNegativeInput[] = { L"+123", L"1.23"/*floating number*/, L"1''2", L"'123", L"123'", L"1__2", L"_123", L"123_", L"-133", L"1.2e+023", L"1.2e23"/*unsigned exponent*/, L"xyz", L"ABCDEF21abc41abc7"/*outside boundary of 16 digitis*/, L"SIN(2)", L"123+-234", L"1234x", L"A0x1234", L"0xx1234", L"1234uu", L"1234ulll", L"2+2==", L"2=+2" };
|
String^ qwordNegativeInput[] = { L"+123", L"1.23"/*floating number*/, L"1''2", L"'123", L"123'", L"1__2", L"_123", L"123_", L"-133", L"1.2e+023", L"1.2e23"/*unsigned exponent*/, L"xyz", L"ABCDEF21abc41abc7"/*outside boundary of 16 digits*/, L"SIN(2)", L"123+-234", L"1234x", L"A0x1234", L"0xx1234", L"1234uu", L"1234ulll", L"2+2==", L"2=+2" };
|
||||||
|
|
||||||
ASSERT_POSITIVE_TESTCASES(ValidateProgrammerHexQwordPasteExpression, qwordPositiveInput);
|
ASSERT_POSITIVE_TESTCASES(ValidateProgrammerHexQwordPasteExpression, qwordPositiveInput);
|
||||||
ASSERT_NEGATIVE_TESTCASES(ValidateProgrammerHexQwordPasteExpression, qwordNegativeInput);
|
ASSERT_NEGATIVE_TESTCASES(ValidateProgrammerHexQwordPasteExpression, qwordNegativeInput);
|
||||||
|
|
||||||
String^ dwordPositiveInput[] = { L"123", L"123+456", L"1,234", L"1 2 3", L"1'2'3'4", L"1_2_3_4", L"12345e-23"/*note: here is considered as E of hex*/, L"\n\r1,234\n", L"\f\n1+2\t\r\v\x85", L"\n 1+\n2 ", L"e+234", L"1\"2", L"(123)+(456)", L"abcdef", L"ABab", L"ABCD123a"/*within boundary*/, L"0x1234", L"0xab12", L"0X1234", L"AB12h", L"BC34H", L"1234u", L"1234ul", L"1234ULL" };
|
String^ dwordPositiveInput[] = { L"123", L"123+456", L"1,234", L"1 2 3", L"1'2'3'4", L"1_2_3_4", L"12345e-23"/*note: here is considered as E of hex*/, L"\n\r1,234\n", L"\f\n1+2\t\r\v\x85", L"\n 1+\n2 ", L"e+234", L"1\"2", L"(123)+(456)", L"abcdef", L"ABab", L"ABCD123a"/*within boundary*/, L"0x1234", L"0xab12", L"0X1234", L"AB12h", L"BC34H", L"1234u", L"1234ul", L"1234ULL" };
|
||||||
String^ dwordNegativeInput[] = { L"+123", L"1.23"/*floating number*/, L"1''2", L"'123", L"123'", L"1__2", L"_123", L"123_", L"-133", L"1.2e+023", L"1.2e23"/*unsigned exponent*/, L"xyz", L"ABCD123ab"/*outside boundary of 8 digitis*/, L"SIN(2)", L"123+-234", L"1234x", L"A0x1234", L"0xx1234", L"1234uu", L"1234ulll" };
|
String^ dwordNegativeInput[] = { L"+123", L"1.23"/*floating number*/, L"1''2", L"'123", L"123'", L"1__2", L"_123", L"123_", L"-133", L"1.2e+023", L"1.2e23"/*unsigned exponent*/, L"xyz", L"ABCD123ab"/*outside boundary of 8 digits*/, L"SIN(2)", L"123+-234", L"1234x", L"A0x1234", L"0xx1234", L"1234uu", L"1234ulll" };
|
||||||
|
|
||||||
ASSERT_POSITIVE_TESTCASES(ValidateProgrammerHexDwordPasteExpression, dwordPositiveInput);
|
ASSERT_POSITIVE_TESTCASES(ValidateProgrammerHexDwordPasteExpression, dwordPositiveInput);
|
||||||
ASSERT_NEGATIVE_TESTCASES(ValidateProgrammerHexDwordPasteExpression, dwordNegativeInput);
|
ASSERT_NEGATIVE_TESTCASES(ValidateProgrammerHexDwordPasteExpression, dwordNegativeInput);
|
||||||
|
|
||||||
String^ wordPositiveInput[] = { L"123", L"13+456", L"1,34", L"12 3", L"1'2'3'4", L"1_2_3_4", L"15e-23"/*note: here is considered as E of hex*/, L"\r1", L"\n\r1,4", L"\n1,4\n", L"\f\n1+2\t\r\v", L"\n 1+\n2 ", L"e+24", L"1\"2", L"(23)+(4)", L"aef", L"ABab", L"A1a3"/*within boundary*/, L"0x1234", L"0xab12", L"0X1234", L"AB12h", L"BC34H", L"1234u", L"1234ul", L"1234ULL" };
|
String^ wordPositiveInput[] = { L"123", L"13+456", L"1,34", L"12 3", L"1'2'3'4", L"1_2_3_4", L"15e-23"/*note: here is considered as E of hex*/, L"\r1", L"\n\r1,4", L"\n1,4\n", L"\f\n1+2\t\r\v", L"\n 1+\n2 ", L"e+24", L"1\"2", L"(23)+(4)", L"aef", L"ABab", L"A1a3"/*within boundary*/, L"0x1234", L"0xab12", L"0X1234", L"AB12h", L"BC34H", L"1234u", L"1234ul", L"1234ULL" };
|
||||||
String^ wordNegativeInput[] = { L"+123", L"1.23"/*floating number*/, L"1''2", L"'123", L"123'", L"1__2", L"_123", L"123_", L"-133", L"1.2e+023", L"1.2e23"/*unsigned exponent*/, L"xyz", L"A1a3b"/*outside boundary of 4 digitis*/, L"SIN(2)", L"123+-234", L"1234x", L"A0x1234", L"0xx1234", L"1234uu", L"1234ulll" };
|
String^ wordNegativeInput[] = { L"+123", L"1.23"/*floating number*/, L"1''2", L"'123", L"123'", L"1__2", L"_123", L"123_", L"-133", L"1.2e+023", L"1.2e23"/*unsigned exponent*/, L"xyz", L"A1a3b"/*outside boundary of 4 digits*/, L"SIN(2)", L"123+-234", L"1234x", L"A0x1234", L"0xx1234", L"1234uu", L"1234ulll" };
|
||||||
|
|
||||||
ASSERT_POSITIVE_TESTCASES(ValidateProgrammerHexWordPasteExpression, wordPositiveInput);
|
ASSERT_POSITIVE_TESTCASES(ValidateProgrammerHexWordPasteExpression, wordPositiveInput);
|
||||||
ASSERT_NEGATIVE_TESTCASES(ValidateProgrammerHexWordPasteExpression, wordNegativeInput);
|
ASSERT_NEGATIVE_TESTCASES(ValidateProgrammerHexWordPasteExpression, wordNegativeInput);
|
||||||
|
|
||||||
String^ bytePositiveInput[] = { L"13", L"13+6", L"1,4", L"2 3", L"1'2", L"1_2", L"5e-3"/*note: here is considered as E of hex*/, L"\r1", L"a", L"ab", L"A1"/*within boundary*/, L"0x12", L"0xab", L"0X12", L"A9h", L"B8H", L"12u", L"12ul", L"12ULL" };
|
String^ bytePositiveInput[] = { L"13", L"13+6", L"1,4", L"2 3", L"1'2", L"1_2", L"5e-3"/*note: here is considered as E of hex*/, L"\r1", L"a", L"ab", L"A1"/*within boundary*/, L"0x12", L"0xab", L"0X12", L"A9h", L"B8H", L"12u", L"12ul", L"12ULL" };
|
||||||
String^ byteNegativeInput[] = { L"+3", L"1.2"/*floating number*/, L"1''2", L"'12", L"12'", L"1__2", L"_12", L"12_", L"-3", L"1.1e+02", L"1.2e3"/*unsigned exponent*/, L"xz", L"A3a"/*outside boundary of 2 digitis*/, L"SIN(2)", L"13+-23", L"12x", L"A0x1", L"0xx12", L"12uu", L"12ulll" };
|
String^ byteNegativeInput[] = { L"+3", L"1.2"/*floating number*/, L"1''2", L"'12", L"12'", L"1__2", L"_12", L"12_", L"-3", L"1.1e+02", L"1.2e3"/*unsigned exponent*/, L"xz", L"A3a"/*outside boundary of 2 digits*/, L"SIN(2)", L"13+-23", L"12x", L"A0x1", L"0xx12", L"12uu", L"12ulll" };
|
||||||
|
|
||||||
ASSERT_POSITIVE_TESTCASES(ValidateProgrammerHexBytePasteExpression, bytePositiveInput);
|
ASSERT_POSITIVE_TESTCASES(ValidateProgrammerHexBytePasteExpression, bytePositiveInput);
|
||||||
ASSERT_NEGATIVE_TESTCASES(ValidateProgrammerHexBytePasteExpression, byteNegativeInput);
|
ASSERT_NEGATIVE_TESTCASES(ValidateProgrammerHexBytePasteExpression, byteNegativeInput);
|
||||||
|
@ -79,7 +79,7 @@ namespace CalculatorUnitTests
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create 3 separate instances of Calulator in different modes
|
// Create 3 separate instances of Calculator in different modes
|
||||||
TEST_METHOD(InitializeMultipleModeInstancesTest)
|
TEST_METHOD(InitializeMultipleModeInstancesTest)
|
||||||
{
|
{
|
||||||
std::vector<StandardCalculatorViewModel^> viewModels(3);
|
std::vector<StandardCalculatorViewModel^> viewModels(3);
|
||||||
@ -584,7 +584,7 @@ namespace CalculatorUnitTests
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Perform calculations on 3 separate instances of Calcuator and verify that their Memory List items are maintained separately
|
// Perform calculations on 3 separate instances of Calculator and verify that their Memory List items are maintained separately
|
||||||
TEST_METHOD(MultipleModesMemoryAddItemTest)
|
TEST_METHOD(MultipleModesMemoryAddItemTest)
|
||||||
{
|
{
|
||||||
std::vector<StandardCalculatorViewModel^> viewModels(3);
|
std::vector<StandardCalculatorViewModel^> viewModels(3);
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
|
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
|
||||||
|
|
||||||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||||
<Namespace Name="DataClasses.ViewModels" Seralize="All" />
|
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||||
|
Loading…
Reference in New Issue
Block a user