Skip to content

Commit

Permalink
release-v1.12.0
Browse files Browse the repository at this point in the history
\r\n***PUBLISH_RELEASE***
  • Loading branch information
nfbot authored Mar 28, 2022
2 parents 37764a4 + 81c414b commit 37d0ee7
Show file tree
Hide file tree
Showing 81 changed files with 3,152 additions and 832 deletions.
6 changes: 3 additions & 3 deletions Tests/NFUnitTestArithmetic/NFUnitTestArithmetic.nfproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ProjectCapability Include="TestContainer" />
</ItemGroup>
<PropertyGroup Label="Globals">
<NanoFrameworkProjectSystemPath>$(MSBuildToolsPath)..\..\..\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
<NanoFrameworkProjectSystemPath>$(MSBuildExtensionsPath)\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
</PropertyGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props')" />
<PropertyGroup>
Expand Down Expand Up @@ -44,7 +44,7 @@
</ItemGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
<!-- MANUAL UPDATE HERE -->
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets')" />
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets')" />
<ProjectExtensions>
<ProjectCapabilities>
<ProjectConfigurationsDeclaredAsItems />
Expand All @@ -54,6 +54,6 @@
<PropertyGroup>
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
</PropertyGroup>
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
</Target>
</Project>
60 changes: 44 additions & 16 deletions Tests/NFUnitTestArithmetic/UnitTestFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,82 +253,110 @@ private void TestFormatInner(string valueStr, string formatString, string expect
&& (numType == NumType.IntOnly || numType == NumType.All)
)
{
CheckValue(SByte.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.SByte, rowData);
CheckValue(sbyte.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.SByte, rowData);

Assert.True(sbyte.TryParse(valueStr, out sbyte result), $"TryParse failed for sbyte {valueStr}");
CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.SByte, rowData);
}

if (value <= Int16.MaxValue
&& value >= Int16.MinValue
&& (numType == NumType.IntOnly || numType == NumType.All)
)
{
CheckValue(Int16.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Int16, rowData);
CheckValue(short.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Int16, rowData);

Assert.True(short.TryParse(valueStr, out short result), $"TryParse failed for short {valueStr}");
CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Int16, rowData);
}

if (value <= Int32.MaxValue
&& value >= Int32.MinValue
&& (numType == NumType.IntOnly || numType == NumType.All)
)
{
CheckValue(Int32.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Int32, rowData);
CheckValue(int.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Int32, rowData);

Assert.True(int.TryParse(valueStr, out int result), $"TryParse failed for int {valueStr}");
CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Int32, rowData);
}

if (value <= Int64.MaxValue
&& value >= Int64.MinValue
&& (numType == NumType.IntOnly || numType == NumType.All)
)
{
CheckValue(Int64.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Int64, rowData);
CheckValue(long.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Int64, rowData);

Assert.True(long.TryParse(valueStr, out long result), $"TryParse failed for long {valueStr}");
CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Int64, rowData);
}

if (value <= Byte.MaxValue
&& value >= Byte.MinValue
&& (numType == NumType.IntOnly || numType == NumType.All)
&& isNegative == false)
&& !isNegative)
{
CheckValue(Byte.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Byte, rowData);
CheckValue(byte.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Byte, rowData);

Assert.True(byte.TryParse(valueStr, out byte result), $"TryParse failed for byte {valueStr}");
CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Byte, rowData);
}

if (value <= UInt16.MaxValue
&& value >= UInt16.MinValue
&& (numType == NumType.IntOnly || numType == NumType.All)
&& isNegative == false)
&& !isNegative)
{
CheckValue(UInt16.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.UInt16, rowData);
CheckValue(ushort.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.UInt16, rowData);

Assert.True(ushort.TryParse(valueStr, out ushort result), $"TryParse failed for ushort {valueStr}");
CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.UInt16, rowData);
}

if (value <= UInt32.MaxValue
&& value >= UInt32.MinValue
&& (numType == NumType.IntOnly || numType == NumType.All)
&& isNegative == false)
&& !isNegative)
{
CheckValue(UInt32.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.UInt32, rowData);
CheckValue(uint.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.UInt32, rowData);

Assert.True(uint.TryParse(valueStr, out uint result), $"TryParse failed for uint {valueStr}");
CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.UInt32, rowData);
}

if (value <= UInt64.MaxValue
&& value >= UInt64.MinValue
&& (numType == NumType.IntOnly || numType == NumType.All)
&& isNegative == false)
&& !isNegative)
{
CheckValue(UInt64.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.UInt64, rowData);
CheckValue(ulong.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.UInt64, rowData);

Assert.True(ulong.TryParse(valueStr, out ulong result), $"TryParse failed for ulong {valueStr}");
CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.UInt64, rowData);
}

if (value <= Single.MaxValue
&& value >= Single.MinValue
&& (numType == NumType.FloatDoubleOnly || numType == NumType.All)
)
{
CheckValue(Single.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Single, rowData);
CheckValue(float.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Single, rowData);

Assert.True(float.TryParse(valueStr, out float result), $"TryParse failed for float {valueStr}");
CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Single, rowData);
}

