summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml.UnitTests/Issues/Issue2450.xaml.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests/Issues/Issue2450.xaml.cs')
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/Issues/Issue2450.xaml.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Issue2450.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/Issues/Issue2450.xaml.cs
index 0cf6f56c..2d330934 100644
--- a/Xamarin.Forms.Xaml.UnitTests/Issues/Issue2450.xaml.cs
+++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Issue2450.xaml.cs
@@ -5,6 +5,8 @@ using Xamarin.Forms.Core.UnitTests;
namespace Xamarin.Forms.Xaml.UnitTests
{
+ //this covers Issue2125 as well
+ [XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Issue2450 : ContentPage
{
public Issue2450 ()
@@ -30,7 +32,12 @@ namespace Xamarin.Forms.Xaml.UnitTests
[TestCase (true)]
public void ThrowMeaningfulExceptionOnDuplicateXName (bool useCompiledXaml)
{
- Assert.Throws (new XamlParseExceptionConstraint (8, 10, m => m == "An element with the name \"label0\" already exists in this NameScope"), () => new Issue2450 (useCompiledXaml));
+ if (useCompiledXaml)
+ Assert.Throws(new XamlParseExceptionConstraint(8, 10, m => m == "An element with the name \"label0\" already exists in this NameScope"),
+ () => MockCompiler.Compile(typeof(Issue2450)));
+ else
+ Assert.Throws(new XamlParseExceptionConstraint(8, 10, m => m == "An element with the name \"label0\" already exists in this NameScope"),
+ () => new Issue2450(useCompiledXaml));
}
}
}