From 032e339299253eca2d7354e5236c49b2d2a310a0 Mon Sep 17 00:00:00 2001 From: Ranjesh <28935693+ranjeshj@users.noreply.github.com> Date: Sun, 2 Feb 2020 03:36:28 -0800 Subject: [PATCH] Fix stack overflow with two way x:Bind to NumberBox.Value (#1905) --- dev/Generated/NumberBox.properties.cpp | 2 +- .../InteractionTests/NumberBoxTests.cs | 6 +++ dev/NumberBox/NumberBox.cpp | 18 +++++++++ dev/NumberBox/NumberBox.h | 3 ++ dev/NumberBox/TestUI/NumberBoxPage.xaml | 11 ++++- dev/NumberBox/TestUI/NumberBoxPage.xaml.cs | 40 +++++++++++++++++-- 6 files changed, 75 insertions(+), 5 deletions(-) diff --git a/dev/Generated/NumberBox.properties.cpp b/dev/Generated/NumberBox.properties.cpp index 480ac24d9c..0fd89ac118 100644 --- a/dev/Generated/NumberBox.properties.cpp +++ b/dev/Generated/NumberBox.properties.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen diff --git a/dev/NumberBox/InteractionTests/NumberBoxTests.cs b/dev/NumberBox/InteractionTests/NumberBoxTests.cs index fc7a969b11..86e9d9dda5 100644 --- a/dev/NumberBox/InteractionTests/NumberBoxTests.cs +++ b/dev/NumberBox/InteractionTests/NumberBoxTests.cs @@ -426,6 +426,12 @@ public void ValueChangedTest() Verify.AreEqual("NaN", newValueTextBlock.GetText()); Verify.AreEqual("100", oldValueTextBlock.GetText()); + Log.Comment("Verify that setting two way bound value to NaN doesn't cause a crash"); + Button twoWayBindNanbutton = FindElement.ByName