if (value <= Double.MaxValue
&& value >= Double.MinValue
&& (numType == NumType.FloatDoubleOnly || numType == NumType.All)
)
{
CheckValue(Double.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Double, rowData);
}

CheckValue(double.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Double, rowData);

Assert.True(double.TryParse(valueStr, out double result), $"TryParse failed for double {valueStr}");
CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Double, rowData);
}
}

private void CheckValue(object value, string valueStr, string formatString, string expectedResult, SampleDisplay.ColumnType columnType, SampleDisplay.RowData rowData)
Expand Down
6 changes: 3 additions & 3 deletions Tests/NFUnitTestArray/NFUnitTestArray.nfproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ProjectCapability Include="TestContainer" />
</ItemGroup>
<PropertyGroup Label="Globals">
<NanoFrameworkProjectSystemPath>$(MSBuildToolsPath)..\..\..\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
<NanoFrameworkProjectSystemPath>$(MSBuildExtensionsPath)\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
</PropertyGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props')" />
<PropertyGroup>
Expand Down Expand Up @@ -41,7 +41,7 @@
</ItemGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
<!-- MANUAL UPDATE HERE -->
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets')" />
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets')" />
<ProjectExtensions>
<ProjectCapabilities>
<ProjectConfigurationsDeclaredAsItems />
Expand All @@ -51,6 +51,6 @@
<PropertyGroup>
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
</PropertyGroup>
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
</Target>
</Project>
6 changes: 3 additions & 3 deletions Tests/NFUnitTestAttributes/NFUnitTestAttributes.nfproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ProjectCapability Include="TestContainer" />
</ItemGroup>
<PropertyGroup Label="Globals">
<NanoFrameworkProjectSystemPath>$(MSBuildToolsPath)..\..\..\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
<NanoFrameworkProjectSystemPath>$(MSBuildExtensionsPath)\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
</PropertyGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props')" />
<PropertyGroup>
Expand Down Expand Up @@ -40,7 +40,7 @@
</ItemGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
<!-- MANUAL UPDATE HERE -->
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets')" />
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets')" />
<ProjectExtensions>
<ProjectCapabilities>
<ProjectConfigurationsDeclaredAsItems />
Expand All @@ -50,6 +50,6 @@
<PropertyGroup>
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
</PropertyGroup>
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
</Target>
</Project>
6 changes: 3 additions & 3 deletions Tests/NFUnitTestBasicConcepts/NFUnitTestBasicConcepts.nfproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ProjectCapability Include="TestContainer" />
</ItemGroup>
<PropertyGroup Label="Globals">
<NanoFrameworkProjectSystemPath>$(MSBuildToolsPath)..\..\..\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
<NanoFrameworkProjectSystemPath>$(MSBuildExtensionsPath)\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
</PropertyGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props')" />
<PropertyGroup>
Expand Down Expand Up @@ -40,7 +40,7 @@
</ItemGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
<!-- MANUAL UPDATE HERE -->
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets')" />
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets')" />
<ProjectExtensions>
<ProjectCapabilities>
<ProjectConfigurationsDeclaredAsItems />
Expand All @@ -50,6 +50,6 @@
<PropertyGroup>
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
</PropertyGroup>
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
</Target>
</Project>
6 changes: 3 additions & 3 deletions Tests/NFUnitTestBitConverter/NFUnitTestBitConverter.nfproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ProjectCapability Include="TestContainer" />
</ItemGroup>
<PropertyGroup Label="Globals">
<NanoFrameworkProjectSystemPath>$(MSBuildToolsPath)..\..\..\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
<NanoFrameworkProjectSystemPath>$(MSBuildExtensionsPath)\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
</PropertyGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props')" />
<PropertyGroup>
Expand Down Expand Up @@ -41,7 +41,7 @@
</ItemGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
<!-- MANUAL UPDATE HERE -->
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets')" />
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets')" />
<ProjectExtensions>
<ProjectCapabilities>
<ProjectConfigurationsDeclaredAsItems />
Expand All @@ -51,6 +51,6 @@
<PropertyGroup>
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
</PropertyGroup>
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
</Target>
</Project>
6 changes: 3 additions & 3 deletions Tests/NFUnitTestClasses/NFUnitTestClasses.nfproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ProjectCapability Include="TestContainer" />
</ItemGroup>
<PropertyGroup Label="Globals">
<NanoFrameworkProjectSystemPath>$(MSBuildToolsPath)..\..\..\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
<NanoFrameworkProjectSystemPath>$(MSBuildExtensionsPath)\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
</PropertyGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props')" />
<PropertyGroup>
Expand Down Expand Up @@ -51,7 +51,7 @@
</ItemGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
<!-- MANUAL UPDATE HERE -->
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets')" />
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets')" />
<ProjectExtensions>
<ProjectCapabilities>
<ProjectConfigurationsDeclaredAsItems />
Expand All @@ -61,6 +61,6 @@
<PropertyGroup>
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
</PropertyGroup>
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.157\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.170\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
</Target>
</Project>
Loading

0 comments on commit 37d0ee7

Please sign in to comment.