summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml.UnitTests
diff options
context:
space:
mode:
authorPaul DiPietro <paul.dipietro@me.com>2016-04-11 09:50:28 -0700
committerJason Smith <jason.smith@xamarin.com>2016-04-11 09:50:28 -0700
commitb2ad3e53a8ae03536cf9071b0bd5d0207ee2f10c (patch)
tree227d1614c84e3d2dbe7f6231276955a6a174ff6d /Xamarin.Forms.Xaml.UnitTests
parentc0468f1cc33fc4dc415c3a3ca4dc71986b04fc9c (diff)
downloadxamarin-forms-b2ad3e53a8ae03536cf9071b0bd5d0207ee2f10c.tar.gz
xamarin-forms-b2ad3e53a8ae03536cf9071b0bd5d0207ee2f10c.tar.bz2
xamarin-forms-b2ad3e53a8ae03536cf9071b0bd5d0207ee2f10c.zip
Enable CS0618 warnings as errors (#72)
CS0618 occurs when using an obsolete property or method. https://msdn.microsoft.com/en-us/library/x5ye6x1e.aspx
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests')
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/FontConverterTests.cs2
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/Issues/Bz24910.xaml.cs2
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/Issues/Bz29300.xaml.cs4
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/Issues/Issue2742.xaml.cs2
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/Issues/TestCases.cs2
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/LoaderTests.cs2
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/TypeConverterTestsLegacy.cs4
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj6
8 files changed, 21 insertions, 3 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/FontConverterTests.cs b/Xamarin.Forms.Xaml.UnitTests/FontConverterTests.cs
index fc5e25b0..ce8d55e4 100644
--- a/Xamarin.Forms.Xaml.UnitTests/FontConverterTests.cs
+++ b/Xamarin.Forms.Xaml.UnitTests/FontConverterTests.cs
@@ -21,7 +21,9 @@ namespace Xamarin.Forms.Xaml.UnitTests
var label = new Label ().LoadFromXaml (xaml);
Assert.AreEqual (result, label.FontAttributes);
+#pragma warning disable 618
Assert.AreEqual (result, label.Font.FontAttributes);
+#pragma warning restore 618
}
}
} \ No newline at end of file
diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Bz24910.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz24910.xaml.cs
index 50dad4f7..0fa35cc1 100644
--- a/Xamarin.Forms.Xaml.UnitTests/Issues/Bz24910.xaml.cs
+++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz24910.xaml.cs
@@ -102,7 +102,9 @@ namespace Xamarin.Forms.Xaml.UnitTests
}
public static readonly BindableProperty AttachedNullableIntProperty =
+#pragma warning disable 618
BindableProperty.CreateAttached<Bz24910Control, int?> (bindable => GetAttachedNullableInt (bindable), default(int?));
+#pragma warning restore 618
public static int? GetAttachedNullableInt (BindableObject bindable)
{
diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Bz29300.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz29300.xaml.cs
index 3548fc14..3fe04a3f 100644
--- a/Xamarin.Forms.Xaml.UnitTests/Issues/Bz29300.xaml.cs
+++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz29300.xaml.cs
@@ -10,10 +10,14 @@ namespace Xamarin.Forms.Xaml.UnitTests
public class Bz29300DummyView : StackLayout
{
public static readonly BindableProperty NumOfRepeatProperty =
+#pragma warning disable 618
BindableProperty.Create<Bz29300DummyView, int> (p => p.NumOfRepeat, 1, BindingMode.OneWay, null, UpdateTexts);
+#pragma warning restore 618
public static readonly BindableProperty TextProperty =
+#pragma warning disable 618
BindableProperty.Create<Bz29300DummyView, string> (p => p.Text, string.Empty, BindingMode.OneWay, null, UpdateTexts);
+#pragma warning restore 618
public int NumOfRepeat
{
diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Issue2742.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/Issues/Issue2742.xaml.cs
index ba69280d..00fd6260 100644
--- a/Xamarin.Forms.Xaml.UnitTests/Issues/Issue2742.xaml.cs
+++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Issue2742.xaml.cs
@@ -38,7 +38,9 @@ namespace Xamarin.Forms.Xaml.UnitTests
Assert.NotNull (layout.ToolbarItems);
Assert.AreEqual (2, layout.ToolbarItems.Count);
+#pragma warning disable 618
Assert.AreEqual ("One", layout.ToolbarItems [0].Name);
+#pragma warning restore 618
}
}
}
diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/TestCases.cs b/Xamarin.Forms.Xaml.UnitTests/Issues/TestCases.cs
index ba3c2c2f..04d7ff0d 100644
--- a/Xamarin.Forms.Xaml.UnitTests/Issues/TestCases.cs
+++ b/Xamarin.Forms.Xaml.UnitTests/Issues/TestCases.cs
@@ -27,7 +27,9 @@ namespace Xamarin.Forms.Xaml.UnitTests
}
public static readonly BindableProperty InnerViewProperty =
+#pragma warning disable 618
BindableProperty.CreateAttached<TestCases, View> (bindable => GetInnerView (bindable), default(View));
+#pragma warning restore 618
public static View GetInnerView (BindableObject bindable)
{
diff --git a/Xamarin.Forms.Xaml.UnitTests/LoaderTests.cs b/Xamarin.Forms.Xaml.UnitTests/LoaderTests.cs
index c31ae0db..f132b19c 100644
--- a/Xamarin.Forms.Xaml.UnitTests/LoaderTests.cs
+++ b/Xamarin.Forms.Xaml.UnitTests/LoaderTests.cs
@@ -57,7 +57,9 @@ namespace Xamarin.Forms.Xaml.UnitTests
public class Catalog
{
public static readonly BindableProperty MessageProperty =
+#pragma warning disable 618
BindableProperty.CreateAttached<Catalog, string> (bindable => GetMessage (bindable), default(string),
+#pragma warning restore 618
propertyChanged: (bindable, oldvalue, newvalue) => {
var label = bindable as Label;
if (label != null)
diff --git a/Xamarin.Forms.Xaml.UnitTests/TypeConverterTestsLegacy.cs b/Xamarin.Forms.Xaml.UnitTests/TypeConverterTestsLegacy.cs
index c9f3a382..9d5051f3 100644
--- a/Xamarin.Forms.Xaml.UnitTests/TypeConverterTestsLegacy.cs
+++ b/Xamarin.Forms.Xaml.UnitTests/TypeConverterTestsLegacy.cs
@@ -63,7 +63,9 @@ namespace Xamarin.Forms.Xaml.UnitTests
public Foo Foo { get; set; }
public static readonly BindableProperty BarProperty =
+#pragma warning disable 618
BindableProperty.Create<Bindable, Bar> (w => w.Bar, default(Bar));
+#pragma warning restore 618
[TypeConverter (typeof(BarConverter))]
public Bar Bar {
@@ -74,7 +76,9 @@ namespace Xamarin.Forms.Xaml.UnitTests
public Baz Baz { get; set; }
public static readonly BindableProperty QuxProperty =
+#pragma warning disable 618
BindableProperty.CreateAttached<Bindable, Qux> (bindable => GetQux (bindable), default(Qux));
+#pragma warning restore 618
[TypeConverter (typeof(QuxConverter))]
public static Qux GetQux (BindableObject bindable)
diff --git a/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj b/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj
index e058f9f9..ff6ebee4 100644
--- a/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj
+++ b/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj
@@ -21,7 +21,7 @@
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0672;0618;1998;0219;0414</NoWarn>
+ <NoWarn>0672;1998;0219;0414</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
@@ -31,7 +31,7 @@
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0672;0618;1998;0219;0414</NoWarn>
+ <NoWarn>0672;1998;0219;0414</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Turkey|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
@@ -44,7 +44,7 @@
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0672;0618;1998;0219;0414</NoWarn>
+ <NoWarn>0672;1998;0219;0414</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">