summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core.UnitTests
diff options
context:
space:
mode:
authorkingces95 <kingces95@users.noreply.github.com>2016-04-24 15:58:46 -0700
committerRui Marinho <me@ruimarinho.net>2016-04-24 18:58:46 -0400
commitee5654f8fe4f15817a8bd23e0613a6d0f9d4c9ec (patch)
tree31307da5739e093401b9b5a7074f44801c6c688b /Xamarin.Forms.Core.UnitTests
parent053b7c272a96ac396fd849bcd1f6c84cbde456cf (diff)
downloadxamarin-forms-ee5654f8fe4f15817a8bd23e0613a6d0f9d4c9ec.tar.gz
xamarin-forms-ee5654f8fe4f15817a8bd23e0613a6d0f9d4c9ec.tar.bz2
xamarin-forms-ee5654f8fe4f15817a8bd23e0613a6d0f9d4c9ec.zip
Enable Warnings as Errors on all plat|cfg of XF.Core.UnitTests (#95)
* Enable Warnings as Errors on all plat|cfg of XF.Core.UnitTests * Fix build errors
Diffstat (limited to 'Xamarin.Forms.Core.UnitTests')
-rw-r--r--Xamarin.Forms.Core.UnitTests/DatePickerUnitTest.cs10
-rw-r--r--Xamarin.Forms.Core.UnitTests/NotifiedPropertiesTests.cs2
-rw-r--r--Xamarin.Forms.Core.UnitTests/Xamarin.Forms.Core.UnitTests.csproj6
3 files changed, 13 insertions, 5 deletions
diff --git a/Xamarin.Forms.Core.UnitTests/DatePickerUnitTest.cs b/Xamarin.Forms.Core.UnitTests/DatePickerUnitTest.cs
index 97bbf410..25269edb 100644
--- a/Xamarin.Forms.Core.UnitTests/DatePickerUnitTest.cs
+++ b/Xamarin.Forms.Core.UnitTests/DatePickerUnitTest.cs
@@ -127,11 +127,11 @@ namespace Xamarin.Forms.Core.UnitTests
Assert.True (selected);
}
- static object[] DateTimes = {
- new object[] { new DateTime (2006, 12, 20), new DateTime (2011, 11, 30) },
- new object[] { new DateTime (1900, 1, 1), new DateTime (1999, 01, 15) }, // Minimum Date
- new object[] { new DateTime (2006, 12, 20), new DateTime (2100, 12, 31) } // Maximum Date
- };
+ //static object[] DateTimes = {
+ // new object[] { new DateTime (2006, 12, 20), new DateTime (2011, 11, 30) },
+ // new object[] { new DateTime (1900, 1, 1), new DateTime (1999, 01, 15) }, // Minimum Date
+ // new object[] { new DateTime (2006, 12, 20), new DateTime (2100, 12, 31) } // Maximum Date
+ //};
[Test, TestCaseSource("DateTimes")]
public void DatePickerSelectedEventArgs (DateTime initialDate, DateTime finalDate)
diff --git a/Xamarin.Forms.Core.UnitTests/NotifiedPropertiesTests.cs b/Xamarin.Forms.Core.UnitTests/NotifiedPropertiesTests.cs
index 344606bf..ede7e0de 100644
--- a/Xamarin.Forms.Core.UnitTests/NotifiedPropertiesTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/NotifiedPropertiesTests.cs
@@ -54,6 +54,7 @@ namespace Xamarin.Forms.Core.UnitTests
}
}
+#pragma warning disable 0414
static PropertyTestCase[] Properties = {
new PropertyTestCase<View, ResourceDictionary> ("Resources", v => v.Resources, (v, o) => v.Resources = o, () => null, new ResourceDictionary ()),
new PropertyTestCase<View, bool> ("InputTransparent", v => v.InputTransparent, (v, o) => v.InputTransparent = o, () => false, true),
@@ -151,6 +152,7 @@ namespace Xamarin.Forms.Core.UnitTests
new PropertyTestCase<TapGestureRecognizer, ICommand> ("Command", t => t.Command, (t, o) => t.Command = o, () => null, new Command(()=>{})),
new PropertyTestCase<MasterDetailPage, bool> ("IsGestureEnabled", md => md.IsGestureEnabled, (md, v) => md.IsGestureEnabled = v, () => true, false)
};
+#pragma warning restore 0414
[SetUp]
public override void Setup ()
diff --git a/Xamarin.Forms.Core.UnitTests/Xamarin.Forms.Core.UnitTests.csproj b/Xamarin.Forms.Core.UnitTests/Xamarin.Forms.Core.UnitTests.csproj
index a7324ca1..2609eef6 100644
--- a/Xamarin.Forms.Core.UnitTests/Xamarin.Forms.Core.UnitTests.csproj
+++ b/Xamarin.Forms.Core.UnitTests/Xamarin.Forms.Core.UnitTests.csproj
@@ -22,6 +22,8 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <NoWarn>0114;0672;0108;0067;0168;0169;0219;0612;0618;1998;4014</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -30,6 +32,8 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <NoWarn>0114;0672;0108;0067;0168;0169;0219;0612;0618;1998;4014</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Turkey|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
@@ -39,6 +43,8 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <NoWarn>0114;0672;0108;0067;0168;0169;0219;0612;0618;1998;4014</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework">