diff options
author | Stephane Delcroix <stephane@delcroix.org> | 2016-08-15 22:18:26 +0200 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-08-15 13:18:26 -0700 |
commit | a1126ab66bc9bd41cfa32dbefbe5758bcf5b4b32 (patch) | |
tree | d586aaffcf721ef9cd7558335757050a9c8b1f2e /Xamarin.Forms.Xaml.UnitTests | |
parent | 90396b0ffdecf65b8e2eea8eb4f148bdea1071c4 (diff) | |
download | xamarin-forms-a1126ab66bc9bd41cfa32dbefbe5758bcf5b4b32.tar.gz xamarin-forms-a1126ab66bc9bd41cfa32dbefbe5758bcf5b4b32.tar.bz2 xamarin-forms-a1126ab66bc9bd41cfa32dbefbe5758bcf5b4b32.zip |
[Xaml] Simplify listnodes with single elements (#304)
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests')
-rw-r--r-- | Xamarin.Forms.Xaml.UnitTests/SetValue.xaml | 9 | ||||
-rw-r--r-- | Xamarin.Forms.Xaml.UnitTests/SetValue.xaml.cs | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/SetValue.xaml b/Xamarin.Forms.Xaml.UnitTests/SetValue.xaml index 133e0e9b..da844ed0 100644 --- a/Xamarin.Forms.Xaml.UnitTests/SetValue.xaml +++ b/Xamarin.Forms.Xaml.UnitTests/SetValue.xaml @@ -3,6 +3,9 @@ xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:Xamarin.Forms.Xaml.UnitTests" + xmlns:d="ignoreme" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + mc:Ignorable="d" x:Class="Xamarin.Forms.Xaml.UnitTests.SetValue"> <ContentPage.Resources> <ResourceDictionary> @@ -74,5 +77,11 @@ <StackLayout x:Name="stack4"> <local:ConvertibleToView/> </StackLayout> + <ContentView x:Name="contentview2"> + <ContentView.Content> + <Label /> + <d:IgnorableElement /> + </ContentView.Content> + </ContentView> </StackLayout> </ContentPage>
\ No newline at end of file diff --git a/Xamarin.Forms.Xaml.UnitTests/SetValue.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/SetValue.xaml.cs index ce377a71..2226402c 100644 --- a/Xamarin.Forms.Xaml.UnitTests/SetValue.xaml.cs +++ b/Xamarin.Forms.Xaml.UnitTests/SetValue.xaml.cs @@ -207,6 +207,14 @@ namespace Xamarin.Forms.Xaml.UnitTests var page = new SetValue(useCompiledXaml); Assert.That(page.stack4.Children[0], Is.TypeOf<Button>()); } + + [TestCase(false)] + [TestCase(true)] + public void ListsAreSimplified(bool useCompiledXaml) + { + var page = new SetValue(useCompiledXaml); + Assert.That(page.contentview2.Content, Is.TypeOf<Label>()); + } } } }
\ No newline at end of file |