diff options
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests/Issues')
-rw-r--r-- | Xamarin.Forms.Xaml.UnitTests/Issues/Bz43450.xaml | 15 | ||||
-rw-r--r-- | Xamarin.Forms.Xaml.UnitTests/Issues/Bz43450.xaml.cs | 32 |
2 files changed, 47 insertions, 0 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Bz43450.xaml b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz43450.xaml new file mode 100644 index 00000000..cc234879 --- /dev/null +++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz43450.xaml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" + xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" + x:Class="Xamarin.Forms.Xaml.UnitTests.Bz43450"> + <Grid> + <Grid.RowDefinition> + <RowDefinition Height="20"/> + <RowDefinition Height="*"/> + <RowDefinition Height="20"/> + </Grid.RowDefinition> + <BoxView BackgroundColor="Red"/> + <BoxView Grid.Row="1" BackgroundColor="Yellow"/> + <BoxView Grid.Row="2" BackgroundColor="Green"/> + </Grid> +</ContentPage>
\ No newline at end of file diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Bz43450.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz43450.xaml.cs new file mode 100644 index 00000000..b3346b37 --- /dev/null +++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz43450.xaml.cs @@ -0,0 +1,32 @@ +using NUnit.Framework; + +namespace Xamarin.Forms.Xaml.UnitTests +{ + [XamlCompilation(XamlCompilationOptions.Skip)] + public partial class Bz43450 : ContentPage + { + public Bz43450() + { + InitializeComponent(); + } + + public Bz43450(bool useCompiledXaml) + { + //this stub will be replaced at compile time + } + + [TestFixture] + class Tests + { + [TestCase(true)] + [TestCase(false)] + public void DoesNotAllowGridRowDefinition(bool useCompiledXaml) + { + if (!useCompiledXaml) + Assert.Throws<XamlParseException>(() => new Bz43450(useCompiledXaml)); + else + Assert.Throws<XamlParseException>(() => MockCompiler.Compile(typeof(Bz43450))); + } + } + } +}
\ No newline at end of file |