diff options
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests')
3 files changed, 44 insertions, 2 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Bz43301.xaml b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz43301.xaml new file mode 100644 index 00000000..283ec9b9 --- /dev/null +++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz43301.xaml @@ -0,0 +1,5 @@ +<?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="Foo.Xamarin.Bar.Bz43301"> + <ContentPage.Content> + </ContentPage.Content> +</ContentPage> diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Bz43301.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz43301.xaml.cs new file mode 100644 index 00000000..e57f42d1 --- /dev/null +++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz43301.xaml.cs @@ -0,0 +1,31 @@ +using Xamarin.Forms; +using NUnit.Framework; + +namespace Foo.Xamarin.Bar +{ + public partial class Bz43301 : ContentPage + { + public Bz43301() + { + InitializeComponent(); + } + + public Bz43301(bool useCompiledXaml) + { + //this stub will be replaced at compile time + } + + [TestFixture] + class Tests + { + [TestCase(true)] + [TestCase(false)] + //No need for any actual [Test]. If this compiles, the bug is fixed. + public void DoesCompile(bool useCompiledXaml) + { + var layout = new Bz43301(useCompiledXaml); + Assert.Pass(); + } + } + } +}
\ No newline at end of file diff --git a/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj b/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj index dc7f7ea1..a5ebbd92 100644 --- a/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj +++ b/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj @@ -368,9 +368,12 @@ <Compile Include="XStaticException.xaml.cs"> <DependentUpon>XStaticException.xaml</DependentUpon> </Compile> - <Compile Include="CompiledTypeConverter.xaml.cs" > + <Compile Include="CompiledTypeConverter.xaml.cs"> <DependentUpon>CompiledTypeConverter.xaml</DependentUpon> </Compile> + <Compile Include="Issues\Bz43301.xaml.cs"> + <DependentUpon>Bz43301.xaml</DependentUpon> + </Compile> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="..\.nuspec\Xamarin.Forms.Debug.targets" /> @@ -656,7 +659,10 @@ <EmbeddedResource Include="XStaticException.xaml"> <Generator>MSBuild:UpdateDesignTimeXaml</Generator> </EmbeddedResource> - <EmbeddedResource Include="CompiledTypeConverter.xaml" > + <EmbeddedResource Include="CompiledTypeConverter.xaml"> + <Generator>MSBuild:UpdateDesignTimeXaml</Generator> + </EmbeddedResource> + <EmbeddedResource Include="Issues\Bz43301.xaml"> <Generator>MSBuild:UpdateDesignTimeXaml</Generator> </EmbeddedResource> </ItemGroup> |