<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
- <ItemGroup>
<Compile Include="$(CommonTestPath)\System\Collections\DictionaryExtensions.cs">
<Link>Common\System\Collections\DictionaryExtensions.cs</Link>
</Compile>
[Theory]
[MemberData(nameof(TestDebuggerAttributes_Inputs))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes(object obj)
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(obj);
[Theory]
[MemberData(nameof(TestDebuggerAttributes_Inputs))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes_Null(object obj)
{
Type proxyType = DebuggerAttributes.GetProxyType(obj);
</Compile>
</ItemGroup>
<ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
- <ItemGroup>
<ProjectReference Include="..\ModuleCore\ModuleCore.csproj" />
<ProjectReference Include="..\XmlDiff\XmlDiff.csproj" />
</ItemGroup>
</Compile>
</ItemGroup>
<ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
- <ItemGroup>
<ProjectReference Include="..\ModuleCore\ModuleCore.csproj" />
</ItemGroup>
</Project>
\ No newline at end of file
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.Tests
-{
- /// <summary>
- /// Helper methods that exist in the platform but not in the portable Span.
- /// </summary>
- public static class SpanExtensions
- {
- public static int LastIndexOf(this ReadOnlySpan<char> span, ReadOnlySpan<char> value, StringComparison comparisonType)
- {
- return span.ToString().LastIndexOf(value.ToString(), comparisonType);
- }
- }
-}
Assert.Equal(expected, result);
if (result.Length == 0)
{
- // We return string.Empty by reference as an optimization
- // in .NET core if there is no work to do.
- if (PlatformDetection.IsFullFramework || PlatformDetection.IsNetNative)
- {
- Assert.Equal(string.Empty, result);
- }
- else
- {
- Assert.Same(string.Empty, result);
- }
+ Assert.Same(string.Empty, result);
}
};
// Concat should ignore objects that have a null ToString() value
yield return new object[] { new object[] { new ObjectWithNullToString(), "Foo", new ObjectWithNullToString(), "Bar", new ObjectWithNullToString() }, "FooBar" };
-
- if (!PlatformDetection.IsFullFramework)
- {
- yield return new object[] { new object[] { new ObjectWithNullToString() }, "" };
- }
+ yield return new object[] { new object[] { new ObjectWithNullToString() }, "" };
}
[Theory]
}
[Fact]
- [ActiveIssue(27098, TargetFrameworkMonikers.NetFramework)]
public static void GetHashCode_EmbeddedNull_ReturnsDifferentHashCodes()
{
Assert.NotEqual("\0AAAAAAAAA".GetHashCode(), "\0BBBBBBBBBBBB".GetHashCode());
[Theory]
[MemberData(nameof(Join_ObjectArray_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.Uap)]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public static void Join_ObjectArray(string separator, object[] values, string expected)
{
Assert.Equal(expected, string.Join(separator, values));
Assert.Equal(expected, string.Join(separator, (IEnumerable<object>)values));
}
- [Theory]
- [MemberData(nameof(Join_ObjectArray_TestData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Join_ObjectArray_WithNullIssue(string separator, object[] values, string expected)
- {
- string enumerableExpected = expected;
- if (values.Length > 0 && values[0] == null) // Join return nothing when first value is null
- expected = "";
- Assert.Equal(expected, string.Join(separator, values));
- Assert.Equal(enumerableExpected, string.Join(separator, (IEnumerable<object>)values));
- }
-
[Fact]
public static void Join_ObjectArray_Null_ThrowsArgumentNullException()
{
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static unsafe void Ctor_SByte_InvalidArguments()
{
AssertExtensions.Throws<ArgumentNullException>("value", () => new string ((sbyte*) null, 0, 1, Encoding.Default));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static unsafe void Ctor_SByte_NullPointer_ReturnsEmptyString()
{
Assert.Equal(string.Empty, new string((sbyte*) null));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, ".NetNative limits interning of literals to the empty string.")]
public static unsafe void InternTest()
{
AssertExtensions.Throws<ArgumentNullException>("str", () => string.Intern(null));
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{5E0DB390-A45E-41BE-8304-B840327FE597}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<RootNamespace>CoreFx.Private.TestUtilities.Tests</RootNamespace>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{72E21903-0FBA-444E-9855-3B4F05DFC1F9}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\Common\tests\System\Threading\Tasks\Sources\ManualResetValueTaskSource.cs">
{
d = Array.CreateInstance(typeof(int), new[] { 8 }, new[] { -2 });
ex = Assert.Throws<RuntimeBinderException>(() => { string s = d; });
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages.
- {
- Assert.Contains("int[*]", ex.Message);
- }
+ Assert.Contains("int[*]", ex.Message);
}
d = new int[3];
ex = Assert.Throws<RuntimeBinderException>(() => { string s = d; });
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages.
- {
- Assert.Contains("int[]", ex.Message);
- }
+ Assert.Contains("int[]", ex.Message);
}
[Fact]
{
dynamic d = new int[3, 2, 1];
RuntimeBinderException ex = Assert.Throws<RuntimeBinderException>(() => { string s = d; });
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages.
- {
- Assert.Contains("int[,,]", ex.Message);
- }
+ Assert.Contains("int[,,]", ex.Message);
if (PlatformDetection.IsNonZeroLowerBoundArraySupported)
{
d = Array.CreateInstance(typeof(int), new[] { 3, 2, 1 }, new[] { -2, 2, -0 });
ex = Assert.Throws<RuntimeBinderException>(() => { string s = d; });
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages.
- {
- Assert.Contains("int[,,]", ex.Message);
- }
+ Assert.Contains("int[,,]", ex.Message);
}
}
{
dynamic d = new int[2, 2, 2];
RuntimeBinderException ex = Assert.Throws<RuntimeBinderException>(() => d[1] = 0);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages.
- {
- Assert.Contains("[]", ex.Message);
- Assert.Contains("'3'", ex.Message);
- }
-
+ Assert.Contains("[]", ex.Message);
+ Assert.Contains("'3'", ex.Message);
ex = Assert.Throws<RuntimeBinderException>(() => d[1, 2, 3, 4] = 0);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages.
- {
- Assert.Contains("[]", ex.Message);
- Assert.Contains("'3'", ex.Message);
- }
+ Assert.Contains("[]", ex.Message);
+ Assert.Contains("'3'", ex.Message);
ex = Assert.Throws<RuntimeBinderException>(() => d[1]);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages.
- {
- Assert.Contains("[]", ex.Message);
- Assert.Contains("'3'", ex.Message);
- }
+ Assert.Contains("[]", ex.Message);
+ Assert.Contains("'3'", ex.Message);
ex = Assert.Throws<RuntimeBinderException>(() => d[1, 2, 3, 4]);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages.
- {
- Assert.Contains("[]", ex.Message);
- Assert.Contains("'3'", ex.Message);
- }
+ Assert.Contains("[]", ex.Message);
+ Assert.Contains("'3'", ex.Message);
d = new int[2];
ex = Assert.Throws<RuntimeBinderException>(() => d[1, 2, 3, 4] = 0);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages.
- {
- Assert.Contains("[]", ex.Message);
- Assert.Contains("'1'", ex.Message);
- }
+ Assert.Contains("[]", ex.Message);
+ Assert.Contains("'1'", ex.Message);
ex = Assert.Throws<RuntimeBinderException>(() => d[1, 2, 3, 4]);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages.
- {
- Assert.Contains("[]", ex.Message);
- Assert.Contains("'1'", ex.Message);
- }
+ Assert.Contains("[]", ex.Message);
+ Assert.Contains("'1'", ex.Message);
}
[Fact]
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<ProjectGuid>{82B54697-0251-47A1-8546-FC507D0F3B08}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
<!--
We wish to test operations that would result in
"Operator '-' cannot be applied to operands of type 'ushort' and 'EnumArithmeticTests.UInt16Enum'"
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void AllUsersApplicationDataFolderTest()
{
Assert.Throws<PlatformNotSupportedException>(() => SpecialDirectories.AllUsersApplicationData);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void CurrentUserApplicationDataFolderTest()
{
Assert.Throws<PlatformNotSupportedException>(() => SpecialDirectories.CurrentUserApplicationData);
[Theory]
[MemberData(nameof(ModObject_DivideByZeroObject_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Unfixed JIT bug in the .NET Framework")]
public void ModObject_DivideByZeroObject_ThrowsDivideByZeroException(object left, object right)
{
Assert.Throws<DivideByZeroException>(() => Operators.ModObject(left, right));
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{3B17C130-FF2C-4B41-82C6-FADF4ED7FDA0}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Win32ExceptionTests.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netfx;
- uap;
netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<ProjectGuid>{0D1E2954-A5C7-4B8C-932A-31EB4A96A737}</ProjectGuid>
<DefineConstants>$(DefineConstants);XMLSERIALIZERGENERATORTESTS</DefineConstants>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<CoverageSupported>false</CoverageSupported>
</PropertyGroup>
<PropertyGroup>
- <SkipTestsOnPlatform Condition="'$(TargetGroup)' == 'uap' OR '$(ArchGroup)' == 'arm' OR '$(ArchGroup)' == 'arm64' OR '$(ArchGroup)' == 'armel' OR '$(TargetGroup)' == 'netfx'">true</SkipTestsOnPlatform>
+ <SkipTestsOnPlatform Condition="'$(TargetGroup)' == 'uap' OR '$(ArchGroup)' == 'arm' OR '$(ArchGroup)' == 'arm64' OR '$(ArchGroup)' == 'armel'">true</SkipTestsOnPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<!-- We're building netcoreap, run on the test CLI
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{6F04B167-A03F-4206-8481-60213C3EF9B9}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
namespace System.Buffers.ArrayPool.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public class CollectionTests : ArrayPoolTest
{
[OuterLoop("This is a long running test (over 2 minutes)")]
[Theory,
InlineData(true),
InlineData(false)]
- [ActiveIssue(29866, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(29866, TargetFrameworkMonikers.Uap)]
public void BuffersAreCollectedWhenStale(bool trim)
{
RemoteInvokeWithTrimming((trimString) =>
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))]
[InlineData(true)]
[InlineData(false)]
- [ActiveIssue(29866, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(29866, TargetFrameworkMonikers.Uap)]
public void PollingEventFires(bool trim)
{
RemoteInvokeWithTrimming((trimString) =>
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ArrayPool\ArrayPoolTest.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<ProjectGuid>{0D1E2954-A5C7-4B8C-932A-31EB4A96A726}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\CodeDom\CodeAttributeDeclarationCollectionTests.cs" />
private static void AssertIsConfigurationErrorsException(Exception ex)
{
- if (!PlatformDetection.IsNetNative) // Can't do internal Reflection
- {
- Assert.Equal("ConfigurationErrorsException", ex.GetType().Name);
- }
+ Assert.Equal("ConfigurationErrorsException", ex.GetType().Name);
}
protected class NullProvider : CodeDomProvider
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(new BlockingCollection<int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes_Null()
{
Type proxyType = DebuggerAttributes.GetProxyType(new BlockingCollection<int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Missing bug fix in https://github.com/dotnet/corefx/pull/28115")]
public static void TestAddNullValue_IDictionary_ReferenceType_null()
{
// using IDictionary interface
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Missing bug fix in https://github.com/dotnet/corefx/pull/28115")]
public static void TestAddNullValue_IDictionary_ValueType_null_add()
{
Action action = () =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(new ConcurrentDictionary<string, int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes_Null()
{
Type proxyType = DebuggerAttributes.GetProxyType(new ConcurrentDictionary<string, int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework hasn't received the fix for https://github.com/dotnet/corefx/issues/18432 yet.")]
public static void TestNullComparer()
{
AssertDefaultComparerBehavior(new ConcurrentDictionary<EqualityApiSpy, int>((IEqualityComparer<EqualityApiSpy>)null));
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, ".NET Framework hasn't received the fix for https://github.com/dotnet/corefx/issues/18432 yet.")]
- public static void TestNullComparer_netfx()
- {
- Assert.Throws<ArgumentNullException>(
- () => new ConcurrentDictionary<int, int>((IEqualityComparer<int>)null));
- // "TestConstructor: FAILED. Constructor didn't throw ANE when null IEqualityComparer is passed");
-
- Assert.Throws<ArgumentNullException>(
- () => new ConcurrentDictionary<int, int>(new[] { new KeyValuePair<int, int>(1, 1) }, null));
- // "TestConstructor: FAILED. Constructor didn't throw ANE when non null collection and null IEqualityComparer passed");
-
- Assert.Throws<ArgumentNullException>(
- () => new ConcurrentDictionary<int, int>(1, new[] { new KeyValuePair<int, int>(1, 1) }, null));
- // "TestConstructor: FAILED. Constructor didn't throw ANE when null comparer is passed");
-
- Assert.Throws<ArgumentNullException>(
- () => new ConcurrentDictionary<int, int>(1, 1, null));
- // "TestConstructor: FAILED. Constructor didn't throw ANE when null comparer is passed");
- }
-
- [Fact]
public static void TestConstructor_Negative()
{
Assert.Throws<ArgumentNullException>(
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
[Theory]
[InlineData(0)]
[InlineData(10)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributes_Success(int count)
{
IProducerConsumerCollection<int> c = CreateProducerConsumerCollection(count);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerTypeProxy_Ctor_NullArgument_Throws()
{
IProducerConsumerCollection<int> c = CreateProducerConsumerCollection();
<ProjectGuid>{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}</ProjectGuid>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
- <Compile Include="$(CommonTestPath)\System\Collections\DictionaryExtensions.cs" Condition="'$(TargetGroup)'!='netcoreapp'">
- <Link>Common\System\Collections\DictionaryExtensions.cs</Link>
- </Compile>
<Compile Include="$(CommonPath)\CoreLib\System\Collections\Concurrent\IProducerConsumerCollectionDebugView.cs">
<Link>Common\CoreLib\System\Collections\Concurrent\IProducerConsumerCollectionDebugView.cs</Link>
</Compile>
<Link>Common\System\Diagnostics\DebuggerAttributes.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netcoreapp'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' != 'true'">
<Compile Include="ConcurrentDictionary\ConcurrentDictionaryExtensions.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="ConcurrentBagTests.netcoreapp.cs" />
<Compile Include="ConcurrentQueueTests.netcoreapp.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)'!='netstandard' And '$(TargetGroup)'!='netcoreapp'">
- <Compile Include="$(CommonPath)\System\SerializableAttribute.cs">
- <Link>Common\System\SerializableAttribute.cs</Link>
- </Compile>
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)'=='netstandard' Or '$(TargetGroup)'=='netcoreapp'">
+ <ItemGroup>
<Compile Include="$(CommonTestPath)\System\Collections\IEnumerable.NonGeneric.Serialization.Tests.cs">
<Link>Common\System\Collections\IEnumerable.NonGeneric.Serialization.Tests.cs</Link>
</Compile>
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
- uap;
netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesValid()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(ImmutableArray.CreateBuilder<int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes_Null()
{
Type proxyType = DebuggerAttributes.GetProxyType(ImmutableArray.CreateBuilder<string>(4));
[Theory]
[MemberData(nameof(Int32EnumerableData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesValid(IEnumerable<int> source)
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(source.ToImmutableArray());
}
-
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesValid()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(ImmutableArray.Create<int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesValid()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(ImmutableDictionary.CreateBuilder<string, int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes_Null()
{
Type proxyType = DebuggerAttributes.GetProxyType(ImmutableHashSet.Create<string>());
var map = ImmutableDictionary.Create<string, string>()
.Add("firstKey", "1").Add("secondKey", "2");
var exception = AssertExtensions.Throws<ArgumentException>(null, () => map.Add("firstKey", "3"));
-
- if (!PlatformDetection.IsNetNative) //.NET Native toolchain removes exception messages.
- {
- Assert.Contains("firstKey", exception.Message);
- }
+ Assert.Contains("firstKey", exception.Message);
}
[Fact]
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesValid()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(ImmutableDictionary.Create<int, int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes_Null()
{
Type proxyType = DebuggerAttributes.GetProxyType(ImmutableHashSet.Create<string>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesValid()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(ImmutableHashSet.CreateBuilder<int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesValid()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(ImmutableHashSet.Create<string>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes_Null()
{
Type proxyType = DebuggerAttributes.GetProxyType(ImmutableHashSet.Create<string>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesValid()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(ImmutableList.CreateBuilder<int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes_Null()
{
Type proxyType = DebuggerAttributes.GetProxyType(ImmutableList.CreateBuilder<string>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesValid()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(ImmutableList.Create<int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes_Null()
{
Type proxyType = DebuggerAttributes.GetProxyType(ImmutableList.Create<double>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesValid()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(ImmutableQueue.Create<int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes_Null()
{
Type proxyType = DebuggerAttributes.GetProxyType(ImmutableQueue.Create<int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesValid()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(ImmutableSortedDictionary.CreateBuilder<string, int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes_Null()
{
Type proxyType = DebuggerAttributes.GetProxyType(ImmutableSortedDictionary.CreateBuilder<int, string>());
var map = ImmutableSortedDictionary.Create<string, string>()
.Add("firstKey", "1").Add("secondKey", "2");
var exception = AssertExtensions.Throws<ArgumentException>(null, () => map.Add("firstKey", "3"));
- if (!PlatformDetection.IsNetNative) //.NET Native toolchain removes exception messages.
- {
- Assert.Contains("firstKey", exception.Message);
- }
+ Assert.Contains("firstKey", exception.Message);
}
[Fact]
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesValid()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(ImmutableSortedDictionary.Create<string, int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes_Null()
{
Type proxyType = DebuggerAttributes.GetProxyType(ImmutableSortedDictionary.Create<int, int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesValid()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(ImmutableSortedSet.CreateBuilder<string>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes_Null()
{
Type proxyType = DebuggerAttributes.GetProxyType(ImmutableSortedSet.CreateBuilder<int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesValid()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(ImmutableSortedSet.Create<int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes_Null()
{
Type proxyType = DebuggerAttributes.GetProxyType(ImmutableSortedSet.Create("1", "2", "3"));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesValid()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(ImmutableStack.Create<int>());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void TestDebuggerAttributes_Null()
{
Type proxyType = DebuggerAttributes.GetProxyType(ImmutableStack.Create<string>("1", "2", "3"));
<PropertyGroup>
<ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
<NoWarn>0436</NoWarn>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
- <Compile Include="$(CommonTestPath)\System\Collections\DictionaryExtensions.cs" Condition="'$(TargetGroup)'!='netcoreapp' And '$(TargetGroup)'!='uap'">
+ <Compile Include="$(CommonTestPath)\System\Collections\DictionaryExtensions.cs" Condition="'$(TargetsNetFx)' == 'true'">
<Link>Common\System\Collections\DictionaryExtensions.cs</Link>
</Compile>
<Compile Include="BadHasher.cs" />
<None Include="ClassDiagram1.cd" />
<Compile Include="ImmutableArray\ImmutableArray.Generic.Tests.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
+ <ItemGroup Condition="'$(TargetsNetFx)' != 'true'">
<!-- Some internal types are needed, so we reference the implementation assembly, rather than the reference assembly. -->
<DefaultReferenceExclusions Include="System.Collections.Immutable" />
<ReferenceFromRuntime Include="System.Collections.Immutable" />
internal static void ValidateDefaultThisBehavior(Action a)
{
- if (!PlatformDetection.IsNetNative) // ActiveIssue UapAot: TFS 428550, https://github.com/dotnet/corefx/issues/19016 - ImmutableArray's null-guard check (ThrowNullRefIfNotInitialized) can get optimized away by certain compilers.
- {
- Assert.Throws<NullReferenceException>(a);
- }
+ Assert.Throws<NullReferenceException>(a);
}
}
}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void DebuggerAttribute()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(new ArrayList());
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior
public class ArrayList_SyncRootTests
{
private ArrayList _arrDaughter;
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttribute()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(new Hashtable());
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior
public class Hashtable_SyncRootTests
{
private Hashtable _hashDaughter;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void DebuggerAttribute()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(new Queue());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void DebuggerAttribute_NullQueue_ThrowsArgumentNullException()
{
bool threwNull = false;
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior
public class Queue_SyncRootTests
{
private const int NumberOfElements = 1000;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior
public static void SyncRoot()
{
MyReadOnlyCollectionBase collection = CreateCollection();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttribute_Empty()
{
Assert.Equal("Count = 0", DebuggerAttributes.ValidateDebuggerDisplayReferences(new SortedList()));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttribute_NormalList()
{
var list = new SortedList() { { "a", 1 }, { "b", 2 } };
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttribute_SynchronizedList()
{
var list = SortedList.Synchronized(new SortedList() { { "a", 1 }, { "b", 2 } });
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttribute_NullSortedList_ThrowsArgumentNullException()
{
bool threwNull = false;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "This test intentionally reflects on an internal member of SortedList. Cannot do that on UaoAot.")]
public void EnsureCapacity_NewCapacityLessThanMin_CapsToMaxArrayLength()
{
// A situation like this occurs for very large lengths of SortedList.
[Fact]
[OuterLoop]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/pull/34339")] // Changed behavior
public void GetSyncRootBasic()
{
// Testing SyncRoot is not as simple as its implementation looks like. This is the working
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void DebuggerAttribute()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(new Stack());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void DebuggerAttribute_NullStack_ThrowsArgumentNullException()
{
bool threwNull = false;
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior
public class Stack_SyncRootTests
{
private Stack _stackDaughter;
<PropertyGroup>
<ProjectGuid>{EE95AE39-845A-42D3-86D0-8065DBE56612}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<!-- Common Collections tests -->
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
[Theory]
[MemberData(nameof(StringCollection_Data))]
[MemberData(nameof(StringCollection_Duplicates_Data))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior
public static void SyncRootTest(StringCollection collection, string[] data)
{
object syncRoot = collection.SyncRoot;
[Theory]
[InlineData(0)]
[InlineData(5)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Different implementation
public void SyncRoot(int count)
{
StringDictionary stringDictionary1 = Helpers.CreateStringDictionary(count);
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{7F5F5134-00FE-4DE8-B20C-3DA8BA2EBA68}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<!-- Common Collections tests -->
Assert.Equal(bitArray, bitArray.Clone());
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "A bug in BitArray.Clone() caused an ArgumentExeption to be thrown in this case.")]
[Fact]
public static void Clone_LongLength_Works()
{
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework hasn't received the fix for #9838 yet.")]
[MemberData(nameof(CopyTo_Hidden_Data))]
public static void CopyTo_Int_Hidden(string label, BitArray bits)
{
}
[Theory]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Desktop Framework hasn't received the fix for #9838 yet.")]
- [MemberData(nameof(CopyTo_Hidden_Data))]
- public static void CopyTo_Int_Hidden_Desktop(string label, BitArray bits)
- {
- int allBitsSet = unchecked((int)0xffffffff); // 32 bits set to 1 = -1
- int fullInts = bits.Length / BitsPerInt32;
- int remainder = bits.Length % BitsPerInt32;
- int arrayLength = fullInts + (remainder > 0 ? 1 : 0);
-
- int[] data = new int[arrayLength];
- ((ICollection)bits).CopyTo(data, 0);
-
- Assert.All(data, d => Assert.Equal(allBitsSet, d));
-
- }
-
- [Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework hasn't received the fix for #9838 yet.")]
[MemberData(nameof(CopyTo_Hidden_Data))]
public static void CopyTo_Byte_Hidden(string label, BitArray bits)
{
Assert.Equal((byte)((1 << remainder) - 1), data[fullBytes]);
}
}
-
- [Theory]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Desktop Framework hasn't received the fix for #9838 yet.")]
- [MemberData(nameof(CopyTo_Hidden_Data))]
- public static void CopyTo_Byte_Hidden_Desktop(string label, BitArray bits)
- {
- byte allBitsSet = (1 << BitsPerByte) - 1; // 8 bits set to 1 = 255
-
- int fullBytes = bits.Length / BitsPerByte;
- int remainder = bits.Length % BitsPerByte;
- int arrayLength = fullBytes + (remainder > 0 ? 1 : 0);
-
- byte[] data = new byte[arrayLength];
- ((ICollection)bits).CopyTo(data, 0);
-
- Assert.All(data, d => Assert.Equal(allBitsSet, d));
-
- }
}
}
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
{
public abstract partial class ComparersGenericTests<T>
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Missing https://github.com/dotnet/coreclr/pull/4340")]
[Fact]
public void Comparer_ComparerDefault()
{
{
public abstract partial class ComparersGenericTests<T>
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Missing https://github.com/dotnet/coreclr/pull/4340")]
[Fact]
public void EqualityComparer_EqualityComparerDefault()
{
/// </summary>
public abstract partial class Dictionary_Generic_Tests<TKey, TValue> : IDictionary_Generic_Tests<TKey, TValue>
{
- protected override ModifyOperation ModifyEnumeratorThrows => PlatformDetection.IsFullFramework ? base.ModifyEnumeratorThrows : ModifyOperation.Add | ModifyOperation.Insert;
+ protected override ModifyOperation ModifyEnumeratorThrows => ModifyOperation.Add | ModifyOperation.Insert;
- protected override ModifyOperation ModifyEnumeratorAllowed => PlatformDetection.IsFullFramework ? base.ModifyEnumeratorAllowed : ModifyOperation.Remove | ModifyOperation.Clear;
+ protected override ModifyOperation ModifyEnumeratorAllowed => ModifyOperation.Remove | ModifyOperation.Clear;
#region IDictionary<TKey, TValue Helper Methods
}
[Fact]
- [ActiveIssue("dotnet/corefx#7019", TargetFrameworkMonikers.NetFramework)]
public void CantAcceptDuplicateKeysFromSourceDictionary()
{
Dictionary<string, int> source = new Dictionary<string, int> { { "a", 1 }, { "A", 1 } };
[Theory]
[MemberData(nameof(EnumerableTestData))]
- [ActiveIssue("dotnet/corefx #16790", TargetFrameworkMonikers.NetFramework)]
public void SortedSet_Generic_Constructor_IEnumerable_IComparer_Netcoreapp(EnumerableType enumerableType, int setLength, int enumerableLength, int numberOfMatchingElements, int numberOfDuplicateElements)
{
IEnumerable<T> enumerable = CreateEnumerable(enumerableType, null, enumerableLength, 0, 0);
[Theory]
[MemberData(nameof(EnumerableTestData))]
- [ActiveIssue("dotnet/corefx #16790", ~TargetFrameworkMonikers.NetFramework)]
- public void SortedSet_Generic_Constructor_IEnumerable_IComparer_Netfx(EnumerableType enumerableType, int setLength, int enumerableLength, int numberOfMatchingElements, int numberOfDuplicateElements)
- {
- IEnumerable<T> enumerable = CreateEnumerable(enumerableType, null, enumerableLength, 0, 0);
- SortedSet<T> set = new SortedSet<T>(enumerable, GetIComparer() ?? Comparer<T>.Default);
- Assert.True(set.SetEquals(enumerable));
- }
-
- [Theory]
- [MemberData(nameof(EnumerableTestData))]
- [ActiveIssue("dotnet/corefx #16790", TargetFrameworkMonikers.NetFramework)]
public void SortedSet_Generic_Constructor_IEnumerable_IComparer_NullComparer_Netcoreapp(EnumerableType enumerableType, int setLength, int enumerableLength, int numberOfMatchingElements, int numberOfDuplicateElements)
{
IEnumerable<T> enumerable = CreateEnumerable(enumerableType, null, enumerableLength, 0, 0);
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{F5EB9630-AD29-4880-963F-F2D39C684D8A}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\RandomExtensions.cs">
<Link>Common\System\RandomExtensions.cs</Link>
</Compile>
- <Compile Include="$(CommonTestPath)\System\Collections\DictionaryExtensions.cs" Condition="'$(TargetGroup)'!='netcoreapp'">
- <Link>Common\System\Collections\DictionaryExtensions.cs</Link>
- </Compile>
<Compile Include="$(CommonTestPath)\System\Runtime\Serialization\Formatters\BinaryFormatterHelpers.cs">
<Link>Common\System\Runtime\Serialization\Formatters\BinaryFormatterHelpers.cs</Link>
</Compile>
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<ProjectGuid>{6E48765E-D6AC-4A79-9C2E-B5EE67EEDECF}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\ComponentModel\DataAnnotations\AssociatedMetadataTypeTypeDescriptionProviderTests.cs" />
<Compile Include="System\ComponentModel\DataAnnotations\MetadataTypeAttributeTests.cs" />
<Compile Include="System\ComponentModel\DataAnnotations\MinLengthAttributeTests.cs" />
<Compile Include="System\ComponentModel\DataAnnotations\PhoneAttributeTests.cs" />
- <Compile Include="System\ComponentModel\DataAnnotations\RangeAttributeTests.cs" />
+ <Compile Include="System\ComponentModel\DataAnnotations\RangeAttributeTests.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
<Compile Include="System\ComponentModel\DataAnnotations\RegularExpressionAttributeTests.cs" />
<Compile Include="System\ComponentModel\DataAnnotations\RequiredAttributeTests.cs" />
<Compile Include="System\ComponentModel\DataAnnotations\ScaffoldColumnAttributeTests.cs" />
</PackageConfigurations>
<BuildConfigurations>
$(PackageConfigurations);
- _netfx;
netcoreapp;
uap;
</BuildConfigurations>
<BuildConfigurations>
netcoreapp;
uap;
- _netfx;
</BuildConfigurations>
</PropertyGroup>
</Project>
namespace System.ComponentModel.Composition.Registration.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public class ExportBuilderTests
{
interface IFoo { }
}
[Fact]
- [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)]
public void ExportInterfaceWithTypeOf1()
{
var ctx = new RegistrationBuilder();
}
[Fact]
- [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)]
public void ExportInterfaceWithTypeOf2()
{
var ctx = new RegistrationBuilder();
}
[Fact]
- [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)]
public void ExportInheritedInterfaceWithImplements1()
{
var ctx = new RegistrationBuilder();
}
[Fact]
- [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)]
public void ExportInheritedInterfaceWithImplements2()
{
var ctx = new RegistrationBuilder();
namespace System.ComponentModel.Composition.Registration.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public class ImportBuilderTests
{
interface IFoo { }
namespace System.ComponentModel.Composition.Registration.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public class PartBuilderInheritanceTests
{
private abstract class BaseClass
}
[Fact]
- [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)]
public void StandardExportInterfacesShouldWork()
{
var builder = new RegistrationBuilder();
}
[Fact]
- [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)]
public void StandardExportInterfacesDefaultContractShouldWork()
{ //Same test as above only using default export builder
var builder = new RegistrationBuilder();
namespace System.ComponentModel.Composition.Registration.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public class PartBuilderOfTInheritanceTests
{
private abstract class BaseClass
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void NoOperations_ShouldGenerateNoAttributes()
{
var builder = InternalCalls.PartBuilder<FooImpl>(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ExportSelf_ShouldGenerateSingleExportAttribute()
{
var builder = InternalCalls.PartBuilder<FooImpl>(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ExportOfT_ShouldGenerateSingleExportAttributeWithContractType()
{
var builder = InternalCalls.PartBuilder<FooImpl>(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void AddMetadata_ShouldGeneratePartMetadataAttribute()
{
var builder = InternalCalls.PartBuilder<FooImpl>(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void AddMetadataWithFunc_ShouldGeneratePartMetadataAttribute()
{
var builder = InternalCalls.PartBuilder<FooImpl>(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ExportProperty_ShouldGenerateExportForPropertySelected()
{
var builder = InternalCalls.PartBuilder<FooImpl>(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ImportProperty_ShouldGenerateImportForPropertySelected()
{
var builder = InternalCalls.PartBuilder<FooImpl>(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ImportProperty_ShouldGenerateImportForPropertySelected_And_ApplyImportMany()
{
var builder = InternalCalls.PartBuilder<FooImpl>(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ExportPropertyWithConfiguration_ShouldGenerateExportForPropertySelected()
{
var builder = InternalCalls.PartBuilder<FooImpl>(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ExportPropertyOfT_ShouldGenerateExportForPropertySelectedWithTAsContractType()
{
var builder = InternalCalls.PartBuilder<FooImpl>(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ConventionSelectsConstructor_SelectsTheOneWithMostParameters()
{
var builder = InternalCalls.PartBuilder<FooImplWithConstructors>(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ManuallySelectingConstructor_SelectsTheExplicitOne()
{
var builder = InternalCalls.PartBuilder<FooImplWithConstructors>(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ManuallySelectingConstructor_SelectsTheExplicitOne_IEnumerableParameterBecomesImportMany()
{
var builder = InternalCalls.PartBuilder<FooImplWithConstructors>(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void NoOperations_ShouldGenerateNoAttributes()
{
var builder = InternalCalls.PartBuilder(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ExportSelf_ShouldGenerateSingleExportAttribute()
{
var builder = InternalCalls.PartBuilder(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ExportOfT_ShouldGenerateSingleExportAttributeWithContractType()
{
var builder = InternalCalls.PartBuilder(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void AddMetadata_ShouldGeneratePartMetadataAttribute()
{
var builder = InternalCalls.PartBuilder(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void AddMetadataWithFunc_ShouldGeneratePartMetadataAttribute()
{
var builder = InternalCalls.PartBuilder(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ExportProperty_ShouldGenerateExportForPropertySelected()
{
var builder = InternalCalls.PartBuilder(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ImportProperty_ShouldGenerateImportForPropertySelected()
{
var builder = InternalCalls.PartBuilder(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ImportProperties_ShouldGenerateImportForPropertySelected_And_ApplyImportMany()
{
var builder = InternalCalls.PartBuilder(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ExportPropertyWithConfiguration_ShouldGenerateExportForPropertySelected()
{
var builder = InternalCalls.PartBuilder(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ExportPropertyOfT_ShouldGenerateExportForPropertySelectedWithTAsContractType()
{
var builder = InternalCalls.PartBuilder(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void SetCreationPolicy_ShouldGeneratePartCreationPolicyAttributeForType()
{
var builder = InternalCalls.PartBuilder(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ConventionSelectsConstructor_SelectsTheOneWithMostParameters()
{
var builder = InternalCalls.PartBuilder(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ManuallySelectingConstructor_SelectsTheExplicitOne()
{
var builder = InternalCalls.PartBuilder(t => true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")]
public void ManuallySelectingConstructor_SelectsTheExplicitOne_IEnumerableParameterBecomesImportMany()
{
var builder = InternalCalls.PartBuilder(t => true);
}
[Fact]
- [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)]
public void InsideTheLambdaCallGetCustomAttributesShouldSucceed()
{
//Same test as above only using default export builder
public class PartBuilderUnitTests
{
[Fact]
- [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)]
public void ManyConstructorsControllerFindLongestConstructor_ShouldSucceed()
{
var ctx = new RegistrationBuilder();
}
[Fact]
- [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)]
public void ManyConstructorsControllerFindLongestConstructorAndImportByName_ShouldSucceed()
{
var ctx = new RegistrationBuilder();
}
[Fact]
- [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)]
public void LongestConstructorWithAttribute_ShouldSucceed()
{
var ctx = new RegistrationBuilder();
}
[Fact]
- [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)]
public void LongestConstructorShortestWithAttribute_ShouldSucceed()
{
var ctx = new RegistrationBuilder();
}
[Fact]
- [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)]
public void AmbiguousConstructorWithAttributeAppliedToOne_ShouldSucceed()
{
var ctx = new RegistrationBuilder();
[Fact]
- [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)]
public void AmbiguousConstructor_ShouldFail()
{
var ctx = new RegistrationBuilder();
}
[Fact]
- [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)]
public void RegistrationBuilder_WithExportDelegatesShouldNotThrow()
{
var rb = new RegistrationBuilder();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "MakeGenericType can only accept Type objects created by the runtime.")]
public void ShouldSucceed()
{
var rb = new RegistrationBuilder();
private class ClassExportingInterface<T> : IGenericInterface<T> { }
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "MakeGenericType can only accept Type objects created by the runtime.")]
public void GenericInterfaceExportInRegistrationBuilder()
{
CompositionContainer container = CreateRegistrationBuilderContainer(typeof(ClassExportingInterface<>));
private class ClassExportingBaseClass<T> : GenericBaseClass<T> { }
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "MakeGenericType can only accept Type objects created by the runtime.")]
public void GenericBaseClassExportInRegistrationBuilder()
{
CompositionContainer container = CreateRegistrationBuilderContainer(typeof(ClassExportingBaseClass<>));
private class GenericClass<T> { }
[Fact]
- [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)]
public void GenericExportInRegistrationBuilder()
{
CompositionContainer container = CreateRegistrationBuilderContainer(typeof(GenericClass<>));
private class ExplicitGenericClass<T> { }
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "MakeGenericType can only accept Type objects created by the runtime.")]
public void ExplicitGenericExportInRegistrationBuilder()
{
CompositionContainer container = CreateRegistrationBuilderContainer(typeof(ExplicitGenericClass<>));
private class ExplicitGenericClass<T, U> { }
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "MakeGenericType can only accept Type objects created by the runtime.")]
public void ExplicitGenericArity2ExportInRegistrationBuilder()
{
CompositionContainer container = CreateRegistrationBuilderContainer(typeof(ExplicitGenericClass<,>));
<BuildConfigurations>
netcoreapp;
uap;
- _netfx;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<BuildConfigurations>
netstandard;
- netcoreapp;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{396D6EBF-60BD-4DAF-8783-FB403E070A56}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="TestClass.cs" />
</Compile>
</ItemGroup>
<ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
- <ItemGroup>
<ProjectReference Include="System.ComponentModel.Composition.Noop.Assembly/System.ComponentModel.Composition.Noop.Assembly.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<OutputItemType>content</OutputItemType>
public class CompositionErrorIdTests
{
[Fact]
- [ActiveIssue(25498, TargetFrameworkMonikers.UapAot)]
public void CompositionErrorIdsAreInSyncWithErrorIds()
{
ExtendedAssert.EnumsContainSameValues<CompositionErrorId, ErrorId>();
private void AssertMessage(CompositionException exception, int rootCauseCount, CultureInfo culture)
{
- if (PlatformDetection.IsNetNative)
- {
- return;
- }
using (StringReader reader = new StringReader(exception.Message))
{
string line = reader.ReadLine();
private void AssertMessage(CompositionException exception, string[] expected)
{
- if (PlatformDetection.IsNetNative)
- {
- return;
- }
using (StringReader reader = new StringReader(exception.Message))
{
// Skip header
}
[Fact]
- [ActiveIssue(25498, TargetFrameworkMonikers.UapAot)]
public void IncludeDependenciesChainWithCycles()
{
var catalog = CreateCatalog(
}
[Fact]
- [ActiveIssue(25498, TargetFrameworkMonikers.UapAot)]
public void PreviewImports_ReleaseImports_ShouldNotBlockChanges()
{
var exportProvider = ExportProviderFactory.CreateRecomposable();
}
[Fact]
- [ActiveIssue(25498, TargetFrameworkMonikers.UapAot)]
public void GetMetadataView_AbstractClassWithConstructor_ShouldThrowMemberAccessException()
{
var metadata = new Dictionary<string, object>();
}
[Fact]
- [ActiveIssue(25498, TargetFrameworkMonikers.UapAot)]
public void TestDyamicallyFilteringImports()
{
var container = ContainerFactory.CreateWithAttributedCatalog(typeof(Dynamic1), typeof(Dynamic2), typeof(NonDynamic1));
}
[Fact]
- [ActiveIssue(25498, TargetFrameworkMonikers.UapAot)]
public void FilteredCatalog_ScopeB()
{
var cat = GetCatalog();
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <!-- this tests run in multiple AppDomains in full framework, so if an Assert fails we would get a Serialization exception instead of the real failure.
- adding this xunit so it runs in one AppDomain -->
- <XUnitNoAppdomain>true</XUnitNoAppdomain>
<ProjectGuid>{59E9B218-81D0-4A80-A4B7-66C716136D82}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AsyncOperationManagerTests.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{C9534425-93FB-494F-8DD8-1E4E3E626FDE}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\ComponentModel\BrowsableAttributeTests.cs" />
public class CategoryAttributeTests
{
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // NetFX does not have fix for #21369
public void Ctor_Default()
{
var attribute = new CategoryAttribute();
[Theory]
[MemberData(nameof(Ctor_Category_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Does not have the fix for https://github.com/dotnet/corefx/issues/21356")]
public void Ctor_Category(string category, bool expectedIsDefaultAttribute)
{
var attribute = new CategoryAttribute(category);
[Theory]
[MemberData(nameof(DefaultProperties_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // NetFX does not have fix for #21369
public void CategoryProperties_GetCategory_ReturnsExpected(Func<CategoryAttribute> attributeThunk, string expectedCategory)
{
CategoryAttribute attribute = attributeThunk();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Throws NullReferenceException in .NET Framework.")]
public void GetProperties_NullValue_ReturnsNull()
{
Assert.Null(Converter.GetProperties(null));
[Theory]
[MemberData(nameof(GetProperties_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Returns null in .NET Framework")]
public void GetProperties_Invoke_ReturnsEmpty(object value)
{
PropertyDescriptorCollection properties = Converter.GetProperties(value);
}
[Fact]
- [ActiveIssue(22145, TargetFrameworkMonikers.NetFramework)]
public void ApplyResources_IComponentWithDesignModeSite_Success()
{
var resourceManager = new ComponentResourceManager(typeof(global::Resources.TestResx))
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
- netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
ex = AssertExtensions.Throws<ArgumentException>(null, () => container.Add(c2, "dup"));
Assert.Equal(typeof(ArgumentException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.True(ex.Message.IndexOf("'dup'") != -1);
- Assert.Null(ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.True(ex.Message.IndexOf("'dup'") != -1);
+ Assert.Null(ex.ParamName);
Assert.Equal(1, container.Components.Count);
// new component, different case
// unique and case-insensitive
Assert.Equal(typeof(ArgumentException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.True(ex.Message.IndexOf("'duP'") != -1);
- Assert.Null(ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.True(ex.Message.IndexOf("'duP'") != -1);
+ Assert.Null(ex.ParamName);
Assert.Equal(1, container.Components.Count);
// existing component, same case
// unique and case-insensitive
Assert.Equal(typeof(ArgumentException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.True(ex.Message.IndexOf("'dup'") != -1);
- Assert.Null(ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.True(ex.Message.IndexOf("'dup'") != -1);
+ Assert.Null(ex.ParamName);
Assert.Equal(2, container.Components.Count);
Assert.Equal(1, container2.Components.Count);
Assert.Same(c5, container2.Components[0]);
ArgumentNullException ex = Assert.Throws<ArgumentNullException>(() => _container.InvokeValidateName((IComponent)null, "A"));
Assert.Equal(typeof(ArgumentNullException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.Equal("component", ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.Equal("component", ex.ParamName);
}
[Fact]
// unique and case-insensitive
Assert.Equal(typeof(ArgumentException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.True(ex.Message.IndexOf("'dup'") != -1);
- Assert.Null(ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.True(ex.Message.IndexOf("'dup'") != -1);
+ Assert.Null(ex.ParamName);
Assert.Equal(2, _container.Components.Count);
_container.InvokeValidateName(compB, "whatever");
// unique and case-insensitive
Assert.Equal(typeof(ArgumentException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.True(ex.Message.IndexOf("'dup'") != -1);
- Assert.Null(ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.True(ex.Message.IndexOf("'dup'") != -1);
+ Assert.Null(ex.ParamName);
Assert.Equal(2, _container.Components.Count);
_container.InvokeValidateName(compC, "whatever");
// unique and case-insensitive
Assert.Equal(typeof(ArgumentException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.True(ex.Message.IndexOf("'dup'") != -1);
- Assert.Null(ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.True(ex.Message.IndexOf("'dup'") != -1);
+ Assert.Null(ex.ParamName);
Assert.Equal(2, _container.Components.Count);
_container.InvokeValidateName(compD, "whatever");
Assert.Equal(1, container2.Components.Count);
ArgumentNullException ex = Assert.Throws<ArgumentNullException>(() => stack.Append(null));
Assert.Equal(typeof(ArgumentNullException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.Equal("context", ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.Equal("context", ex.ParamName);
}
[Fact] // Item (Int32)
ex = Assert.Throws<ArgumentOutOfRangeException>(() => stack[-1]);
Assert.Equal(typeof(ArgumentOutOfRangeException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.Equal(new ArgumentOutOfRangeException("level").Message, ex.Message);
- Assert.Equal("level", ex.ParamName);
- }
-
+ Assert.Equal(new ArgumentOutOfRangeException("level").Message, ex.Message);
+ Assert.Equal("level", ex.ParamName);
ex = Assert.Throws<ArgumentOutOfRangeException>(() => stack[-5]);
Assert.Equal(typeof(ArgumentOutOfRangeException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.Equal(new ArgumentOutOfRangeException("level").Message, ex.Message);
- Assert.Equal("level", ex.ParamName);
- }
+ Assert.Equal(new ArgumentOutOfRangeException("level").Message, ex.Message);
+ Assert.Equal("level", ex.ParamName);
}
[Fact] // Item (Type)
ArgumentNullException ex = Assert.Throws<ArgumentNullException>(() => stack[(Type)null]);
Assert.Equal(typeof(ArgumentNullException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.Equal("type", ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.Equal("type", ex.ParamName);
}
[Fact]
ArgumentNullException ex= Assert.Throws<ArgumentNullException>(()=> stack.Push(null));
Assert.Equal(typeof(ArgumentNullException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.Equal("context", ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.Equal("context", ex.ParamName);
}
[Fact]
// a CultureInfo object on this computer
Assert.Equal(typeof(ArgumentException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.True(ex.Message.IndexOf(typeof(CultureInfo).Name) != -1);
- Assert.True(ex.Message.IndexOf("(default)") != -1);
- Assert.Null(ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.True(ex.Message.IndexOf(typeof(CultureInfo).Name) != -1);
+ Assert.True(ex.Message.IndexOf("(default)") != -1);
+ Assert.Null(ex.ParamName);
}
try
// a CultureInfo object on this computer
Assert.Equal(typeof(ArgumentException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.True(ex.Message.IndexOf(typeof(CultureInfo).Name) != -1);
- Assert.True(ex.Message.IndexOf(" ") != -1);
- Assert.Null(ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.True(ex.Message.IndexOf(typeof(CultureInfo).Name) != -1);
+ Assert.True(ex.Message.IndexOf(" ") != -1);
+ Assert.Null(ex.ParamName);
}
try
// a CultureInfo object on this computer
Assert.Equal(typeof(ArgumentException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.True(ex.Message.IndexOf(typeof(CultureInfo).Name) != -1);
- Assert.True(ex.Message.IndexOf("\r\n") != -1);
- Assert.Null(ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.True(ex.Message.IndexOf(typeof(CultureInfo).Name) != -1);
+ Assert.True(ex.Message.IndexOf("\r\n") != -1);
+ Assert.Null(ex.ParamName);
}
}
{
public static IEnumerable<object[]> Ctor_TestData()
{
- // [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core fixed a NRE bug.")]
if (!PlatformDetection.IsFullFramework)
{
yield return new object[] { null };
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core fixed a NRE bug.")]
public void CopyTo_NullIList_Nop()
{
ICollection collection = new DesignerCollection((IList)null);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void Properties_GetBeforeAddingChild_ReturnsNonEmpty()
{
var service = new TestDesignerOptionService();
[Theory]
[InlineData(null)]
[InlineData(typeof(int))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core fixes a NRE bug.")]
public void GetService_NoSuchService_ReturnsNull(Type serviceType)
{
var container = new ServiceContainer();
[Theory]
[MemberData(nameof(SizeFData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void ConvertTo_NetFramework(float width, float height)
- {
- TestConvertToString(new SizeF(width, height), FormattableString.Invariant($"{width:G9}, {height:G9}"));
- }
-
-
- [Theory]
- [MemberData(nameof(SizeFData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void ConvertTo_NotNetFramework(float width, float height)
{
TestConvertToString(new SizeF(width, height), FormattableString.Invariant($"{width}, {height}"));
[Theory]
[MemberData(nameof(SizeFData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void ConvertToInvariantString_NetFramework(float width, float height)
- {
- var str = Converter.ConvertToInvariantString(new SizeF(width, height));
- Assert.Equal(FormattableString.Invariant($"{width:G9}, {height:G9}"), str);
- }
-
- [Theory]
- [MemberData(nameof(SizeFData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void ConvertToInvariantString_NotNetFramework(float width, float height)
{
var str = Converter.ConvertToInvariantString(new SizeF(width, height));
[Theory]
[MemberData(nameof(SizeFData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void ConvertToString_NetFramework(float width, float height)
- {
- var str = Converter.ConvertToString(new SizeF(width, height));
- Assert.Equal(string.Format(CultureInfo.CurrentCulture, "{0:G9}{2} {1:G9}", width, height, CultureInfo.CurrentCulture.TextInfo.ListSeparator), str);
- }
-
- [Theory]
- [MemberData(nameof(SizeFData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void ConvertToString_NotNetFramework(float width, float height)
{
var str = Converter.ConvertToString(new SizeF(width, height));
Assert.All(Enum.GetValues(typeof(SomeEnum)).Cast<SomeEnum>(), value => Assert.Contains(value, standardValues));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Does not have fix for #31095")]
[Fact]
public static void ConvertFrom_ULongFlagsEnum_String()
{
Assert.Equal(ULongFlagsEnum.Bit62 | ULongFlagsEnum.Bit63, result);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Does not have fix for #31095")]
[Fact]
public static void ConvertFrom_ULongFlagsEnum_EnumArray()
{
Assert.Equal(ULongFlagsEnum.Bit62 | ULongFlagsEnum.Bit63, result);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Does not have fix for #31095")]
[Fact]
public static void ConvertTo_ULongFlagsEnum_EnumArray()
{
Assert.Equal(new Enum[] { ULongFlagsEnum.Bit62, ULongFlagsEnum.Bit63 }, result);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Does not have fix for #31095")]
[Fact]
public static void ConvertFrom_LongFlagsEnum_String()
{
Assert.Equal(LongFlagsEnum.Bit62 | LongFlagsEnum.Bit63, result);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Does not have fix for #31095")]
[Fact]
public static void ConvertFrom_LongFlagsEnum_EnumArray()
{
Assert.Equal(LongFlagsEnum.Bit62 | LongFlagsEnum.Bit63, result);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Does not have fix for #31095")]
[Fact]
public static void ConvertTo_LongFlagsEnum_EnumArray()
{
public class MemberDescriptorTests
{
[Fact]
- [ActiveIssue("dotnet/corefx #18201", TargetFrameworkMonikers.NetFramework)]
public void CopiedMemberDescriptorEqualsItsSource()
{
string description = "MockCategory";
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<RootNamespace />
<AssemblyVersion>9.9.9.9</AssemblyVersion>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="Drawing\ColorConverterTests.cs" />
<Compile Include="Drawing\PointConverterTests.cs" />
<Compile Include="Drawing\RectangleConverterTests.cs" />
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core fixes some NullReferenceExceptions in CanConvertTo")]
public void CanConvertTo_NullDestinationType_ReturnsFalse()
{
Assert.False(Converter.CanConvertTo(null));
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{40C01084-DAB1-4F24-8729-85523BC9F04E}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CancelEventArgsTests.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{853BB14F-8A5B-42B4-A053-21DE1AEBB335}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="SharingBoundaryAttributeTests.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<ProjectGuid>{17DBE1D4-FCB5-4D55-805C-C4A22EE8C032}</ProjectGuid>
<AssemblyName>System.Composition.Convention.Tests</AssemblyName>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AttributedModelConventionExtensions.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{52BE9F68-69EC-44AA-806E-11EFB57D9B4B}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Composition\Hosting\Core\CompositionDependencyTests.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{3B6042E6-9765-4A03-9089-92050100C85E}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Composition\Hosting\Core\CompositionContractTests.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
[Theory]
[MemberData(nameof(DebuggerAttributes_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributes_GetViaReflection_Success(ContainerConfiguration configuration)
{
DebuggerAttributeInfo debuggerAttributeInfo = DebuggerAttributes.ValidateDebuggerTypeProxyProperties(configuration);
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{8D1CB149-B52E-472B-A91F-DF1C77D8BA46}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ContainerConfigurationTests.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)]
public void FormattingTheContractPrintsConstraintKeysAndValues()
{
var mcd = new CompositionContract(typeof(AType), null, new Dictionary<string, object> { { "A", 1 }, { "B", "C" } });
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)]
public void FormattingTheContractPrintsNameAndDiscriminator()
{
var mcd = new CompositionContract(typeof(AType), "inner", new Dictionary<string, object> { { "A", 1 } });
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)]
[ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public void InstanceExportsOfIncompatibleContractsAreDetected()
{
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)]
[ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public void PropertyExportsOfIncompatibleContractsAreDetected()
{
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)]
[ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public void MultipleImportAttributesAreDetected()
{
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)]
[ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public void MissingTopLevelExportMessageIsInformative()
{
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)]
[ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public void MissingTopLevelNamedExportMessageIsInformative()
{
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)]
[ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public void TheSameSharedInstanceIsReusedWithinItsSharingBoundary()
{
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)]
[ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public void AConcreteTypeWithUnsupportedConstructorsCannotBeUsedAsAMetadataView()
{
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)]
[ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public void UnsupportedMetadataViewMessageIsInformative()
{
// In future, the set of allowable generic type mappings will be expanded (see
// ignored tests above).
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)]
[ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public void TypesWithMismatchedGenericParameterListsAreDetectedDuringDiscovery()
{
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)]
[ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public void TypesWithNonGenericExportsAreDetectedDuringDiscovery()
{
/// Needs to be fixed so that specifying boundary would automatically create the shared
/// </summary>
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)]
[ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public void BoundarySharingTest()
{
/// CirA root of the composition has to be shared explicitly.
/// </summary>
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)]
[ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public void CircularBoundarySharingTest()
{
/// Something is badly busted here.. I am getting a null ref exception
/// </summary>
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)]
[ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public void MultipleBoundarySpecified()
{
<ProjectGuid>{4852A19F-C05C-478D-BFA0-59FD03DE0E3F}</ProjectGuid>
<RootNamespace>System.Composition.Lightweight.UnitTests</RootNamespace>
<AssemblyName>System.Composition.Tests</AssemblyName>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ActivationEventOrderingTests.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard1.3;
netstandard;
- netcoreapp;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{DA6841A5-0344-4CC7-98B0-89CBEE18DEE3}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.3-Debug;netstandard1.3-Release</Configurations>
+ <Configurations>netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="TestClass.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<XUnitNoAppdomain>true</XUnitNoAppdomain>
<XUnitMaxThreads>1</XUnitMaxThreads>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Exception messages are different")]
public void MinValueString_TooSmall()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Exception messages are different")]
public void MaxValueString_TooBig()
{
RemoteExecutor.Invoke(() =>
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
- netstandard-Windows_NT;
+ netcoreapp;
+ netcoreapp-Windows_NT;
+ uap;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
}
[Theory]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/18220", TargetFrameworkMonikers.UapAot)]
[MemberData(nameof(InputData))]
public void TestEncoding(string inputString)
{
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/18220", TargetFrameworkMonikers.UapAot)]
public void InputEncoding_SetWithInInitialized_ResetsIn()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/18220", TargetFrameworkMonikers.UapAot)]
public void OutputEncoding_SetWithErrorAndOutputInitialized_ResetsErrorAndOutput()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/18220", TargetFrameworkMonikers.UapAot)]
[PlatformSpecific(TestPlatforms.Windows)]
public void OutputEncoding_SetEncodingWithInvalidCodePage_ThrowsIOException()
{
Assert.True(left != right);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // .NET Framework's hashing algorithm doesn't factor in CKI.Key
[Theory]
[MemberData(nameof(NotEqualConsoleKeyInfos))]
public void HashCodeNotEquals_DifferentData(ConsoleKeyInfo left, ConsoleKeyInfo right)
}
[Fact]
- // On the full framework it is not guaranteed to eat the preamble bytes
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static unsafe void OutputEncodingPreamble()
{
Encoding curEncoding = Console.OutputEncoding;
using Xunit;
-[SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Issue https://github.com/dotnet/corefx/issues/18220")]
public class SyncTextReader
{
// NOTE: These tests test the underlying SyncTextReader by
<ProjectGuid>{3ED7BCF1-34B9-49B7-9C25-0BC3304C0858}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netstandard-Debug;netstandard-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Debug;uap-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CancelKeyPress.cs" />
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "// NETFX does not have the fix https://github.com/dotnet/corefx/pull/28905")]
public static void Title_GetWindows_ReturnsNonNull()
{
Assert.NotNull(Console.Title);
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "// NETFX does not have the fix https://github.com/dotnet/corefx/pull/28905")]
public static void Title_Get_Windows_NoNulls()
{
string title = Console.Title;
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Title_SetGreaterThan24500Chars_ThrowsArgumentOutOfRangeException()
- {
- // We don't explicitly throw on Core as this isn't technically correct
- string newTitle = new string('a', 24501);
- AssertExtensions.Throws<ArgumentOutOfRangeException>("value", () => Console.Title = newTitle);
- }
-
- [Fact]
[OuterLoop] // makes noise, not very inner-loop friendly
public static void Beep_Invoke_Success()
{
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<ProjectGuid>{B473F77D-4168-4123-932A-E88020B768FA}</ProjectGuid>
<NoWarn>0168,0169,0414,0219,0649</NoWarn>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Data\Common\DataColumnMappingTest.cs" />
<Link>Common\System\Runtime\Serialization\Formatters\BinaryFormatterHelpers.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="System\Data\Common\DbProviderFactoriesTests.netcoreapp.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
<Compile Include="System\Xml\XmlDataDocumentTests.cs" />
</ItemGroup>
<ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <!-- Tests crash when running in ret mode, [ActiveIssue(23407)] -->
- <ILCBuildType>chk</ILCBuildType>
<ProjectGuid>{2B38992F-9979-485F-B104-38C476D0B706}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Mono\DataRowComparerTest.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Unix;
- netstandard-Windows_NT;
+ uap-Windows_NT;
+ netfx-Windows_NT;
netcoreapp-Unix;
netcoreapp-Windows_NT;
</BuildConfigurations>
public static bool IsConnectionStringConfigured() => s_tcpConnStr != string.Empty;
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteScalarTest()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteScalarErrorTest()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteNonQueryTest()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteNonQueryErrorTest()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteReaderTest()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteReaderErrorTest()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteReaderWithCommandBehaviorTest()
{
RemoteExecutor.Invoke(() =>
}
[ConditionalFact(nameof(IsConnectionStringConfigured))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteXmlReaderTest()
{
RemoteExecutor.Invoke(cs =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteXmlReaderErrorTest()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteScalarAsyncTest()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteScalarAsyncErrorTest()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteNonQueryAsyncTest()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteNonQueryAsyncErrorTest()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteReaderAsyncTest()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteReaderAsyncErrorTest()
{
RemoteExecutor.Invoke(() =>
}
[ConditionalFact(nameof(IsConnectionStringConfigured))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteXmlReaderAsyncTest()
{
RemoteExecutor.Invoke(cs =>
}
[ConditionalFact(nameof(IsConnectionStringConfigured))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ExecuteXmlReaderAsyncErrorTest()
{
RemoteExecutor.Invoke(cs =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ConnectionOpenTest()
{
RemoteExecutor.Invoke(() =>
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue(11057)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ConnectionOpenErrorTest()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ConnectionOpenAsyncTest()
{
RemoteExecutor.Invoke(() =>
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue(11057)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")]
public void ConnectionOpenAsyncErrorTest()
{
RemoteExecutor.Invoke(() =>
<PropertyGroup>
<ProjectGuid>{F3E72F35-0351-4D67-9388-725BCAD807BA}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AADAccessTokenTest.cs" />
<Compile Include="TestTdsServer.cs" />
<Compile Include="..\ManualTests\DataCommon\DataTestUtility.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="SqlFacetAttributeTest.cs" />
</ItemGroup>
<ItemGroup>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
private bool TryGetResourceValue(string resourceName, object[] args, out object result)
{
- if (PlatformDetection.IsNetNative)
- {
- result = string.Empty;
- return true;
- }
- else
- {
- var type = _resourceAssembly.GetType("System.SR");
- var info = type.GetProperty(resourceName, BindingFlags.NonPublic | BindingFlags.Static);
+ var type = _resourceAssembly.GetType("System.SR");
+ var info = type.GetProperty(resourceName, BindingFlags.NonPublic | BindingFlags.Static);
- result = null;
- if (info != null)
+ result = null;
+ if (info != null)
+ {
+ result = info.GetValue(null);
+ if (args != null)
{
- result = info.GetValue(null);
- if (args != null)
- {
- result = string.Format((string)result, args);
- }
+ result = string.Format((string)result, args);
}
- return result != null;
}
+ return result != null;
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{45DB5F86-7AE3-45C6-870D-F9357B66BDB5}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Collections\DictionaryExtensions.cs">
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Unix;
- netstandard-Windows_NT;
+ netcoreapp-Unix;
+ netcoreapp-Windows_NT;
+ netfx-Windows_NT;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<RootNamespace>Stress.Data.SqlClient</RootNamespace>
<AssemblyName>System.Data.SqlClient.Stress.Tests</AssemblyName>
<!-- These should not run in Helix: they produce no outputs and are only run manually -->
- <ArchiveTests>false</ArchiveTests>
- <Configurations>netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <ArchiveTest>false</ArchiveTest>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\System.Data.StressRunner\System.Data.StressRunner.csproj" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{0C4E7FF1-54C6-49B7-9700-18F5F3EB8E65}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
internal static void AssertThrowsContractException(Action action)
{
Exception exc = Assert.ThrowsAny<Exception>(action);
- if (!PlatformDetection.IsNetNative) // Cannot do internal framework Reflection on .NET Native
- {
- Assert.Equal("ContractException", exc.GetType().Name);
- }
+ Assert.Equal("ContractException", exc.GetType().Name);
}
internal static IDisposable WithContractFailed(EventHandler<ContractFailedEventArgs> handler)
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<RootNamespace>System.Diagnostics.Tests</RootNamespace>
<IgnoreArchitectureMismatches>true</IgnoreArchitectureMismatches>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<Compile Include="DebugTestsNoListeners.cs" />
<Compile Include="DebugTestsUsingListeners.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netfx'">
- <ReferenceFromRuntime Include="System.Runtime.InteropServices.RuntimeInformation" />
- </ItemGroup>
</Project>
\ No newline at end of file
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
- netfx-Windows_NT;
+ netcoreapp;
+ netfx-Windows_NT;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
/// Test that things work properly for Linux newline conventions.
/// </summary>
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "This is linux specific test")]
public void LinuxNewLineConventions()
{
RemoteExecutor.Invoke(() =>
/// <summary>
/// Will be called when a DiagnosticSource event is fired.
/// </summary>
- public event Action<DiagnosticSourceEvent> EventWritten;
+ public new event Action<DiagnosticSourceEvent> EventWritten;
/// <summary>
/// It is possible that there are other events besides those that are being forwarded from
<PropertyGroup>
<ProjectGuid>{A7922FA3-306A-41B9-B8DC-CC4DBE685A85}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetGroup)' != 'netfx'">
<Compile Include="DiagnosticSourceEventSourceBridgeTests.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="DiagnosticSourceTests.cs" />
- </ItemGroup>
- <ItemGroup Condition=" '$(TargetGroup)' != 'netstandard1.1'">
<Compile Include="ActivityTests.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetGroup)' == 'netfx'">
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
- netstandard-Unix;
+ uap-Windows_NT;
+ netcoreapp-Windows_NT;
+ netcoreapp-Unix;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<AssemblyName>System.Diagnostics.FileVersionInfo.Tests</AssemblyName>
<ProjectGuid>{6DFDB760-CC88-48AE-BD81-C64844EA3CBC}</ProjectGuid>
- <Configurations>netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
- netstandard-Unix;
uap-Windows_NT;
- uapaot-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "Process.Modules is not supported on uap")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Process.Modules is not supported on uap")]
public void Modules_Get_ContainsHostFileName()
{
ProcessModuleCollection modules = Process.GetCurrentProcess().Modules;
private const int s_ConsoleEncoding = 437;
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "Get/SetConsoleOutputCP not supported yet https://github.com/dotnet/corefx/issues/21483")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Get/SetConsoleOutputCP not supported yet https://github.com/dotnet/corefx/issues/21483")]
public void TestChangesInConsoleEncoding()
{
Action<int> run = expectedCodePage =>
}
[Fact]
- [ActiveIssue(29865, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(29865, TargetFrameworkMonikers.Uap)]
public void TestSetEnvironmentOnChildProcess()
{
const string name = "b5a715d3-d74f-465d-abb7-2abe844750c9";
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "Retrieving information about local processes is not supported on uap")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestEnvironmentOfChildProcess()
{
const string ItemSeparator = "CAFF9451396B4EEF8A5155A15BDC2080"; // random string that shouldn't be in any env vars; used instead of newline to separate env var strings
Assert.False(psi.UseShellExecute, "UseShellExecute=true is not supported on onecore.");
}
- [PlatformSpecific(TestPlatforms.Windows)]
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Desktop UseShellExecute is set to true by default")]
- public void UseShellExecute_GetSetWindows_Success_Netfx()
- {
- ProcessStartInfo psi = new ProcessStartInfo();
- Assert.True(psi.UseShellExecute);
-
- psi.UseShellExecute = false;
- Assert.False(psi.UseShellExecute);
-
- psi.UseShellExecute = true;
- Assert.True(psi.UseShellExecute);
- }
-
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap | TargetFrameworkMonikers.NetFramework)]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public void TestUseShellExecuteProperty_SetAndGet_NotUapOrNetFX()
{
ProcessStartInfo psi = new ProcessStartInfo();
{
var psi = new ProcessStartInfo { FileName = $"{Process.GetCurrentProcess().ProcessName}.exe" };
- if (PlatformDetection.IsNetNative)
- {
- // UapAot doesn't have RegistryKey apis available so ProcessStartInfo.Verbs returns Array<string>.Empty().
- Assert.Equal(0, psi.Verbs.Length);
- return;
- }
-
Assert.Contains("open", psi.Verbs, StringComparer.OrdinalIgnoreCase);
Assert.Contains("runas", psi.Verbs, StringComparer.OrdinalIgnoreCase);
Assert.Contains("runasuser", psi.Verbs, StringComparer.OrdinalIgnoreCase);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET Framework throws an InvalidCastException for non-string keys. See https://github.com/dotnet/corefx/issues/18187.")]
[PlatformSpecific(TestPlatforms.Windows)]
public void Verbs_GetWithNonStringValue_ReturnsEmpty()
{
nameof(PlatformDetection.IsNotWindows8x))] // https://github.com/dotnet/corefx/issues/20388
[OuterLoop("Launches notepad")]
[PlatformSpecific(TestPlatforms.Windows)]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20388", TargetFrameworkMonikers.NetFramework)]
// We don't have the ability yet for UseShellExecute in UAP
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20204", TargetFrameworkMonikers.Uap | TargetFrameworkMonikers.UapAot)]
+ [ActiveIssue("https://github.com/dotnet/corefx/issues/20204", TargetFrameworkMonikers.Uap)]
public void StartInfo_TextFile_ShellExecute()
{
if (Thread.CurrentThread.CurrentCulture.ToString() != "en-US")
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "There is 2 bugs in Desktop in this codepath, see: dotnet/corefx #18437 and #18436")]
[SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "No simple way to perform this on uap using cmd.exe")]
public void TestAsyncHalfCharacterAtATime()
{
// On netfx, the handler is called once with the Data as null, even if the process writes nothing to the pipe.
// That behavior is documented here https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.datareceivedeventhandler
- p.OutputDataReceived += (s, e) => { Assert.True(PlatformDetection.IsFullFramework && e.Data == null, "OutputDataReceived called after closing the process"); };
- p.ErrorDataReceived += (s, e) => { Assert.True(PlatformDetection.IsFullFramework && e.Data == null, "ErrorDataReceived called after closing the process"); };
p.Start();
p.BeginOutputReadLine();
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Behavior differs on Windows and Unix
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "Retrieving information about local processes is not supported on uap")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestProcessOnRemoteMachineWindows()
{
Process currentProccess = Process.GetCurrentProcess();
Process process = CreateProcessLong();
process.Start();
- // Processes are not hosted by dotnet in the full .NET Framework.
- string expectedFileName = (PlatformDetection.IsFullFramework || PlatformDetection.IsNetNative) ? RemoteExecutor.HostRunner : RemoteExecutor.HostRunner;
- Assert.Equal(expectedFileName, process.StartInfo.FileName);
+ Assert.Equal(RemoteExecutor.HostRunner, process.StartInfo.FileName);
process.Kill();
Assert.True(process.WaitForExit(WaitInMS));
// .NET Core fixes a bug where Process.StartInfo for a unrelated process would
// return information about the current process, not the unrelated process.
// See https://github.com/dotnet/corefx/issues/1100.
- if (PlatformDetection.IsFullFramework)
- {
- var startInfo = new ProcessStartInfo();
- process.StartInfo = startInfo;
- Assert.Equal(startInfo, process.StartInfo);
- }
- else
- {
- Assert.Throws<InvalidOperationException>(() => process.StartInfo = new ProcessStartInfo());
- }
+ Assert.Throws<InvalidOperationException>(() => process.StartInfo = new ProcessStartInfo());
process.Kill();
Assert.True(process.WaitForExit(WaitInMS));
// .NET Core fixes a bug where Process.StartInfo for an unrelated process would
// return information about the current process, not the unrelated process.
// See https://github.com/dotnet/corefx/issues/1100.
- if (PlatformDetection.IsFullFramework)
- {
- Assert.NotNull(process.StartInfo);
- }
- else
- {
- Assert.Throws<InvalidOperationException>(() => process.StartInfo);
- }
+ Assert.Throws<InvalidOperationException>(() => process.StartInfo);
}
[Theory]
[OuterLoop]
[Fact]
[PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Windows)] // Expected process HandleCounts differs on OSX
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Handle count change is not reliable, but seems less robust on NETFX")]
[SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void HandleCountChanges()
{
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "Getting handle of child process running on UAP is not possible")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Getting handle of child process running on UAP is not possible")]
public void WaitForPeerProcess()
{
Process child1 = CreateProcessLong();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "Not applicable on uap - RemoteInvoke does not give back process handle")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not applicable on uap - RemoteInvoke does not give back process handle")]
[ActiveIssue(15844, TestPlatforms.AnyUnix)]
public void WaitChain()
{
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants Condition="'$(TargetsWindows)' == 'true'">$(DefineConstants);TargetsWindows</DefineConstants>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonPath)\CoreLib\System\PasteArguments.cs">
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
namespace System.Diagnostics.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "StackFrame is not supported in uapaot.")]
public class StackFrameExtensionsTests
{
public static IEnumerable<object[]> StackFrame_TestData()
namespace System.Diagnostics.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "StackFrame is not supported in uapaot.")]
public class StackFrameTests
{
[Fact]
VerifyStackFrame(stackFrame, false, 0, typeof(StackFrameTests).GetMethod(nameof(Ctor_Default)), isCurrentFrame: true);
}
- [ActiveIssue(23796, TargetFrameworkMonikers.NetFramework)]
[Theory]
[InlineData(true)]
[InlineData(false)]
VerifyStackFrame(stackFrame, true, skipFrames, typeof(StackFrameTests).GetMethod(nameof(Ctor_SkipFrames)), isCurrentFrame: skipFrames == 0);
}
- [ActiveIssue(23796, TargetFrameworkMonikers.NetFramework)]
[Theory]
[InlineData(StackFrame.OFFSET_UNKNOWN, true)]
[InlineData(0, true)]
[InlineData(null, StackFrame.OFFSET_UNKNOWN)]
[InlineData("", 0)]
[InlineData("FileName", 1)]
- [ActiveIssue(28853, TargetFrameworkMonikers.NetFramework)]
public void Ctor_Filename_LineNumber(string fileName, int lineNumber)
{
var stackFrame = new StackFrame(fileName, lineNumber);
[InlineData(null, StackFrame.OFFSET_UNKNOWN, 0)]
[InlineData("", 0, StackFrame.OFFSET_UNKNOWN)]
[InlineData("FileName", 1, 2)]
- [ActiveIssue(28853, TargetFrameworkMonikers.NetFramework)]
public void Ctor_Filename_LineNumber_ColNumber(string fileName, int lineNumber, int columnNumber)
{
var stackFrame = new StackFrame(fileName, lineNumber, columnNumber);
namespace System.Diagnostics.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "StackTrace is not supported in uapaot.")]
public class StackTraceTests
{
[Fact]
Assert.Null(stackTrace.GetFrame(0));
}
- [ActiveIssue(23796, TargetFrameworkMonikers.NetFramework)]
[Theory]
[InlineData(0)]
[InlineData(1)]
// Netfx has null Frames if skipping frames in Release mode.
StackFrame[] frames = stackTrace.GetFrames();
-#if DEBUG
Assert.Equal(expectedMethods, frames.Select(f => f.GetMethod()));
-#else
- if (PlatformDetection.IsFullFramework && skipFrames > 0)
- {
- Assert.Null(frames);
- }
- else
- {
- Assert.Equal(expectedMethods, frames.Select(f => f.GetMethod()));
- }
-#endif
if (frames != null)
{
VerifyFrames(stackTrace, false);
Assert.Null(stackTrace.GetFrame(0));
}
- [ActiveIssue(23796, TargetFrameworkMonikers.NetFramework)]
[Theory]
[InlineData(0, true)]
[InlineData(1, true)]
// Netfx has null Frames if skipping frames in Release mode.
StackFrame[] frames = stackTrace.GetFrames();
-#if DEBUG
Assert.Equal(expectedMethods, frames.Select(f => f.GetMethod()));
-#else
- if (PlatformDetection.IsFullFramework && skipFrames > 0)
- {
- Assert.Null(frames);
- }
- else
- {
- Assert.Equal(expectedMethods, frames.Select(f => f.GetMethod()));
- }
-#endif
if (frames != null)
{
VerifyFrames(stackTrace, fNeedFileInfo);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void ToString_NullFrame_ThrowsNullReferenceException()
{
var stackTrace = new StackTrace((StackFrame)null);
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{297A9116-1005-499D-A895-2063D03E4C94}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
- netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<ProjectGuid>{92A9467A-9F7E-4294-A7D5-7B59F2E54ABE}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="TestTraceFilter.cs" />
<Compile Include="CtorsStreamTests.cs" />
<Compile Include="DelimiterWriteMethodTests.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="ConsoleTraceListenerTests.cs" />
<Compile Include="XmlWriterTraceListenerTests.cs" />
</ItemGroup>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "In full framework despite closing it, it still writes the traces, we're fixing that behavior in .NET Core")]
public void Close_NoWriteSuccess()
{
string file = GetTestFilePath();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "In full framework despite closing it, it still writes the traces, we're fixing that behavior in .NET Core")]
public void Close_WriteBeforeAndAfter()
{
string file = GetTestFilePath();
Assert.DoesNotContain("<DataItem>here</DataItem>", text);
Assert.Contains("<DataItem>existent</DataItem><DataItem>.net</DataItem><DataItem>code</DataItem>", text);
- if (!PlatformDetection.IsFullFramework)
- {
- // Desktop has a boolean to turn on filtering in TraceTransfer due to a bug.
- // https://referencesource.microsoft.com/#System/compmod/system/diagnostics/XmlWriterTraceListener.cs,26
- Assert.DoesNotContain('"' + traceTransferId.ToString(CultureInfo.InvariantCulture) + '"', text);
- Assert.DoesNotContain("this is a transfer", text);
- Assert.DoesNotContain("Transfer", text);
- Assert.DoesNotContain(guid.ToString("B"), text);
- }
+ // Desktop has a boolean to turn on filtering in TraceTransfer due to a bug.
+ // https://referencesource.microsoft.com/#System/compmod/system/diagnostics/XmlWriterTraceListener.cs,26
+ Assert.DoesNotContain('"' + traceTransferId.ToString(CultureInfo.InvariantCulture) + '"', text);
+ Assert.DoesNotContain("this is a transfer", text);
+ Assert.DoesNotContain("Transfer", text);
+ Assert.DoesNotContain(guid.ToString("B"), text);
}
[Theory]
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<ProjectGuid>{41BF89E4-8C67-45A6-8044-13009E363220}</ProjectGuid>
<RootNamespace>System</RootNamespace>
<AssemblyName>System.Diagnostics.Tools.Tests</AssemblyName>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- netstandard-Unix;
- netstandard-Windows_NT;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<ProjectGuid>{7B32D24D-969A-4F7F-8461-B43E15E5D553}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
public class TraceClassTests : IDisposable
{
- private readonly string TestRunnerAssemblyName = PlatformDetection.IsFullFramework ?
- Path.GetFileName(Environment.GetCommandLineArgs()[0]) : Assembly.GetEntryAssembly().GetName().Name;
+ private readonly string TestRunnerAssemblyName = Assembly.GetEntryAssembly().GetName().Name;
void IDisposable.Dispose()
{
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Stack Traces are not so rich on AoT.")]
public void CallstackTest_ContainsExpectedFrames()
{
var cache = new TraceEventCache();
#if !USE_MDT_EVENTSOURCE
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, reason: "https://github.com/dotnet/corefx/issues/23661")]
#endif
- [ActiveIssue("https://github.com/dotnet/corefx/issues/22791", TargetFrameworkMonikers.UapAot)]
[ActiveIssue("https://github.com/dotnet/corefx/issues/25029")]
public void Test_Write_Metric_EventListener()
{
/// </summary>
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // non-Windows EventSources don't have lifetime
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Test requires private reflection.")]
public void Test_EventSource_Lifetime()
{
TestUtilities.CheckNoEventSourcesRunning("Start");
{
private static void AsserExceptionStringsEqual(Func<string> expectedStrFunc, Exception ex)
{
- if (!PlatformDetection.IsNetNative)
- {
- string expectedStr = expectedStrFunc();
- Assert.Equal(ex.Message, expectedStr);
- }
+ string expectedStr = expectedStrFunc();
+ Assert.Equal(ex.Message, expectedStr);
}
#region Message string building
/// These tests use the NuGet EventSource to validate *both* NuGet and BCL user-defined EventSources
/// For NuGet EventSources we validate both "runtime" and "validation" behavior
/// </summary>
- [ActiveIssue("dotnet/corefx #19091", TargetFrameworkMonikers.NetFramework)]
[Fact]
+ [ActiveIssue("dotnet/corefx #19091", TargetFrameworkMonikers.NetFramework)]
public void Test_GenerateManifest_InvalidEventSources()
{
TestUtilities.CheckNoEventSourcesRunning("Start");
Assert.NotNull(EventSource.GenerateManifest(typeof(Sdt.MismatchIdEventSource), string.Empty));
// These tests require the IL to be present for inspection.
- if (!PlatformDetection.IsNetNative)
- {
- e = AssertExtensions.Throws<ArgumentException>(null, () => EventSource.GenerateManifest(typeof(Sdt.MismatchIdEventSource), string.Empty, strictOptions));
- AsserExceptionStringsEqual(() => GetResourceString("EventSource_MismatchIdToWriteEvent", "WriteInteger", 10, 1), e);
+ e = AssertExtensions.Throws<ArgumentException>(null, () => EventSource.GenerateManifest(typeof(Sdt.MismatchIdEventSource), string.Empty, strictOptions));
+ AsserExceptionStringsEqual(() => GetResourceString("EventSource_MismatchIdToWriteEvent", "WriteInteger", 10, 1), e);
- e = AssertExtensions.Throws<ArgumentException>(null, () => EventSource.GenerateManifest(typeof(Sdt.MismatchIdEventSource), string.Empty, strictOptions));
- AsserExceptionStringsEqual(() => GetResourceString("EventSource_MismatchIdToWriteEvent", "WriteInteger", 10, 1), e);
- }
+ e = AssertExtensions.Throws<ArgumentException>(null, () => EventSource.GenerateManifest(typeof(Sdt.MismatchIdEventSource), string.Empty, strictOptions));
+ AsserExceptionStringsEqual(() => GetResourceString("EventSource_MismatchIdToWriteEvent", "WriteInteger", 10, 1), e);
Assert.NotNull(EventSource.GenerateManifest(typeof(Sdt.EventIdReusedEventSource), string.Empty));
/// Test the
/// </summary>
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/29754
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Depends on inspecting IL at runtime.")]
public void Test_BadEventSource_MismatchedIds_WithEtwListener()
{
// We expect only one session to be on when running the test but if a ETW session was left
Event _event = events[0];
Assert.Equal("EventSourceMessage", _event.EventName);
- // Check the exception text if not ProjectN.
- if (!PlatformDetection.IsNetNative)
- {
- string message = _event.PayloadString(0, "message");
- // expected message: "ERROR: Exception in Command Processing for EventSource BadEventSource_Bad_Type_ByteArray: Unsupported type Byte[] in event source. "
- Assert.True(Regex.IsMatch(message, "Unsupported type"));
- }
+ string message = _event.PayloadString(0, "message");
+ // expected message: "ERROR: Exception in Command Processing for EventSource BadEventSource_Bad_Type_ByteArray: Unsupported type Byte[] in event source. "
+ Assert.True(Regex.IsMatch(message, "Unsupported type"));
}
}
finally
/// Test the
/// </summary>
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/29754
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Depends on inspecting IL at runtime.")]
public void Test_BadEventSource_MismatchedIds()
{
TestUtilities.CheckNoEventSourcesRunning("Start");
[Theory]
[InlineData(true)]
[InlineData(false)]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/21217", TargetFrameworkMonikers.UapAot)]
public void Ctor_SortKeys(bool critical)
{
SortKey[] sortKeys = new SortKey[] { new SortKey("name1", "rule1", true), new SortKey("name2", "rule2", false) };
<Project>
<PropertyGroup>
<BuildConfigurations>
- netcoreapp-Windows_NT;
- netfx;
+ netcoreapp-Windows_NT;
+ netfx;
</BuildConfigurations>
</PropertyGroup>
</Project>
[Fact]
[OuterLoop]
[SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Getting information about domain is denied inside App")]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/21553", TargetFrameworkMonikers.UapAot)]
public void FindByTransportType_ForestNoDomainAssociatedWithoutName_ThrowsActiveDirectoryOperationException()
{
var context = new DirectoryContext(DirectoryContextType.Forest);
[Fact]
[OuterLoop]
[SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Getting information about domain is denied inside App")]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/21553", TargetFrameworkMonikers.UapAot)]
public void FindByTransportType_ConfigurationSetTypeWithName_Throws()
{
var context = new DirectoryContext(DirectoryContextType.ConfigurationSet, "Name");
[Fact]
[OuterLoop]
[SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Getting information about domain is denied inside App")]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/21553", TargetFrameworkMonikers.UapAot)]
public void FindAll_NullName_ThrowsActiveDirectoryOperationException()
{
var context = new DirectoryContext(DirectoryContextType.Domain);
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
[InlineData(DirectoryContextType.DirectoryServer, "\0")]
[InlineData(DirectoryContextType.Forest, "server:port")]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/21553", TargetFrameworkMonikers.UapAot)]
public void GetForest_NonNullNameAndNotRootedDomain_ThrowsActiveDirectoryObjectNotFoundException(DirectoryContextType type, string name)
{
var context = new DirectoryContext(type, name);
namespace System.DirectoryServices.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap | TargetFrameworkMonikers.UapAot, "DirectoryObjectSecurity is not supported.")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "DirectoryObjectSecurity is not supported.")]
public class ActiveDirectorySecurityTests
{
[Fact]
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
- [ActiveIssue(21346, TargetFrameworkMonikers.UapAot)]
public void DeleteTree_NoObject_ThrowsCOMException()
{
var entry = new DirectoryEntry("path");
}
[Fact]
- [ActiveIssue(21346, TargetFrameworkMonikers.UapAot)]
public void DeleteTree_DisposedObject_ObjectDisposedException()
{
var entry = new DirectoryEntry("path");
yield return new object[] {Color.FromName("SomeName"), Color.FromName(someNameConstructed), true};
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // desktop incorrectly does "name.Equals(name)" in Equals
[Theory]
[MemberData(nameof(Equality_MemberData))]
public void Equality(Color left, Color right, bool expected)
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void DebuggerAttributesAreValid()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(Color.Aquamarine);
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
- uap;
netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{CF54638C-A382-4A78-9AD6-2304CEEFEB01}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="DataContractSerializerTests.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<ProjectGuid>{0BFD6D9F-DF9E-4B17-8ED4-29437AE5B04A}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>67,168,219,414,162,184,458,464,78,169,114,693,108,1981,649,109,1066,3021,3026,3002,3014,3022,660,661,429</NoWarn>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<AssembliesBeingTested Include="Microsoft.CSharp" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{66BE33BB-790D-4D0C-9336-E073001CBD15}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
{
int month = 1;
int day = 1;
- if (calendar is JapaneseLunisolarCalendar && PlatformDetection.IsFullFramework)
- {
- // desktop has a bug in JapaneseLunisolarCalendar which is fixed in .NET Core.
- // in case of a new era starts in the middle of a month which means part of the month will belong to one
- // era and the rest will belong to the new era. When calculating the calendar year number for dates which
- // in the rest of the month and exist in the new started era, we should still use the old era info instead
- // of the new era info because the rest of the month still belong to the year of last era.
- // https://github.com/dotnet/coreclr/pull/3662
- yield break;
- }
+
foreach (int era in calendar.Eras)
{
int year = MaxCalendarYearInEra(calendar, era) - 2;
public void ToDateTime_Invalid_ThrowsArgumentOutOfRangeException()
{
Calendar calendar = Calendar;
- if (PlatformDetection.IsFullFramework && calendar is JapaneseLunisolarCalendar)
- {
- return;
- }
int month = 1;
int day = 1;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void TestJapaneseCalendarDateParsing()
{
CultureInfo ciJapanese = new CultureInfo("ja-JP") { DateTimeFormat = { Calendar = new JapaneseCalendar() } };
{
public override Calendar Calendar => new KoreanLunisolarCalendar();
- public override DateTime MinSupportedDateTime => new DateTime(0918, 02, !PlatformDetection.IsFullFramework ? 19 : 14);
+ public override DateTime MinSupportedDateTime => new DateTime(0918, 02, 19);
public override DateTime MaxSupportedDateTime => new DateTime(2051, 02, 10, 23, 59, 59).AddTicks(9999999);
}
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Regular method on full framework: no point invoking on a null reference")]
public void IsNormalized_Null()
{
AssertExtensions.Throws<ArgumentNullException>("strInput", () => StringNormalizationExtensions.IsNormalized(null));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Regular method on full framework: no point invoking on a null reference")]
public void Normalize_Null()
{
AssertExtensions.Throws<ArgumentNullException>("strInput", () => StringNormalizationExtensions.Normalize(null));
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{BC439554-4AB4-4C94-8E28-C00EDE4FD1C7}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
Assert.Equal(sv1.FullVersion, sv3.FullVersion);
Assert.NotEqual(sv1.SortId, sv2.SortId);
- }
+ }
+
+ [Theory]
+ [MemberData(nameof(GetHashCodeTestData))]
+ public void GetHashCode_Span(string source1, CompareOptions options1, string source2, CompareOptions options2, bool expectSameHashCode)
+ {
+ CompareInfo invariantCompare = CultureInfo.InvariantCulture.CompareInfo;
+
+ int hashOfSource1AsString = invariantCompare.GetHashCode(source1, options1);
+ int hashOfSource1AsSpan = invariantCompare.GetHashCode(source1.AsSpan(), options1);
+ Assert.Equal(hashOfSource1AsString, hashOfSource1AsSpan);
+
+ int hashOfSource2AsString = invariantCompare.GetHashCode(source2, options2);
+ int hashOfSource2AsSpan = invariantCompare.GetHashCode(source2.AsSpan(), options2);
+ Assert.Equal(hashOfSource2AsString, hashOfSource2AsSpan);
+
+ Assert.Equal(expectSameHashCode, hashOfSource1AsSpan == hashOfSource2AsSpan);
+ }
+
+ [Fact]
+ public void GetHashCode_EmptySpan()
+ {
+ Assert.Equal(0, CultureInfo.InvariantCulture.CompareInfo.GetHashCode(ReadOnlySpan<char>.Empty, CompareOptions.None));
+ }
+
+ [Fact]
+ public void GetHashCode_Span_Invalid()
+ {
+ AssertExtensions.Throws<ArgumentException>("options", () => CultureInfo.InvariantCulture.CompareInfo.GetHashCode("Test".AsSpan(), CompareOptions.StringSort));
+ AssertExtensions.Throws<ArgumentException>("options", () => CultureInfo.InvariantCulture.CompareInfo.GetHashCode("Test".AsSpan(), CompareOptions.Ordinal | CompareOptions.IgnoreSymbols));
+ AssertExtensions.Throws<ArgumentException>("options", () => CultureInfo.InvariantCulture.CompareInfo.GetHashCode("Test".AsSpan(), (CompareOptions)(-1)));
+ }
}
}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Xunit;
-
-namespace System.Globalization.Tests
-{
- public partial class CompareInfoTests
- {
- [Theory]
- [MemberData(nameof(GetHashCodeTestData))]
- public void GetHashCode_Span(string source1, CompareOptions options1, string source2, CompareOptions options2, bool expectSameHashCode)
- {
- CompareInfo invariantCompare = CultureInfo.InvariantCulture.CompareInfo;
-
- int hashOfSource1AsString = invariantCompare.GetHashCode(source1, options1);
- int hashOfSource1AsSpan = invariantCompare.GetHashCode(source1.AsSpan(), options1);
- Assert.Equal(hashOfSource1AsString, hashOfSource1AsSpan);
-
- int hashOfSource2AsString = invariantCompare.GetHashCode(source2, options2);
- int hashOfSource2AsSpan = invariantCompare.GetHashCode(source2.AsSpan(), options2);
- Assert.Equal(hashOfSource2AsString, hashOfSource2AsSpan);
-
- Assert.Equal(expectSameHashCode, hashOfSource1AsSpan == hashOfSource2AsSpan);
- }
-
- [Fact]
- public void GetHashCode_EmptySpan()
- {
- Assert.Equal(0, CultureInfo.InvariantCulture.CompareInfo.GetHashCode(ReadOnlySpan<char>.Empty, CompareOptions.None));
- }
-
- [Fact]
- public void GetHashCode_Span_Invalid()
- {
- AssertExtensions.Throws<ArgumentException>("options", () => CultureInfo.InvariantCulture.CompareInfo.GetHashCode("Test".AsSpan(), CompareOptions.StringSort));
- AssertExtensions.Throws<ArgumentException>("options", () => CultureInfo.InvariantCulture.CompareInfo.GetHashCode("Test".AsSpan(), CompareOptions.Ordinal | CompareOptions.IgnoreSymbols));
- AssertExtensions.Throws<ArgumentException>("options", () => CultureInfo.InvariantCulture.CompareInfo.GetHashCode("Test".AsSpan(), (CompareOptions)(-1)));
- }
- }
-}
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
uap-Windows_NT;
</BuildConfigurations>
public class CultureInfoAsync
{
[Fact]
- // async current cultures feature is supported on 4.6.1 and up on Windows desktop framework
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
- [ActiveIssue("https://github.com/dotnet/corert/issues/3747 - Port async-aware CultureInfo property from CoreCLR", TargetFrameworkMonikers.UapAot)]
public void TestCurrentCulturesAsync()
{
CultureInfo currentCulture = CultureInfo.CurrentCulture;
}
[Fact]
- // async current cultures feature is supported on 4.6.1 and up on Windows desktop framework
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
- [ActiveIssue("https://github.com/dotnet/corert/issues/3747 - Port async-aware CultureInfo property from CoreCLR", TargetFrameworkMonikers.UapAot)]
public void TestCurrentCulturesWithAwait()
{
CultureInfo currentCulture = CultureInfo.CurrentCulture;
[Fact]
public void CurrentCulture()
{
- if (PlatformDetection.IsNetNative && !PlatformDetection.IsInAppContainer) // Tide us over until .NET Native ILC tests run are run inside an appcontainer.
- return;
-
RemoteExecutor.Invoke(() =>
{
CultureInfo newCulture = new CultureInfo(CultureInfo.CurrentCulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "ar-SA" : "ja-JP");
[Fact]
public void CurrentUICulture()
{
- if (PlatformDetection.IsNetNative && !PlatformDetection.IsInAppContainer) // Tide us over until .NET Native ILC tests run are run inside an appcontainer.
- return;
-
RemoteExecutor.Invoke(() =>
{
CultureInfo newUICulture = new CultureInfo(CultureInfo.CurrentUICulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "ar-SA" : "ja-JP");
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void AbbreviatedMonthGenitiveNames_Format_ReturnsExpected()
{
var format = new DateTimeFormatInfo();
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CompareInfo\CompareInfoTests.cs" />
<Link>Common\System\RandomDataGenerator.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netfx' And '$(TargetGroup)' != 'netstandard'">
- <Compile Include="CompareInfo\CompareInfoTests.netcoreapp.cs" />
- </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(CommonTestPath)\Data\UnicodeData.11.0.txt">
<Link>CharUnicodeInfo\UnicodeData.11.0.txt</Link>
[Theory]
[MemberData(nameof(DutchTitleCaseInfo_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework hasn't received the fix for dotnet/corefx#16770 yet.")]
public void ToTitleCaseDutchTest(string cultureName, string expected, string actual)
{
TextInfo ti = CultureInfo.GetCultureInfo(cultureName).TextInfo;
[Theory]
[MemberData(nameof(ToLower_TestData_netcore))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void ToLower_Netcore(string name, string str, string expected)
{
TestToLower(name, str, expected);
[Theory]
[MemberData(nameof(ToUpper_TestData_netcore))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void ToUpper_netcore(string name, string str, string expected)
{
TestToUpper(name, str, expected);
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{775727A6-DF41-4160-A7FD-180279A653C7}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ZipFile.Create.cs" />
<Compile Include="$(CommonTestPath)\System\IO\TempDirectory.cs">
<Link>Common\System\IO\TempDirectory.cs</Link>
</Compile>
- <Compile Include="$(CommonTestPath)\System\IO\StreamSpanExtensions.netstandard.cs" Condition="'$(TargetGroup)' == 'netstandard'">
- <Link>Common\System\IO\StreamSpanExtensions.netstandard.cs</Link>
- </Compile>
<Compile Include="$(CommonTestPath)\System\IO\Compression\CRC.cs">
<Link>Common\System\IO\Compression\CRC.cs</Link>
</Compile>
[PlatformSpecific(TestPlatforms.Windows)] // Checks Windows-specific invalid file path
public void Windows_ZipWithInvalidFileNames_ThrowsException(string zipName, string paramName)
{
- if (paramName == null && !PlatformDetection.IsFullFramework)
+ if (paramName == null)
Assert.Throws<IOException>(() => ZipFile.ExtractToDirectory(compat(zipName) + ".zip", GetTestFilePath()));
else
AssertExtensions.Throws<ArgumentException>(paramName, null, () => ZipFile.ExtractToDirectory(compat(zipName) + ".zip", GetTestFilePath()));
[Theory]
[InlineData("../Foo")]
[InlineData("../Barbell")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Second case fails.")]
public void ExtractOutOfRoot(string entryName)
{
string archivePath = GetTestFilePath();
[InlineData("normal")]
[InlineData("empty")]
[InlineData("emptydir")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full Framework does not allow unseekable streams.")]
public static async Task CreateNormal_Unseekable(string folder)
{
using (var s = new MemoryStream())
[Fact]
[Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // Jenkins fails with unicode characters [JENKINS-12610]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full Framework does not allow unseekable streams.")]
public static async Task CreateNormal_Unicode_Unseekable()
{
using (var s = new MemoryStream())
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Deflate64 zip support is a netcore feature not available on full framework.")]
public static async Task Deflate64Zip()
{
IsZipSameAsDir(await StreamHelpers.CreateTempCopyStream(compat("deflate64.zip")), zfolder("normal"), ZipArchiveMode.Update, requireExplicit: true, checkTimes: true);
[InlineData("WindowsInvalid_FromWindows.zip", "aa<b>d")]
[InlineData("NullCharFileName_FromWindows.zip", "a\06b6d")]
[InlineData("NullCharFileName_FromUnix.zip", "a\06b6d")]
- [ActiveIssue(32167, TargetFrameworkMonikers.NetFramework)]
public static async Task ZipWithInvalidFileNames_ParsedBasedOnSourceOS(string zipName, string fileName)
{
using (Stream stream = await StreamHelpers.CreateTempCopyStream(compat(zipName)))
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
+ netcoreapp-Windows_NT;
+ netfx-Windows_NT;
+ uap-Windows_NT
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{5915DD11-5D57-45A9-BFB0-56FEB7741E1F}</ProjectGuid>
- <Configurations>netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="DirectoryObjectSecurityTests.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard-Unix;
- netstandard-Windows_NT;
+ netcoreapp-Unix;
+ netcoreapp-Windows_NT;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{7D9E5F2F-5677-40FC-AD04-FA7D603E4806}</ProjectGuid>
- <Configurations>netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="DriveInfo.Unix.Tests.cs" Condition="'$(TargetsUnix)' == 'true'" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{2EF7EFA5-F171-4CAB-8A29-32833949FD87}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
public class RenamedEventArgsTests
{
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "OldFullPath on Desktop demands FileIOPermissions which causes failures for invalid paths.")]
[InlineData(WatcherChangeTypes.Changed, "C:", "foo.txt", "bar.txt")]
[InlineData(WatcherChangeTypes.All, "C:", "foo.txt", "bar.txt")]
[InlineData(0, "", "", "")]
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "OldFullPath on Desktop demands FileIOPermissions which causes failures for invalid paths.")]
[InlineData(WatcherChangeTypes.Changed, "C:", "foo.txt", "bar.txt")]
[InlineData(WatcherChangeTypes.All, "C:", "foo.txt", "bar.txt")]
[InlineData(0, "", "", "")]
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard-Linux;
- netstandard-OSX;
- netstandard-Windows_NT;
netcoreapp-Linux;
netcoreapp-OSX;
netcoreapp-Windows_NT;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop FSW disallows modification of the watched folder.")]
public void FileSystemWatcher_Directory_Changed_WatchedFolder()
{
using (var testDirectory = new TempDirectory(GetTestFilePath()))
{
public class FileSystemWatcher_Multiple_Test : FileSystemWatcherTest
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "#34017")]
[OuterLoop]
[Fact]
public void FileSystemWatcher_File_Create_ExecutionContextFlowed()
});
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "#34017")]
[OuterLoop]
[Fact]
public void FileSystemWatcher_File_Create_SuppressedExecutionContextHandled()
[OuterLoop("This test has a longer than average timeout and may fail intermittently")]
[InlineData(WatcherChangeTypes.Created)]
[InlineData(WatcherChangeTypes.Deleted)]
- [ActiveIssue("dotnet/corefx #18308", TargetFrameworkMonikers.NetFramework)]
public void CreatedDeleted_Success(WatcherChangeTypes changeType)
{
using (var testDirectory = new TempDirectory(GetTestFilePath()))
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
+using System.Collections.ObjectModel;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
+using System.Threading.Tasks;
using Xunit;
namespace System.IO.Tests
public void FileSystemWatcher_ctor()
{
string path = string.Empty;
- string pattern = PlatformDetection.IsFullFramework ? "*.*" : "*";
+ string pattern = "*";
using (FileSystemWatcher watcher = new FileSystemWatcher())
ValidateDefaults(watcher, path, pattern);
}
public void FileSystemWatcher_ctor_path()
{
string path = @".";
- string pattern = PlatformDetection.IsFullFramework ? "*.*" : "*";
+ string pattern = "*";
using (FileSystemWatcher watcher = new FileSystemWatcher(path))
ValidateDefaults(watcher, path, pattern);
}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "On Desktop, these exceptions don't have a parameter")]
public void FileSystemWatcher_ctor_InvalidStrings()
{
using (var testDirectory = new TempDirectory(GetTestFilePath()))
{
FileSystemWatcher watcher = new FileSystemWatcher();
- Assert.Equal(PlatformDetection.IsFullFramework ? "*.*" : "*", watcher.Filter);
+ Assert.Equal("*", watcher.Filter);
// Null and empty should be mapped to "*"
watcher.Filter = null;
- Assert.Equal(PlatformDetection.IsFullFramework ? "*.*" : "*", watcher.Filter);
+ Assert.Equal("*", watcher.Filter);
watcher.Filter = string.Empty;
- Assert.Equal(PlatformDetection.IsFullFramework ? "*.*" : "*", watcher.Filter);
+ Assert.Equal("*", watcher.Filter);
watcher.Filter = " ";
Assert.Equal(" ", watcher.Filter);
watcher.Filter = "abc.dll";
Assert.Equal("abc.dll", watcher.Filter);
- if (!(PlatformDetection.IsFullFramework || PlatformDetection.IsOSX))
+ if (!(PlatformDetection.IsOSX))
{
watcher.Filter = "ABC.DLL";
Assert.Equal("ABC.DLL", watcher.Filter);
}
}
}
+
+ [Fact]
+ public void DefaultFiltersValue()
+ {
+ var watcher = new FileSystemWatcher();
+ Assert.Equal(0, watcher.Filters.Count);
+ Assert.Empty(watcher.Filters);
+ Assert.NotNull(watcher.Filters);
+ Assert.Equal(new string[] { }, watcher.Filters);
+ }
+
+ [Fact]
+ public void AddFilterToFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+ Assert.Equal(2, watcher.Filters.Count);
+ Assert.Equal(new string[] { "*.pdb", "*.dll" }, watcher.Filters);
+
+ string[] copied = new string[2];
+ watcher.Filters.CopyTo(copied, 0);
+ Assert.Equal(new string[] { "*.pdb", "*.dll" }, copied);
+ }
+
+ [Fact]
+ public void FiltersCaseSensitive()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("foo");
+ Assert.Equal("foo", watcher.Filters[0]);
+ watcher.Filters[0] = "Foo";
+ Assert.Equal("Foo", watcher.Filters[0]);
+ }
+
+ [Fact]
+ public void RemoveFilterFromFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+
+ watcher.Filters.Remove("*.pdb");
+ Assert.DoesNotContain(watcher.Filters, t => t == "*.pdb");
+ Assert.Equal(new string[] { "*.dll" }, watcher.Filters);
+
+ // No Exception is thrown while removing an item which is not present in the list.
+ watcher.Filters.Remove("*.pdb");
+ }
+
+ [Fact]
+ public void AddEmptyStringToFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+
+ watcher.Filters.Add(string.Empty);
+ Assert.Equal(3, watcher.Filters.Count);
+ Assert.Equal(new string[] { "*.pdb", "*.dll", "*" }, watcher.Filters);
+ }
+
+ [Fact]
+ public void AddNullToFilters()
+ {
+ var watcher = new FileSystemWatcher();
+
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+
+ watcher.Filters.Add(null);
+ Assert.Equal(3, watcher.Filters.Count);
+ Assert.Equal(new string[] { "*.pdb", "*.dll", "*" }, watcher.Filters);
+ }
+
+ [Fact]
+ public void SetEmptyStringToFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+
+ watcher.Filters[0] = string.Empty;
+ Assert.Equal(2, watcher.Filters.Count);
+ Assert.Equal("*", watcher.Filters[0]);
+ Assert.Equal(new string[] { "*", "*.dll"}, watcher.Filters);
+ }
+
+ [Fact]
+ public void RemoveEmptyStringToFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+ watcher.Filters.Add(string.Empty);
+
+ Assert.Equal(3, watcher.Filters.Count);
+ watcher.Filters.Remove(string.Empty);
+ Assert.Equal(3, watcher.Filters.Count);
+ Assert.Equal(new string[] { "*.pdb", "*.dll", "*" }, watcher.Filters);
+ }
+
+ [Fact]
+ public void RemoveAtFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+
+ watcher.Filters.RemoveAt(0);
+ Assert.Equal(1, watcher.Filters.Count);
+ Assert.Equal("*.dll", watcher.Filter);
+ Assert.Equal(new string[] {"*.dll" }, watcher.Filters);
+ }
+
+ [Fact]
+ public void RemoveAtEmptyFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+
+ watcher.Filters.RemoveAt(0);
+ Assert.Equal(0, watcher.Filters.Count);
+ Assert.Equal("*", watcher.Filter);
+ Assert.Equal(new string[] { }, watcher.Filters);
+ }
+
+ [Fact]
+ public void SetNullToFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+
+ watcher.Filters[0] = null;
+ Assert.Equal(2, watcher.Filters.Count);
+ Assert.Equal("*", watcher.Filters[0]);
+ Assert.Equal(new string[] { "*", "*.dll" }, watcher.Filters);
+ }
+
+ [Fact]
+ public void ContainsEmptyStringFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+ watcher.Filters.Add(string.Empty);
+
+ Assert.False(watcher.Filters.Contains(string.Empty));
+ Assert.True(watcher.Filters.Contains("*"));
+ }
+
+ [Fact]
+ public void ContainsNullFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+ watcher.Filters.Add(null);
+
+ Assert.False(watcher.Filters.Contains(null));
+ Assert.True(watcher.Filters.Contains("*"));
+ }
+
+ [Fact]
+ public void ContainsFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+
+ Assert.True(watcher.Filters.Contains("*.pdb"));
+ }
+
+ [Fact]
+ public void InsertEmptyStringFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+ watcher.Filters.Insert(1, string.Empty);
+
+ Assert.Equal("*", watcher.Filters[1]);
+ Assert.Equal(3, watcher.Filters.Count);
+ Assert.Equal(new string[] { "*.pdb", "*", "*.dll" }, watcher.Filters);
+ }
+
+ [Fact]
+ public void InsertNullFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+ watcher.Filters.Insert(1, null);
+
+ Assert.Equal("*", watcher.Filters[1]);
+ Assert.Equal(3, watcher.Filters.Count);
+ Assert.Equal(new string[] { "*.pdb", "*", "*.dll" }, watcher.Filters);
+ }
+
+ [Fact]
+ public void InsertFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+ watcher.Filters.Insert(1, "foo");
+
+ Assert.Equal("foo", watcher.Filters[1]);
+ Assert.Equal(3, watcher.Filters.Count);
+ Assert.Equal(new string[] { "*.pdb", "foo", "*.dll" }, watcher.Filters);
+ }
+
+ [Fact]
+ public void InsertAtZero()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+ watcher.Filters.Insert(0, "foo");
+
+ Assert.Equal("foo", watcher.Filters[0]);
+ Assert.Equal("foo", watcher.Filter);
+ Assert.Equal(3, watcher.Filters.Count);
+ Assert.Equal(new string[] { "foo", "*.pdb", "*.dll" }, watcher.Filters);
+ }
+ [Fact]
+ public void IndexOfEmptyStringFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+ watcher.Filters.Add(string.Empty);
+
+ Assert.Equal(-1, watcher.Filters.IndexOf(string.Empty));
+ }
+
+ [Fact]
+ public void IndexOfNullFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+ watcher.Filters.Add(null);
+
+ Assert.Equal(-1, watcher.Filters.IndexOf(null));
+ }
+
+ [Fact]
+ public void IndexOfFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+
+ Assert.Equal(-1, watcher.Filters.IndexOf("foo"));
+ Assert.Equal(0, watcher.Filters.IndexOf("*.pdb"));
+ }
+
+ [Fact]
+ public void GetTypeFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ Assert.IsAssignableFrom<Collection<string>>(watcher.Filters);
+ }
+
+ [Fact]
+ public void ClearFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+
+ watcher.Filters.Clear();
+ Assert.Equal(0, watcher.Filters.Count);
+ Assert.Equal(new string[] { }, watcher.Filters) ;
+ }
+
+ [Fact]
+ public void GetFilterAfterFiltersClear()
+ {
+ using (var testDirectory = new TempDirectory(GetTestFilePath()))
+ {
+ var watcher = new FileSystemWatcher(testDirectory.Path);
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+
+ watcher.Filters.Clear();
+ Assert.Equal("*", watcher.Filter);
+ Assert.Equal(new string[] { }, watcher.Filters);
+ }
+ }
+
+ [Fact]
+ public void GetFiltersAfterFiltersClear()
+ {
+ using (var testDirectory = new TempDirectory(GetTestFilePath()))
+ {
+ var watcher = new FileSystemWatcher(testDirectory.Path);
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+
+ watcher.Filters.Clear();
+ Assert.Throws<ArgumentOutOfRangeException>(() => watcher.Filters[0]);
+ Assert.Equal(0, watcher.Filters.Count);
+ Assert.Empty(watcher.Filters);
+ Assert.NotNull(watcher.Filters);
+ }
+ }
+
+ [Fact]
+ public void InvalidOperationsOnFilters()
+ {
+ var watcher = new FileSystemWatcher();
+ watcher.Filters.Add("*.pdb");
+ watcher.Filters.Add("*.dll");
+
+ Assert.Throws<ArgumentOutOfRangeException>(() => watcher.Filters.Insert(4, "*"));
+ watcher.Filters.Clear();
+ Assert.Throws<ArgumentOutOfRangeException>(() => watcher.Filters[0]);
+ }
+
+ [Fact]
+ public void SetAndGetFilterProperty()
+ {
+ using (var testDirectory = new TempDirectory(GetTestFilePath()))
+ {
+ var watcher = new FileSystemWatcher(testDirectory.Path, "*.pdb");
+ watcher.Filters.Add("foo");
+ Assert.Equal(2, watcher.Filters.Count);
+ Assert.Equal(new string[] { "*.pdb", "foo" }, watcher.Filters);
+
+ watcher.Filter = "*.doc";
+ Assert.Equal(1, watcher.Filters.Count);
+ Assert.Equal("*.doc", watcher.Filter);
+ Assert.Equal("*.doc", watcher.Filters[0]);
+ Assert.Equal(new string[] { "*.doc" }, watcher.Filters);
+
+ watcher.Filters.Clear();
+ Assert.Equal("*", watcher.Filter);
+ }
+ }
+
+ [Fact]
+ public void SetAndGetFiltersProperty()
+ {
+ using (var testDirectory = new TempDirectory(GetTestFilePath()))
+ {
+ var watcher = new FileSystemWatcher(testDirectory.Path, "*.pdb");
+ watcher.Filters.Add("foo");
+ Assert.Equal(new string[] { "*.pdb", "foo" }, watcher.Filters);
+ }
+ }
+
+ [Fact]
+ public void FileSystemWatcher_File_Delete_MultipleFilters()
+ {
+ // Check delete events against multiple filters
+
+ DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath());
+ FileInfo fileOne = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
+ FileInfo fileTwo = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
+ FileInfo fileThree = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
+ fileOne.Create().Dispose();
+ fileTwo.Create().Dispose();
+ fileThree.Create().Dispose();
+
+ using (var watcher = new FileSystemWatcher(directory.FullName))
+ {
+ watcher.Filters.Add(fileOne.Name);
+ watcher.Filters.Add(fileTwo.Name);
+
+ ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => fileOne.Delete(), cleanup: null, expectedPath : fileOne.FullName);
+ ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => fileTwo.Delete(), cleanup: null, expectedPath: fileTwo.FullName );
+ ExpectNoEvent(watcher, WatcherChangeTypes.Deleted, () => fileThree.Delete(), cleanup: null, expectedPath: fileThree.FullName);
+ }
+ }
+
+ [Fact]
+ public void FileSystemWatcher_Directory_Create_MultipleFilters()
+ {
+ // Check create events against multiple filters
+
+ DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath());
+ string directoryOne = Path.Combine(directory.FullName, GetTestFileName());
+ string directoryTwo = Path.Combine(directory.FullName, GetTestFileName());
+ string directoryThree = Path.Combine(directory.FullName, GetTestFileName());
+
+ using (var watcher = new FileSystemWatcher(directory.FullName))
+ {
+ watcher.Filters.Add(Path.GetFileName(directoryOne));
+ watcher.Filters.Add(Path.GetFileName(directoryTwo));
+
+ ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryOne), cleanup: null, expectedPath: directoryOne);
+ ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryTwo), cleanup: null, expectedPath: directoryTwo);
+ ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryThree), cleanup: null, expectedPath: directoryThree);
+ }
+ }
+
+ [Fact]
+ public void FileSystemWatcher_Directory_Create_Filter_Ctor()
+ {
+ // Check create events against multiple filters
+
+ DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath());
+ string directoryOne = Path.Combine(directory.FullName, GetTestFileName());
+ string directoryTwo = Path.Combine(directory.FullName, GetTestFileName());
+ string directoryThree = Path.Combine(directory.FullName, GetTestFileName());
+
+ using (var watcher = new FileSystemWatcher(directory.FullName, Path.GetFileName(directoryOne)))
+ {
+ watcher.Filters.Add(Path.GetFileName(directoryTwo));
+
+ ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryOne), cleanup: null, expectedPath: directoryOne);
+ ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryTwo), cleanup: null, expectedPath: directoryTwo);
+ ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryThree), cleanup: null, expectedPath: directoryThree);
+ }
+ }
+
+ [Fact]
+ public void FileSystemWatcher_Directory_Delete_MultipleFilters()
+ {
+ DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath());
+ DirectoryInfo directoryOne = Directory.CreateDirectory(Path.Combine(directory.FullName, GetTestFileName()));
+ DirectoryInfo directoryTwo = Directory.CreateDirectory(Path.Combine(directory.FullName, GetTestFileName()));
+ DirectoryInfo directoryThree = Directory.CreateDirectory(Path.Combine(directory.FullName, GetTestFileName()));
+
+ using (var watcher = new FileSystemWatcher(directory.FullName))
+ {
+ watcher.Filters.Add(Path.GetFileName(directoryOne.FullName));
+ watcher.Filters.Add(Path.GetFileName(directoryTwo.FullName));
+
+ ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => directoryOne.Delete(), cleanup: null, expectedPath: directoryOne.FullName);
+ ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => directoryTwo.Delete(), cleanup: null, expectedPath: directoryTwo.FullName);
+ ExpectNoEvent(watcher, WatcherChangeTypes.Deleted, () => directoryThree.Delete(), cleanup: null, expectedPath: directoryThree.FullName);
+ }
+ }
+
+ [Fact]
+ public void FileSystemWatcher_File_Create_MultipleFilters()
+ {
+ DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath());
+ FileInfo fileOne = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
+ FileInfo fileTwo = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
+ FileInfo fileThree = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
+
+ using (var watcher = new FileSystemWatcher(directory.FullName))
+ {
+ watcher.Filters.Add(fileOne.Name);
+ watcher.Filters.Add(fileTwo.Name);
+
+ ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileOne.Create().Dispose(), cleanup: null, expectedPath: fileOne.FullName);
+ ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileTwo.Create().Dispose(), cleanup: null, expectedPath: fileTwo.FullName);
+ ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => fileThree.Create().Dispose(), cleanup: null, expectedPath: fileThree.FullName);
+ }
+ }
+
+ [Fact]
+ public void FileSystemWatcher_ModifyFiltersConcurrentWithEvents()
+ {
+ DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath());
+ FileInfo fileOne = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
+ FileInfo fileTwo = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
+ FileInfo fileThree = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
+
+ using (var watcher = new FileSystemWatcher(directory.FullName))
+ {
+ watcher.Filters.Add(fileOne.Name);
+ watcher.Filters.Add(fileTwo.Name);
+
+ var cts = new CancellationTokenSource();
+ Task modifier = Task.Run(() =>
+ {
+ string otherFilter = Guid.NewGuid().ToString("N");
+ while (!cts.IsCancellationRequested)
+ {
+ watcher.Filters.Add(otherFilter);
+ watcher.Filters.RemoveAt(2);
+ }
+ });
+
+ ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileOne.Create().Dispose(), cleanup: null, expectedPath: fileOne.FullName);
+ ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileTwo.Create().Dispose(), cleanup: null, expectedPath: fileTwo.FullName);
+ ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => fileThree.Create().Dispose(), cleanup: null, expectedPath: fileThree.FullName);
+
+ cts.Cancel();
+ modifier.Wait();
+ }
+ }
}
}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Collections.ObjectModel;
-using System.Threading;
-using System.Threading.Tasks;
-using Xunit;
-
-namespace System.IO.Tests
-{
- public class FileSystemWatcherFilterListTests : FileSystemWatcherTest
- {
- [Fact]
- public void DefaultFiltersValue()
- {
- var watcher = new FileSystemWatcher();
- Assert.Equal(0, watcher.Filters.Count);
- Assert.Empty(watcher.Filters);
- Assert.NotNull(watcher.Filters);
- Assert.Equal(new string[] { }, watcher.Filters);
- }
-
- [Fact]
- public void AddFilterToFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
- Assert.Equal(2, watcher.Filters.Count);
- Assert.Equal(new string[] { "*.pdb", "*.dll" }, watcher.Filters);
-
- string[] copied = new string[2];
- watcher.Filters.CopyTo(copied, 0);
- Assert.Equal(new string[] { "*.pdb", "*.dll" }, copied);
- }
-
- [Fact]
- public void FiltersCaseSensitive()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("foo");
- Assert.Equal("foo", watcher.Filters[0]);
- watcher.Filters[0] = "Foo";
- Assert.Equal("Foo", watcher.Filters[0]);
- }
-
- [Fact]
- public void RemoveFilterFromFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
-
- watcher.Filters.Remove("*.pdb");
- Assert.DoesNotContain(watcher.Filters, t => t == "*.pdb");
- Assert.Equal(new string[] { "*.dll" }, watcher.Filters);
-
- // No Exception is thrown while removing an item which is not present in the list.
- watcher.Filters.Remove("*.pdb");
- }
-
- [Fact]
- public void AddEmptyStringToFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
-
- watcher.Filters.Add(string.Empty);
- Assert.Equal(3, watcher.Filters.Count);
- Assert.Equal(new string[] { "*.pdb", "*.dll", "*" }, watcher.Filters);
- }
-
- [Fact]
- public void AddNullToFilters()
- {
- var watcher = new FileSystemWatcher();
-
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
-
- watcher.Filters.Add(null);
- Assert.Equal(3, watcher.Filters.Count);
- Assert.Equal(new string[] { "*.pdb", "*.dll", "*" }, watcher.Filters);
- }
-
- [Fact]
- public void SetEmptyStringToFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
-
- watcher.Filters[0] = string.Empty;
- Assert.Equal(2, watcher.Filters.Count);
- Assert.Equal("*", watcher.Filters[0]);
- Assert.Equal(new string[] { "*", "*.dll"}, watcher.Filters);
- }
-
- [Fact]
- public void RemoveEmptyStringToFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
- watcher.Filters.Add(string.Empty);
-
- Assert.Equal(3, watcher.Filters.Count);
- watcher.Filters.Remove(string.Empty);
- Assert.Equal(3, watcher.Filters.Count);
- Assert.Equal(new string[] { "*.pdb", "*.dll", "*" }, watcher.Filters);
- }
-
- [Fact]
- public void RemoveAtFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
-
- watcher.Filters.RemoveAt(0);
- Assert.Equal(1, watcher.Filters.Count);
- Assert.Equal("*.dll", watcher.Filter);
- Assert.Equal(new string[] {"*.dll" }, watcher.Filters);
- }
-
- [Fact]
- public void RemoveAtEmptyFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
-
- watcher.Filters.RemoveAt(0);
- Assert.Equal(0, watcher.Filters.Count);
- Assert.Equal("*", watcher.Filter);
- Assert.Equal(new string[] { }, watcher.Filters);
- }
-
- [Fact]
- public void SetNullToFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
-
- watcher.Filters[0] = null;
- Assert.Equal(2, watcher.Filters.Count);
- Assert.Equal("*", watcher.Filters[0]);
- Assert.Equal(new string[] { "*", "*.dll" }, watcher.Filters);
- }
-
- [Fact]
- public void ContainsEmptyStringFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
- watcher.Filters.Add(string.Empty);
-
- Assert.False(watcher.Filters.Contains(string.Empty));
- Assert.True(watcher.Filters.Contains("*"));
- }
-
- [Fact]
- public void ContainsNullFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
- watcher.Filters.Add(null);
-
- Assert.False(watcher.Filters.Contains(null));
- Assert.True(watcher.Filters.Contains("*"));
- }
-
- [Fact]
- public void ContainsFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
-
- Assert.True(watcher.Filters.Contains("*.pdb"));
- }
-
- [Fact]
- public void InsertEmptyStringFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
- watcher.Filters.Insert(1, string.Empty);
-
- Assert.Equal("*", watcher.Filters[1]);
- Assert.Equal(3, watcher.Filters.Count);
- Assert.Equal(new string[] { "*.pdb", "*", "*.dll" }, watcher.Filters);
- }
-
- [Fact]
- public void InsertNullFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
- watcher.Filters.Insert(1, null);
-
- Assert.Equal("*", watcher.Filters[1]);
- Assert.Equal(3, watcher.Filters.Count);
- Assert.Equal(new string[] { "*.pdb", "*", "*.dll" }, watcher.Filters);
- }
-
- [Fact]
- public void InsertFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
- watcher.Filters.Insert(1, "foo");
-
- Assert.Equal("foo", watcher.Filters[1]);
- Assert.Equal(3, watcher.Filters.Count);
- Assert.Equal(new string[] { "*.pdb", "foo", "*.dll" }, watcher.Filters);
- }
-
- [Fact]
- public void InsertAtZero()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
- watcher.Filters.Insert(0, "foo");
-
- Assert.Equal("foo", watcher.Filters[0]);
- Assert.Equal("foo", watcher.Filter);
- Assert.Equal(3, watcher.Filters.Count);
- Assert.Equal(new string[] { "foo", "*.pdb", "*.dll" }, watcher.Filters);
- }
- [Fact]
- public void IndexOfEmptyStringFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
- watcher.Filters.Add(string.Empty);
-
- Assert.Equal(-1, watcher.Filters.IndexOf(string.Empty));
- }
-
- [Fact]
- public void IndexOfNullFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
- watcher.Filters.Add(null);
-
- Assert.Equal(-1, watcher.Filters.IndexOf(null));
- }
-
- [Fact]
- public void IndexOfFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
-
- Assert.Equal(-1, watcher.Filters.IndexOf("foo"));
- Assert.Equal(0, watcher.Filters.IndexOf("*.pdb"));
- }
-
- [Fact]
- public void GetTypeFilters()
- {
- var watcher = new FileSystemWatcher();
- Assert.IsAssignableFrom<Collection<string>>(watcher.Filters);
- }
-
- [Fact]
- public void ClearFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
-
- watcher.Filters.Clear();
- Assert.Equal(0, watcher.Filters.Count);
- Assert.Equal(new string[] { }, watcher.Filters) ;
- }
-
- [Fact]
- public void GetFilterAfterFiltersClear()
- {
- using (var testDirectory = new TempDirectory(GetTestFilePath()))
- {
- var watcher = new FileSystemWatcher(testDirectory.Path);
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
-
- watcher.Filters.Clear();
- Assert.Equal("*", watcher.Filter);
- Assert.Equal(new string[] { }, watcher.Filters);
- }
- }
-
- [Fact]
- public void GetFiltersAfterFiltersClear()
- {
- using (var testDirectory = new TempDirectory(GetTestFilePath()))
- {
- var watcher = new FileSystemWatcher(testDirectory.Path);
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
-
- watcher.Filters.Clear();
- Assert.Throws<ArgumentOutOfRangeException>(() => watcher.Filters[0]);
- Assert.Equal(0, watcher.Filters.Count);
- Assert.Empty(watcher.Filters);
- Assert.NotNull(watcher.Filters);
- }
- }
-
- [Fact]
- public void InvalidOperationsOnFilters()
- {
- var watcher = new FileSystemWatcher();
- watcher.Filters.Add("*.pdb");
- watcher.Filters.Add("*.dll");
-
- Assert.Throws<ArgumentOutOfRangeException>(() => watcher.Filters.Insert(4, "*"));
- watcher.Filters.Clear();
- Assert.Throws<ArgumentOutOfRangeException>(() => watcher.Filters[0]);
- }
-
- [Fact]
- public void SetAndGetFilterProperty()
- {
- using (var testDirectory = new TempDirectory(GetTestFilePath()))
- {
- var watcher = new FileSystemWatcher(testDirectory.Path, "*.pdb");
- watcher.Filters.Add("foo");
- Assert.Equal(2, watcher.Filters.Count);
- Assert.Equal(new string[] { "*.pdb", "foo" }, watcher.Filters);
-
- watcher.Filter = "*.doc";
- Assert.Equal(1, watcher.Filters.Count);
- Assert.Equal("*.doc", watcher.Filter);
- Assert.Equal("*.doc", watcher.Filters[0]);
- Assert.Equal(new string[] { "*.doc" }, watcher.Filters);
-
- watcher.Filters.Clear();
- Assert.Equal("*", watcher.Filter);
- }
- }
-
- [Fact]
- public void SetAndGetFiltersProperty()
- {
- using (var testDirectory = new TempDirectory(GetTestFilePath()))
- {
- var watcher = new FileSystemWatcher(testDirectory.Path, "*.pdb");
- watcher.Filters.Add("foo");
- Assert.Equal(new string[] { "*.pdb", "foo" }, watcher.Filters);
- }
- }
-
- [Fact]
- public void FileSystemWatcher_File_Delete_MultipleFilters()
- {
- // Check delete events against multiple filters
-
- DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath());
- FileInfo fileOne = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
- FileInfo fileTwo = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
- FileInfo fileThree = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
- fileOne.Create().Dispose();
- fileTwo.Create().Dispose();
- fileThree.Create().Dispose();
-
- using (var watcher = new FileSystemWatcher(directory.FullName))
- {
- watcher.Filters.Add(fileOne.Name);
- watcher.Filters.Add(fileTwo.Name);
-
- ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => fileOne.Delete(), cleanup: null, expectedPath : fileOne.FullName);
- ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => fileTwo.Delete(), cleanup: null, expectedPath: fileTwo.FullName );
- ExpectNoEvent(watcher, WatcherChangeTypes.Deleted, () => fileThree.Delete(), cleanup: null, expectedPath: fileThree.FullName);
- }
- }
-
- [Fact]
- public void FileSystemWatcher_Directory_Create_MultipleFilters()
- {
- // Check create events against multiple filters
-
- DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath());
- string directoryOne = Path.Combine(directory.FullName, GetTestFileName());
- string directoryTwo = Path.Combine(directory.FullName, GetTestFileName());
- string directoryThree = Path.Combine(directory.FullName, GetTestFileName());
-
- using (var watcher = new FileSystemWatcher(directory.FullName))
- {
- watcher.Filters.Add(Path.GetFileName(directoryOne));
- watcher.Filters.Add(Path.GetFileName(directoryTwo));
-
- ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryOne), cleanup: null, expectedPath: directoryOne);
- ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryTwo), cleanup: null, expectedPath: directoryTwo);
- ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryThree), cleanup: null, expectedPath: directoryThree);
- }
- }
-
- [Fact]
- public void FileSystemWatcher_Directory_Create_Filter_Ctor()
- {
- // Check create events against multiple filters
-
- DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath());
- string directoryOne = Path.Combine(directory.FullName, GetTestFileName());
- string directoryTwo = Path.Combine(directory.FullName, GetTestFileName());
- string directoryThree = Path.Combine(directory.FullName, GetTestFileName());
-
- using (var watcher = new FileSystemWatcher(directory.FullName, Path.GetFileName(directoryOne)))
- {
- watcher.Filters.Add(Path.GetFileName(directoryTwo));
-
- ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryOne), cleanup: null, expectedPath: directoryOne);
- ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryTwo), cleanup: null, expectedPath: directoryTwo);
- ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryThree), cleanup: null, expectedPath: directoryThree);
- }
- }
-
- [Fact]
- public void FileSystemWatcher_Directory_Delete_MultipleFilters()
- {
- DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath());
- DirectoryInfo directoryOne = Directory.CreateDirectory(Path.Combine(directory.FullName, GetTestFileName()));
- DirectoryInfo directoryTwo = Directory.CreateDirectory(Path.Combine(directory.FullName, GetTestFileName()));
- DirectoryInfo directoryThree = Directory.CreateDirectory(Path.Combine(directory.FullName, GetTestFileName()));
-
- using (var watcher = new FileSystemWatcher(directory.FullName))
- {
- watcher.Filters.Add(Path.GetFileName(directoryOne.FullName));
- watcher.Filters.Add(Path.GetFileName(directoryTwo.FullName));
-
- ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => directoryOne.Delete(), cleanup: null, expectedPath: directoryOne.FullName);
- ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => directoryTwo.Delete(), cleanup: null, expectedPath: directoryTwo.FullName);
- ExpectNoEvent(watcher, WatcherChangeTypes.Deleted, () => directoryThree.Delete(), cleanup: null, expectedPath: directoryThree.FullName);
- }
- }
-
- [Fact]
- public void FileSystemWatcher_File_Create_MultipleFilters()
- {
- DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath());
- FileInfo fileOne = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
- FileInfo fileTwo = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
- FileInfo fileThree = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
-
- using (var watcher = new FileSystemWatcher(directory.FullName))
- {
- watcher.Filters.Add(fileOne.Name);
- watcher.Filters.Add(fileTwo.Name);
-
- ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileOne.Create().Dispose(), cleanup: null, expectedPath: fileOne.FullName);
- ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileTwo.Create().Dispose(), cleanup: null, expectedPath: fileTwo.FullName);
- ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => fileThree.Create().Dispose(), cleanup: null, expectedPath: fileThree.FullName);
- }
- }
-
- [Fact]
- public void FileSystemWatcher_ModifyFiltersConcurrentWithEvents()
- {
- DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath());
- FileInfo fileOne = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
- FileInfo fileTwo = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
- FileInfo fileThree = new FileInfo(Path.Combine(directory.FullName, GetTestFileName()));
-
- using (var watcher = new FileSystemWatcher(directory.FullName))
- {
- watcher.Filters.Add(fileOne.Name);
- watcher.Filters.Add(fileTwo.Name);
-
- var cts = new CancellationTokenSource();
- Task modifier = Task.Run(() =>
- {
- string otherFilter = Guid.NewGuid().ToString("N");
- while (!cts.IsCancellationRequested)
- {
- watcher.Filters.Add(otherFilter);
- watcher.Filters.RemoveAt(2);
- }
- });
-
- ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileOne.Create().Dispose(), cleanup: null, expectedPath: fileOne.FullName);
- ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileTwo.Create().Dispose(), cleanup: null, expectedPath: fileTwo.FullName);
- ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => fileThree.Create().Dispose(), cleanup: null, expectedPath: fileThree.FullName);
-
- cts.Cancel();
- modifier.Wait();
- }
- }
- }
-}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{20411A66-C7A4-4941-8FA2-66308365FD22}</ProjectGuid>
- <Configurations>netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Linux-Debug;netstandard-Linux-Release;netstandard-OSX-Debug;netstandard-OSX-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="FileSystemWatcher.cs" />
<Compile Include="FileSystemWatcher.MultipleWatchers.cs" />
<Compile Include="FileSystemWatcher.WaitForChanged.cs" />
<Compile Include="FileSystemWatcher.unit.cs" />
- <Compile Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap'" Include="FileSystemWatcher.unit.netcoreapp.cs" />
<!-- Helpers -->
- <Compile Include="Utility\TestFileSystemWatcher.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap'" Include="Utility\FileSystemWatcherTest.netcoreapp.cs" />
- <Compile Condition="'$(TargetGroup)' != 'netcoreapp' and '$(TargetGroup)' != 'uap'" Include="Utility\FileSystemWatcherTest.netstandard.cs" />
+ <Compile Include="Utility\TestFileSystemWatcher.cs" />
<Compile Include="Utility\FileSystemWatcherTest.cs" />
<Compile Include="$(CommonTestPath)\System\IO\TempFile.cs">
<Link>Common\System\IO\TempFile.cs</Link>
NotifyFilters.LastAccess |
NotifyFilters.LastWrite |
NotifyFilters.Size;
+
+ private static FileSystemWatcher RecreateWatcher(FileSystemWatcher watcher)
+ {
+ FileSystemWatcher newWatcher = new FileSystemWatcher()
+ {
+ IncludeSubdirectories = watcher.IncludeSubdirectories,
+ NotifyFilter = watcher.NotifyFilter,
+ Path = watcher.Path,
+ InternalBufferSize = watcher.InternalBufferSize
+ };
+
+ foreach (string filter in watcher.Filters)
+ {
+ newWatcher.Filters.Add(filter);
+ }
+
+ return newWatcher;
+ }
}
}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Collections.Generic;
-using Xunit;
-
-namespace System.IO.Tests
-{
- public abstract partial class FileSystemWatcherTest : FileCleanupTestBase
- {
- private static FileSystemWatcher RecreateWatcher(FileSystemWatcher watcher)
- {
- FileSystemWatcher newWatcher = new FileSystemWatcher()
- {
- IncludeSubdirectories = watcher.IncludeSubdirectories,
- NotifyFilter = watcher.NotifyFilter,
- Path = watcher.Path,
- InternalBufferSize = watcher.InternalBufferSize
- };
-
- foreach (string filter in watcher.Filters)
- {
- newWatcher.Filters.Add(filter);
- }
-
- return newWatcher;
- }
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.IO.Tests
-{
- public abstract partial class FileSystemWatcherTest : FileCleanupTestBase
- {
- private static FileSystemWatcher RecreateWatcher(FileSystemWatcher watcher)
- {
- var newWatcher = new FileSystemWatcher()
- {
- IncludeSubdirectories = watcher.IncludeSubdirectories,
- NotifyFilter = watcher.NotifyFilter,
- Filter = watcher.Filter,
- Path = watcher.Path,
- InternalBufferSize = watcher.InternalBufferSize
- };
-
- return newWatcher;
- }
- }
-}
InlineData(":bar"),
InlineData(":bar:$DATA")]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void GettingAndSettingAttributes_AlternateDataStream_Windows(string streamName)
{
string path = CreateItem();
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard-Unix;
- netstandard-Windows_NT;
netcoreapp-Unix;
netcoreapp-Windows_NT;
uap-Windows_NT;
string subdir = Path.GetRandomFileName();
string fullPath = Path.Combine(TestDirectory, subdir);
DirectoryInfo info = Create(fullPath);
- if (PlatformDetection.IsFullFramework && IsDirectoryCreate)
- {
- // I think this was accidental. In Core we want to be consistent with constructing
- // an Info manually then calling Create on it.
- Assert.Equal(subdir, info.ToString());
- }
- else
- {
- Assert.Equal(fullPath, info.ToString());
- }
+ Assert.Equal(fullPath, info.ToString());
}
[Fact]
}
[Theory, MemberData(nameof(PathsWithInvalidCharacters))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void PathWithInvalidCharactersAsPath_Desktop(string invalidPath)
- {
- Assert.Throws<ArgumentException>(() => Create(invalidPath));
- }
-
- [Theory, MemberData(nameof(PathsWithInvalidCharacters))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void PathWithInvalidCharactersAsPath_Core(string invalidPath)
{
if (invalidPath.Contains('\0'))
MemberData(nameof(PathsWithComponentLongerThanMaxComponent))]
public void DirectoryWithComponentLongerThanMaxComponentAsPath_ThrowsException(string path)
{
- // While paths themselves can be up to 260 characters including trailing null, file systems
- // limit each components of the path to a total of 255 characters on Desktop.
- if (PlatformDetection.IsFullFramework)
- {
- Assert.Throws<PathTooLongException>(() => Create(path));
- }
- else
- {
- AssertExtensions.ThrowsAny<IOException, DirectoryNotFoundException, PathTooLongException>(() => Create(path));
- }
+ AssertExtensions.ThrowsAny<IOException, DirectoryNotFoundException, PathTooLongException>(() => Create(path));
}
#endregion
[Theory, MemberData(nameof(PathsWithInvalidColons))]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void PathWithInvalidColons_Throws_Desktop(string invalidPath)
- {
- if (PathFeatures.IsUsingLegacyPathNormalization())
- {
- Assert.Throws<ArgumentException>(() => Create(invalidPath));
- }
- else
- {
- if (invalidPath.Contains('|'))
- Assert.Throws<ArgumentException>(() => Create(invalidPath));
- else
- Assert.Throws<NotSupportedException>(() => Create(invalidPath));
- }
- }
-
- [Theory, MemberData(nameof(PathsWithInvalidColons))]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void PathsWithInvalidColons_ThrowIOException_Core(string invalidPath)
{
// You can't actually create a directory with a colon in it. It was a preemptive
[ConditionalFact(nameof(AreAllLongPathsAvailable))]
[ActiveIssue(20117, TargetFrameworkMonikers.Uap)]
- [ActiveIssue(32167, TargetFrameworkMonikers.NetFramework)]
[PlatformSpecific(TestPlatforms.Windows)] // long directory path succeeds
public void DirectoryLongerThanMaxPath_Succeeds()
{
{
var paths = IOInputs.GetPathsLongerThanMaxLongPath(GetTestFilePath(), useExtendedSyntax: true);
- // Long directory path with extended syntax throws PathTooLongException on Desktop.
- // Everywhere else, it may be either PathTooLongException or DirectoryNotFoundException
- if (PlatformDetection.IsFullFramework)
- {
- Assert.All(paths, path => { Assert.Throws<PathTooLongException>(() => Create(path)); });
- }
- else
- {
- Assert.All(paths,
- path =>
- {
- AssertExtensions
- .ThrowsAny<PathTooLongException, DirectoryNotFoundException>(
- () => Create(path));
- });
- }
+ Assert.All(paths, path =>
+ AssertExtensions.ThrowsAny<PathTooLongException, DirectoryNotFoundException>(() => Create(path)));
}
[ConditionalFact(nameof(LongPathsAreNotBlocked), nameof(UsingNewNormalization))]
[ConditionalFact(nameof(AreAllLongPathsAvailable))]
[ActiveIssue(20117, TargetFrameworkMonikers.Uap)]
- [ActiveIssue(32167, TargetFrameworkMonikers.NetFramework)]
[PlatformSpecific(TestPlatforms.Windows)] // long directory path succeeds
public void DirectoryLongerThanMaxDirectoryAsPath_Succeeds()
{
[Theory,
MemberData(nameof(ControlWhiteSpace))]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void WindowsControlWhiteSpaceAsPath_ThrowsArgumentException_Desktop(string path)
- {
- Assert.Throws<ArgumentException>(() => Create(path));
- }
-
- [Theory,
- MemberData(nameof(ControlWhiteSpace))]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsWhiteSpaceAsPath_ThrowsIOException_Core(string path)
{
Assert.Throws<IOException>(() => Create(path));
}
[Theory,
- MemberData(nameof(ControlWhiteSpace))]
- [PlatformSpecific(TestPlatforms.Windows)] // trailing whitespace in path is removed on Windows
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] // e.g. NetFX only
- public void TrailingWhiteSpace_Trimmed(string component)
- {
- // On desktop, we trim a number of whitespace characters
- DirectoryInfo testDir = Create(GetTestFilePath());
- string path = IOServices.RemoveTrailingSlash(testDir.FullName) + component;
- DirectoryInfo result = Create(path);
-
- Assert.True(Directory.Exists(result.FullName));
- Assert.Equal(testDir.FullName, IOServices.RemoveTrailingSlash(result.FullName));
- }
-
- [Theory,
MemberData(nameof(NonControlWhiteSpace))]
[PlatformSpecific(TestPlatforms.Windows)] // trailing whitespace in path is removed on Windows
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Not NetFX
public void TrailingWhiteSpace_NotTrimmed(string component)
{
// In CoreFX we don't trim anything other than space (' ')
[Theory,
MemberData(nameof(SimpleWhiteSpace))] //*Just Spaces*
[PlatformSpecific(TestPlatforms.Windows)] // trailing whitespace in path is removed on Windows
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Not NetFX
public void TrailingSpace_NotTrimmed(string component)
{
DirectoryInfo testDir = Create(GetTestFilePath());
[Theory,
MemberData(nameof(PathsWithColons))]
[PlatformSpecific(TestPlatforms.Windows)] // alternate data streams
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void PathWithColons_ThrowsNotSupportedException_Desktop(string path)
- {
- Assert.Throws<NotSupportedException>(() => Create(path));
- }
-
- [Theory,
- MemberData(nameof(PathsWithColons))]
- [PlatformSpecific(TestPlatforms.Windows)] // alternate data streams
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void PathWithColons_ThrowsIOException_Core(string path)
{
if (PlatformDetection.IsInAppContainer)
[Theory,
MemberData(nameof(UncPathsWithoutShareName))]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void UncPathWithoutShareNameAsPath_ThrowsArgumentException_Desktop(string path)
- {
- Assert.Throws<ArgumentException>(() => Create(path));
- }
-
- [Theory,
- MemberData(nameof(UncPathsWithoutShareName))]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void UncPathWithoutShareNameAsPath_ThrowsIOException_Core(string path)
{
Assert.ThrowsAny<IOException>(() => Create(path));
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void UNCPathWithOnlySlashes_Desktop()
- {
- Assert.Throws<ArgumentException>(() => Create("//"));
- }
-
- [Fact]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void UNCPathWithOnlySlashes_Core()
{
Assert.ThrowsAny<IOException>(() => Create("//"));
[ActiveIssue(24242)]
[PlatformSpecific(TestPlatforms.Windows)]
[OuterLoop("This test is very slow.")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop does not have the fix for #22596")]
public void RecursiveDelete_DeepNesting()
{
// Create a 2000 level deep directory and recursively delete from the root.
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void EnumerateDirectories_NonBreakingSpace()
{
DirectoryInfo rootDirectory = Directory.CreateDirectory(GetTestFilePath());
}
[Theory,
- MemberData(nameof(ControlWhiteSpace))]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] // e.g. NetFX only
- public void ControlWhiteSpaceExists(string component)
- {
- DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath());
-
- string path = testDir.FullName + component;
- Assert.True(Exists(path), "directory with control whitespace should exist");
- }
-
- [Theory,
MemberData(nameof(NonControlWhiteSpace))]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // not NetFX
public void NonControlWhiteSpaceExists(string component)
{
DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath() + component);
#region PlatformSpecific
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void InvalidPath_Desktop()
- {
- foreach (char invalid in Path.GetInvalidFileNameChars())
- {
- string badPath = string.Format($"{TestDirectory}{Path.DirectorySeparatorChar}te{invalid}st");
- switch (invalid)
- {
- case '/':
- case '\\':
- Assert.Throws<DirectoryNotFoundException>(() => GetEntries(badPath));
- break;
- case ':':
- Assert.Throws<NotSupportedException>(() => GetEntries(badPath));
- break;
- case '\0':
- Assert.Throws<ArgumentException>(() => GetEntries(badPath));
- break;
- default:
- Assert.Throws<ArgumentException>(() => GetEntries(badPath));
- break;
- }
- }
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void InvalidPath_Core()
{
foreach (char invalid in Path.GetInvalidFileNameChars())
InlineData("<"),
InlineData("\t")]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void WindowsInvalidCharsPath_Desktop(string invalid)
- {
- Assert.Throws<ArgumentException>(() => GetEntries(invalid));
- }
-
- [Theory,
- InlineData("\n"),
- InlineData(">"),
- InlineData("<"),
- InlineData("\t")]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsInvalidCharsPath_Core(string invalid)
{
Assert.Throws<IOException>(() => GetEntries(invalid));
ValidatePatternMatch(expected, GetEntries(testDir, pattern));
}
- [OuterLoop("These are pretty corner, don't need to run all the time.")]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- // Can't do these without extended path support on Windows, UsingNewNormalization filters appropriately
- [ConditionalTheory(nameof(UsingNewNormalization)),
- // "foo*." actually becomes "foo<" when passed to NT. It matches all characters up to, and including, the final period.
- //
- // There is a "bug" somewhere in the Windows stack where *some* files with trailing spaces after the final period will be returned when
- // using "*." at the end of a string (which becomes "<"). According to the rules (and the actual pattern matcher used FsRtlIsNameInExpression)
- // *nothing* should match after the final period.
- //
- // The results as passed to RtlIsNameInExpression (after changing *. to <) are in comments.
- InlineData(
- "foo*.",
- new string[] { @"foo", @"foo.", @"foo.t", @"foo.tx", @"foo.txt", @"bar.txt", @"foo..", @"foo...", @"foo. ", @"foo. ", @"foo .", @"foo. . .", @"foo. t" },
- // Really should be: new string[] { @"foo", @"foo.", @"foo..", @"foo...", @"foo .", @"foo. . ." }), but is
- new string[] { @"foo", @"foo .", @"foo.", @"foo..", @"foo...", @"foo. ", @"foo. . ." }),
- InlineData(
- "*.",
- new string[] { @"foo. ", @"foo. ", @"foo..", @"foo. t" },
- // Really should be: new string[] { @"foo.." }), but is
- new string[] { @"foo. ", @"foo. ", @"foo.." }),
- InlineData(
- "f*.",
- new string[] { @"foo. ", @"foo. ", @"foo..", @"foo. t" },
- // Really should be: new string[] { @"foo.." }), but is
- new string[] { @"foo. ", @"foo. ", @"foo.." }),
- InlineData(
- "fo*.",
- new string[] { @"foo. ", @"foo. ", @"foo..", @"foo. t" },
- // Really should be: new string[] { @"foo.." }), but is
- new string[] { @"foo. ", @"foo. ", @"foo.." }),
- InlineData(
- "foo*.",
- new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. " },
- // Really should be: new string[] { }), but is
- new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. " }),
- InlineData(
- "foo*.",
- new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo." },
- // Really should be: new string[] { @"foo." }), but is
- new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo." }),
- InlineData(
- "foo*.",
- new string[] { @"foo.", @"foo. ", @"foo. ", @"foo. ", @"foo. " },
- // Really should be: new string[] { @"foo." }), but is
- new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo." }),
- InlineData(
- "foo*.",
- new string[] { @"foo.", @"foo", @"foo. ", @"foo. ", @"foo. ", @"foo. " },
- // Really should be: new string[] { @"foo.", @"foo" }), but is
- new string[] { @"foo.", @"foo", @"foo. ", @"foo. ", @"foo. " }),
- InlineData(
- "foo*.",
- new string[] { @"foo.", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo" },
- // Really should be: new string[] { @"foo.", @"foo" }), but is
- new string[] { @"foo.", @"foo", @"foo. ", @"foo. ", @"foo. " }),
- InlineData(
- "foo*.",
- new string[] { @"foo. ", @"foo", @"foo.", @"foo. ", @"foo. ", @"foo. " },
- // Really should be: new string[] { @"foo.", @"foo" }), but is
- new string[] { @"foo.", @"foo", @"foo. ", @"foo. ", @"foo. " }),
- InlineData(
- "foo*.",
- new string[] { @"foo. ", @"foo", @"food", @"foo.", @"foo. ", @"foo. ", @"foo. " },
- // Really should be: new string[] { @"foo.", @"foo", @"food" }), but is
- new string[] { @"foo.", @"foo", @"foo. ", @"foo. ", @"foo. ", @"food" }),
- InlineData(
- "fo*.",
- new string[] { @"foo.", @"foo. ", @"foo. ", @"foo. ", @"foo. " },
- // Really should be: new string[] { @"foo." }), but is
- new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo.", @"foo. " }),
- InlineData(
- "foo*.",
- new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " },
- // Really should be: new string[] { }), but is
- new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. " }),
- InlineData(
- "foo*.",
- new string[] { @"foo. ", @"foo. .", @"foo. . ", @"foo. . .", @"foo. . . " },
- // Really should be: new string[] { @"foo. .", @"foo. . ." }), but is
- new string[] { @"foo. ", @"foo. .", @"foo. . ", @"foo. . ." }),
- InlineData(
- "foo*.",
- new string[] { @"foo. ", @"foo. .", @"foo.. .", @"foo.... .", @"foo..... ." },
- // Really should be: new string[] { @"foo. .", @"foo.. .", @"foo.... .", @"foo..... ." }), but is
- new string[] { @"foo. ", @"foo. .", @"foo.. .", @"foo.... .", @"foo..... ." }),
- InlineData(
- "fo*.",
- new string[] { @"foo. ", @"foo. .", @"foo. . ", @"foo. . .", @"foo. . . " },
- // Really should be: new string[] { @"foo. .", @"foo. . ."}), but is
- new string[] { @"foo. ", @"foo. .", @"foo. . ", @"foo. . .", @"foo. . . " }),
- InlineData(
- "foo*.",
- new string[] { @"foo.", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " },
- // Really should be: new string[] { @"foo." }), but is
- new string[] { @"foo.", @"foo. ", @"foo. ", @"foo. " }),
- InlineData(
- "food*.",
- new string[] { @"food.", @"food. ", @"food. ", @"food. ", @"food. ", @"food. " },
- // Really should be: new string[] { @"food." }), but is
- new string[] { @"food.", @"food. ", @"food. ", @"food. " }),
- InlineData(
- "food*.",
- new string[] { @"food.", @"food. ", @"food. ", @"food. ", @"food. ", @"food. ", @"foodi." },
- // Really should be: new string[] { @"food.", @"foodi." }), but is
- new string[] { @"food.", @"food. ", @"food. ", @"food. ", @"foodi." }),
- InlineData(
- "foodi*.",
- new string[] { @"foodi.", @"foodi. ", @"foodi. ", @"foodi. ", @"foodi. ", @"foodi. " },
- // Really should be: new string[] { @"foodi." }), but is
- new string[] { @"foodi.", @"foodi. ", @"foodi. ", @"foodi. " }),
- InlineData(
- "foodie*.",
- new string[] { @"foodie.", @"foodie. ", @"foodie. ", @"foodie. ", @"foodie. ", @"foodie. " },
- // Really should be: new string[] { @"foodie." }), but is
- new string[] { @"foodie.", @"foodie. ", @"foodie. ", @"foodie. " }),
- InlineData(
- "fooooo*.",
- new string[] { @"foooooo.", @"foooooo. ", @"foooooo. " },
- // Really should be: new string[] { @"foooooo." }), but is
- new string[] { @"foooooo.", @"foooooo. ", @"foooooo. " }),
- InlineData(
- "fooooo*.",
- new string[] { @"foooooo. ", @"foooooo. ", @"foooooo. " },
- // Really should be: new string[] { }), but is
- new string[] { @"foooooo. ", @"foooooo. ", @"foooooo. " }),
- InlineData(
- "fo*.",
- new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " },
- // Really should be: new string[] { }), but is
- new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " }),
- InlineData(
- "fo*.",
- new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " },
- // Really should be: new string[] { }), but is
- new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " }),
- InlineData(
- "fo*.",
- new string[] { @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " },
- // Really should be: new string[] { }), but is
- new string[] { @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " }),
- InlineData(
- "fo*.",
- new string[] { @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " },
- // Really should be: new string[] { }), but is
- new string[] { @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " }),
- InlineData(
- "foo*.",
- new string[] { @"foo. ", @"foo. ", @"foo..", @"foo. t", @"foo. ", @"foo. " },
- // Really should be: new string[] { @"foo.." }), but is
- new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo.." }),
- ]
- public void PatternTests_DosStarOddSpace_Desktop(string pattern, string[] sourceFiles, string[] expected)
- {
- // Tests for DOS_STAR, which only occurs when the source pattern ends in *.
- // These cases don't match documented behavior on Windows- matching *should* end at the final period.
-
- // We don't want to eat trailing space/periods in this test
- string testDir = PrepareDirectory(sourceFiles, useExtendedPaths: true);
- ValidatePatternMatch(expected, GetEntries(testDir, pattern));
- }
-
[ActiveIssue(20781, TestPlatforms.AnyUnix)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[OuterLoop("These are pretty corner, don't need to run all the time.")]
[Theory,
// "foo*." actually becomes "foo<" when passed to NT. It matches all characters up to, and including, the final period.
DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath());
string longName = new string('k', 257);
- // Long path segment in search pattern throws PathTooLongException on Desktop
- if (PlatformDetection.IsFullFramework)
- {
- Assert.Throws<PathTooLongException>(() => GetEntries(testDir.FullName, longName));
- }
- else
- {
- GetEntries(testDir.FullName, longName);
- }
+ GetEntries(testDir.FullName, longName);
}
[ConditionalFact(nameof(AreAllLongPathsAvailable))]
- [ActiveIssue(32167, TargetFrameworkMonikers.NetFramework)]
public void SearchPatternLongPath()
{
// Create a destination path longer than the traditional Windows limit of 256 characters
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void WindowsSearchPatternWithDoubleDots_Desktop()
- {
- // Search pattern with double dots throws ArgumentException
- Assert.Throws<ArgumentException>(() => GetEntries(TestDirectory, Path.Combine("..ab ab.. .. abc..d", "abc..")));
- Assert.Throws<ArgumentException>(() => GetEntries(TestDirectory, ".."));
- Assert.Throws<ArgumentException>(() => GetEntries(TestDirectory, @".." + Path.DirectorySeparatorChar));
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void SearchPatternWithDoubleDots_Core()
{
// Search pattern with double dots no longer throws ArgumentException
private static char[] NewWildcards = new char[] { '<', '>', '\"' };
[Fact]
- [PlatformSpecific(TestPlatforms.Windows)] // Windows-invalid search patterns throw
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void WindowsSearchPatternInvalid_Desktop()
- {
- Assert.Throws<ArgumentException>(() => GetEntries(TestDirectory, "\0"));
- Assert.Throws<ArgumentException>(() => GetEntries(TestDirectory, "|"));
-
- Assert.All(Path.GetInvalidFileNameChars().Except(OldWildcards).Except(NewWildcards), invalidChar =>
- {
- switch (invalidChar)
- {
- case '\\':
- case '/':
- Assert.Throws<DirectoryNotFoundException>(() => GetEntries(Directory.GetCurrentDirectory(), string.Format("te{0}st", invalidChar.ToString())));
- break;
- //We don't throw in V1 too
- case ':':
- //History:
- // 1) we assumed that this will work in all non-9x machine
- // 2) Then only in XP
- // 3) NTFS?
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) &&
- FileSystemDebugInfo.IsCurrentDriveNTFS()) // testing NTFS
- {
- Assert.Throws<IOException>(() => GetEntries(Directory.GetCurrentDirectory(), string.Format("te{0}st", invalidChar.ToString())));
- }
- else
- {
- GetEntries(Directory.GetCurrentDirectory(), string.Format("te{0}st", invalidChar.ToString()));
- }
- break;
- default:
- Assert.Throws<ArgumentException>(() => GetEntries(Directory.GetCurrentDirectory(), string.Format("te{0}st", invalidChar.ToString())));
- break;
- }
- });
- }
-
- [Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsSearchPatternInvalid_Core()
{
GetEntries(TestDirectory, "\0");
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Windows-invalid search patterns throw
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "In netcoreapp we made three new characters be treated as valid wildcards instead of invalid characters. NetFX still treats them as InvalidChars.")]
public void WindowsSearchPatternInvalid_Wildcards_netcoreapp()
{
Assert.All(OldWildcards, invalidChar =>
}
[Fact]
- [PlatformSpecific(TestPlatforms.Windows)] // Windows-invalid search patterns throw
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "In netcoreapp we made three new characters be treated as valid wildcards instead of invalid characters. NetFX still treats them as InvalidChars.")]
- public void WindowsSearchPatternInvalid_Wildcards_netfx()
- {
- Assert.All(OldWildcards, invalidChar =>
- {
- GetEntries(Directory.GetCurrentDirectory(), string.Format("te{0}st", invalidChar.ToString()));
- });
- Assert.All(NewWildcards, invalidChar =>
- {
- Assert.Throws<ArgumentException>(() => GetEntries(Directory.GetCurrentDirectory(), string.Format("te{0}st", invalidChar.ToString())));
- });
- }
-
- [Fact]
[PlatformSpecific(TestPlatforms.AnyUnix)] // Unix-invalid search patterns throws no exception
public void UnixSearchPatternInvalid()
{
}
[ConditionalFact(nameof(AreAllLongPathsAvailable))]
- [ActiveIssue(32167, TargetFrameworkMonikers.NetFramework)]
public void EnumerateFilesOverLegacyMaxPath()
{
// We want to test that directories under the legacy MAX_PATH (260 characters, including the null) can iterate files
}
[ConditionalFact(nameof(AreAllLongPathsAvailable))]
- [ActiveIssue(32167, TargetFrameworkMonikers.NetFramework)]
public void EnumerateFilesDirectoryOverLegacyMaxPath()
{
// Check enumerating when the entire path is over MAX_PATH
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void WindowsWildCharacterPath_Desktop()
- {
- Assert.Throws<ArgumentException>(() => Move("*", GetTestFilePath()));
- Assert.Throws<ArgumentException>(() => Move(TestDirectory, "*"));
- Assert.Throws<ArgumentException>(() => Move(TestDirectory, "Test*t"));
- Assert.Throws<ArgumentException>(() => Move(TestDirectory, "*Test"));
- }
-
- [Fact]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsWildCharacterPath_Core()
{
Assert.ThrowsAny<IOException>(() => Move(Path.Combine(TestDirectory, "*"), GetTestFilePath()));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void SubdirectoryOverlappingName_ThrowsArgumentException()
{
// What we're looking for here is trying to create C:\FooBar under C:\Foo by passing "..\FooBar"
[Theory,
MemberData(nameof(ControlWhiteSpace))]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void WindowsControlWhiteSpace_Desktop(string component)
- {
- Assert.Throws<ArgumentException>(() => new DirectoryInfo(TestDirectory).CreateSubdirectory(component));
- }
-
- [Theory,
- MemberData(nameof(ControlWhiteSpace))]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsControlWhiteSpace_Core(string component)
{
Assert.Throws<IOException>(() => new DirectoryInfo(TestDirectory).CreateSubdirectory(component));
[Theory,
MemberData(nameof(SimpleWhiteSpace))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[PlatformSpecific(TestPlatforms.Windows)]
public void WindowsSimpleWhiteSpaceThrowsException(string component)
{
}
[Theory,
- MemberData(nameof(SimpleWhiteSpace))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] // Simple whitespace is trimmed in path
- public void WindowsSimpleWhiteSpace(string component)
- {
- DirectoryInfo result = new DirectoryInfo(TestDirectory).CreateSubdirectory(component);
-
- Assert.True(Directory.Exists(result.FullName));
- Assert.Equal(TestDirectory, IOServices.RemoveTrailingSlash(result.FullName));
- }
-
- [Theory,
MemberData(nameof(WhiteSpace))]
[PlatformSpecific(TestPlatforms.AnyUnix)] // Whitespace as path allowed
public void UnixWhiteSpaceAsPath_Allowed(string path)
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void ParentDirectoryNameAsPrefixShouldThrow()
{
string randomName = GetTestFileName();
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInAppContainer))] // Can't read root in appcontainer
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Different behavior on Desktop
[PlatformSpecific(TestPlatforms.Windows)] // Drive letter only
public void DriveOnlyReturnsDrive_Windows()
{
InlineData("<"),
InlineData("\t")]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void WindowsInvalidCharsPath_Desktop(string invalid)
- {
- string testFile = GetTestFilePath();
- File.Create(testFile).Dispose();
-
- Assert.Throws<ArgumentException>(() => Copy(testFile, invalid));
- Assert.Throws<ArgumentException>(() => Copy(invalid, testFile));
- }
-
- [Theory,
- InlineData("\n"),
- InlineData(">"),
- InlineData("<"),
- InlineData("\t")]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsInvalidCharsPath_Core(string invalid)
{
string testFile = GetTestFilePath();
InlineData("::$DATA", ":bar"),
InlineData("::$DATA", ":bar:$DATA")]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsAlternateDataStream(string defaultStream, string alternateStream)
{
DirectoryInfo testDirectory = Directory.CreateDirectory(GetTestFilePath());
InlineData("::$DATA", ":bar"),
InlineData("::$DATA", ":bar:$DATA")]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsAlternateDataStreamOverwrite(string defaultStream, string alternateStream)
{
DirectoryInfo testDirectory = Directory.CreateDirectory(GetTestFilePath());
{
DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath());
- // Long path should throw PathTooLongException on Desktop and IOException
- // elsewhere.
- if (PlatformDetection.IsFullFramework)
- {
- Assert.Throws<PathTooLongException>(
- () => Create(Path.Combine(testDir.FullName, new string('a', 300))));
- }
- else
- {
- AssertExtensions.ThrowsAny<IOException, DirectoryNotFoundException, PathTooLongException>(
- () => Create(Path.Combine(testDir.FullName, new string('a', 300))));
- }
+ AssertExtensions.ThrowsAny<IOException, DirectoryNotFoundException, PathTooLongException>(() =>
+ Create(Path.Combine(testDir.FullName, new string('a', 300))));
}
#endregion
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void WindowsWildCharacterPath_Desktop()
- {
- DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath());
- Assert.Throws<ArgumentException>(() => Create(Path.Combine(testDir.FullName, "dls;d", "442349-0", "v443094(*)(+*$#$*", new string(Path.DirectorySeparatorChar, 3))));
- Assert.Throws<ArgumentException>(() => Create(Path.Combine(testDir.FullName, "*")));
- Assert.Throws<ArgumentException>(() => Create(Path.Combine(testDir.FullName, "Test*t")));
- Assert.Throws<ArgumentException>(() => Create(Path.Combine(testDir.FullName, "*Tes*t")));
- }
-
- [Fact]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsWildCharacterPath_Core()
{
DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath());
InlineData("<"),
InlineData("\t")]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void WindowsInvalidPath_Desktop(string path)
- {
- Assert.Throws<ArgumentException>(() => Create(path));
- }
-
- [Theory,
- InlineData("\n"),
- InlineData(">"),
- InlineData("<"),
- InlineData("\t")]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsInvalidPath_Core(string path)
{
Assert.ThrowsAny<IOException>(() => Create(Path.Combine(TestDirectory, path)));
InlineData(":bar:$DATA"),
InlineData("::$DATA")]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsAlternateDataStream(string streamName)
{
DirectoryInfo testDirectory = Directory.CreateDirectory(GetTestFilePath());
InlineData(":bar"),
InlineData(":bar:$DATA")]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsAlternateDataStream_OnExisting(string streamName)
{
DirectoryInfo testDirectory = Directory.CreateDirectory(GetTestFilePath());
InlineData(":bar"),
InlineData(":bar:$DATA")]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsDeleteAlternateDataStream(string streamName)
{
FileInfo testFile = Create(GetTestFilePath());
AssertExtensions.Throws<ArgumentNullException>("path", () => File.Decrypt(null));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[SkipOnTargetFramework(TargetFrameworkMonikers.Netcoreapp)]
[Fact]
public static void EncryptDecrypt_NotSupported()
}
[Theory,
- MemberData(nameof(ControlWhiteSpace))]
- [PlatformSpecific(TestPlatforms.Windows)] // In Windows, trailing whitespace in a path is trimmed
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] // e.g. NetFX only
- public void TrailingWhiteSpace_Trimmed(string component)
- {
- // On desktop, we trim a number of whitespace characters
- FileInfo testFile = new FileInfo(GetTestFilePath());
- testFile.Create().Dispose();
-
- // Exists calls GetFullPath() which trims trailing white space
- Assert.True(Exists(testFile.FullName + component));
- }
-
- [Theory,
MemberData(nameof(NonControlWhiteSpace))]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Not NetFX
public void TrailingWhiteSpace_NotTrimmed(string component)
{
// In CoreFX we don't trim anything other than space (' ')
InlineData(":bar"),
InlineData(":bar:$DATA")]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void GetAttributes_MissingAlternateDataStream_Windows(string streamName)
{
string path = CreateItem();
}
[Theory, MemberData(nameof(PathsWithInvalidCharacters))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void PathWithIllegalCharacters_Desktop(string invalidPath)
- {
- FileInfo testFile = new FileInfo(GetTestFilePath());
- testFile.Create().Dispose();
-
- Assert.Throws<ArgumentException>(() => Move(testFile.FullName, invalidPath));
- }
-
- [Theory, MemberData(nameof(PathsWithInvalidCharacters))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void PathWithIllegalCharacters_Core(string invalidPath)
{
FileInfo testFile = new FileInfo(GetTestFilePath());
}
[ConditionalFact(nameof(AreAllLongPathsAvailable))]
- [ActiveIssue(32167, TargetFrameworkMonikers.NetFramework)]
[PlatformSpecific(TestPlatforms.Windows)] // Path longer than max path limit
public void OverMaxPathWorks_Windows()
{
[Theory, MemberData(nameof(PathsWithInvalidColons))]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void WindowsPathWithIllegalColons_Desktop(string invalidPath)
- {
- FileInfo testFile = new FileInfo(GetTestFilePath());
- testFile.Create().Dispose();
- if (PathFeatures.IsUsingLegacyPathNormalization())
- {
- Assert.Throws<ArgumentException>(() => Move(testFile.FullName, invalidPath));
- }
- else
- {
- if (invalidPath.Contains('|'))
- Assert.Throws<ArgumentException>(() => Move(testFile.FullName, invalidPath));
- else
- Assert.Throws<NotSupportedException>(() => Move(testFile.FullName, invalidPath));
- }
- }
-
- [Theory, MemberData(nameof(PathsWithInvalidColons))]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsPathWithIllegalColons_Core(string invalidPath)
{
FileInfo testFile = new FileInfo(GetTestFilePath());
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void WindowsWildCharacterPath_Desktop()
- {
- Assert.Throws<ArgumentException>(() => Move("*", GetTestFilePath()));
- Assert.Throws<ArgumentException>(() => Move(GetTestFilePath(), "*"));
- Assert.Throws<ArgumentException>(() => Move(GetTestFilePath(), "Test*t"));
- Assert.Throws<ArgumentException>(() => Move(GetTestFilePath(), "*Test"));
- }
-
- [Fact]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsWildCharacterPath_Core()
{
Assert.Throws<FileNotFoundException>(() => Move(Path.Combine(TestDirectory, "*"), GetTestFilePath()));
[Theory,
MemberData(nameof(ControlWhiteSpace))]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void WindowsControlPath_Desktop(string whitespace)
- {
- FileInfo testFile = new FileInfo(GetTestFilePath());
- Assert.Throws<ArgumentException>(() => Move(testFile.FullName, whitespace));
- }
-
- [Theory,
- MemberData(nameof(ControlWhiteSpace))]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsControlPath_Core(string whitespace)
{
FileInfo testFile = new FileInfo(GetTestFilePath());
InlineData("::$DATA", ":bar"),
InlineData("::$DATA", ":bar:$DATA")]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void WindowsAlternateDataStreamMove(string defaultStream, string alternateStream)
{
DirectoryInfo testDirectory = Directory.CreateDirectory(GetTestFilePath());
}
[Theory, MemberData(nameof(StreamSpecifiers))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "FileInfo.Open(string, filemode) on netfx always uses FileAccess.ReadWrite instead of choosing a FileAccess based on the FileMode. This bug was fixed in netcoreapp.")]
public override void FileModeAppend(string streamSpecifier)
{
using (FileStream fs = CreateFileStream(GetTestFilePath() + streamSpecifier, FileMode.Append))
}
[Theory, MemberData(nameof(StreamSpecifiers))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "FileInfo.Open(string, filemode) on netfx always uses FileAccess.ReadWrite instead of choosing a FileAccess based on the FileMode. This bug was fixed in netcoreapp.")]
public override void FileModeAppendExisting(string streamSpecifier)
{
string fileName = GetTestFilePath() + streamSpecifier;
[Theory]
[InlineData(false)]
[InlineData(true)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The Stream CopyToAsync fails on netcoreapp because it calls Length which checks the validity of the underlying handle. On NetFX the operation no-ops for no input or delays failure to execution for input. See /dotnet/coreclr/pull/4540.")]
public void DisposeHandleThenUseFileStream_CopyToAsync(bool useAsync)
{
using (FileStream fs = new FileStream(GetTestFilePath(), FileMode.Create, FileAccess.ReadWrite, FileShare.None, 0x100, useAsync))
[Theory]
[InlineData(false)]
[InlineData(true)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "The Stream CopyToAsync fails on netcoreapp because it calls Length which checks the validity of the underlying handle. On NetFX the operation no-ops for no input or delays failure to execution for input. See /dotnet/coreclr/pull/4540.")]
- public void DisposeHandleThenUseFileStream_CopyToAsync_netfx(bool useAsync)
- {
- using (FileStream fs = new FileStream(GetTestFilePath(), FileMode.Create, FileAccess.ReadWrite, FileShare.None, 0x100, useAsync))
- {
- fs.SafeFileHandle.Dispose();
- fs.CopyToAsync(new MemoryStream());
- }
-
- using (FileStream fs = new FileStream(GetTestFilePath(), FileMode.Create, FileAccess.ReadWrite, FileShare.None, 0x100, useAsync))
- {
- fs.Write(TestBuffer, 0, TestBuffer.Length);
- fs.SafeFileHandle.Dispose();
- try
- {
- fs.CopyToAsync(new MemoryStream()).Wait();
- }
- catch (AggregateException e)
- {
- Assert.Equal(typeof(ObjectDisposedException), e.InnerException.GetType());
- }
- }
- }
-
- [Theory]
- [InlineData(false)]
- [InlineData(true)]
public async Task AlreadyCanceled_ReturnsCanceledTask(bool useAsync)
{
using (FileStream fs = new FileStream(GetTestFilePath(), FileMode.Create, FileAccess.ReadWrite, FileShare.None, 0x100, useAsync))
[Theory]
[InlineData(false, 10, 1024)]
[InlineData(true, 10, 1024)]
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public async Task NamedPipeViaFileStream_AllDataCopied(bool useAsync, int writeSize, int numWrites)
{
long totalLength = writeSize * numWrites;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Missing fix for https://github.com/dotnet/coreclr/pull/16250")]
public void NoDispose_CallsVirtualDisposeFalseArg_ThrowsDuringFlushWriteBuffer_FinalizerWontThrow()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetFX defaults useAsync to false for the SafeFileHandle/FileAccess constructor which leads to an ArgumentException for an async handle. In netcoreapp this constructor was fixed to check the async status of the handle and use that for the useAsync value.")]
public void AsyncDiscoveredFromHandle()
{
using (FileStream fs = new FileStream(GetTestFilePath(), FileMode.Create, FileAccess.ReadWrite, FileShare.Read, 4096, true))
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "In netcoreapp we modified ReadAsync/WriteAsync to complete synchronously here, but that change was not backported to netfx.")]
public async Task ReadAsyncBufferedCompletesSynchronously()
{
string fileName = GetTestFilePath();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetFX doesn't allow concurrent FileStream access when using overlapped IO.")]
public async Task ThrowWhenHandlePositionIsChanged_async()
{
await ThrowWhenHandlePositionIsChanged(useAsync: true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "In netcoreapp we modified ReadAsync/WriteAsync to complete synchronously here, but that change was not backported to netfx.")]
public void WriteAsyncBufferedCompletesSynchronously()
{
using (FileStream fs = new FileStream(
}
[Fact]
- [ActiveIssue(20797, TargetFrameworkMonikers.NetFramework)]
[ActiveIssue(31909, TargetFrameworkMonikers.Uap)]
public void InvalidAccess_DoesNotCloseHandle()
{
public class DerivedFileStream_ctor_sfh_fa : FileSystemTest
{
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The NetFX FileStream Handle constructor calls the virtual Can*. This has been fixed in netcoreapp to instead directly check for write/read FileAccess.")]
public void VirtualCanReadWrite_ShouldNotBeCalledDuringCtor()
{
using (var fs = File.Create(GetTestFilePath()))
}
[Fact]
- [ActiveIssue(20797, TargetFrameworkMonikers.NetFramework)] // This fails on desktop
[ActiveIssue(31909, TargetFrameworkMonikers.Uap)]
public void InvalidBufferSize_DoesNotCloseHandle()
{
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetFX doesn't allow concurrent FileStream access when using overlapped IO.")]
public void MatchedAsync()
{
using (FileStream fs = new FileStream(GetTestFilePath(), FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite | FileShare.Delete, 4096, true))
<ProjectGuid>{F0D49126-6A1C-42D5-9428-4374C868BAF8}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Base\BaseGetSetAttributes.cs" />
<Link>Common\System\IO\PathFeatures.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uapaot' or '$(TargetGroup)' == 'uap'">
+ <ItemGroup Condition="'$(TargetGroup)' == 'uap'">
<Reference Include="mscorlib" />
<Reference Include="Windows" />
</ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard-Unix;
- netstandard-Windows_NT;
netcoreapp-Unix;
netcoreapp-Windows_NT;
uap-Windows_NT;
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{BF4F9507-8FBD-45EA-81C9-3ED89C052C91}</ProjectGuid>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<Compile Include="System\IO\IsolatedStorage\IdentityTests.cs" />
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class ContainsUnknownFilesTests : IsoStorageTest
{
private static MethodInfo s_containsUnknownFilesMethod
= typeof(IsolatedStorageFile).GetMethod("ContainsUnknownFiles", BindingFlags.NonPublic | BindingFlags.Instance);
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void ContainsUnknownFiles_CleanStore(PresetScopes scope)
{
TestHelper.WipeStores();
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void ContainsUnknownFiles_OkFiles(PresetScopes scope)
{
TestHelper.WipeStores();
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void ContainsUnknownFiles_NotOkFiles(PresetScopes scope)
{
TestHelper.WipeStores();
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void ContainsUnknownFiles_NotOkDirectory(PresetScopes scope)
{
TestHelper.WipeStores();
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class CopyFileTests : IsoStorageTest
{
[Fact]
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void CopyFile_RaisesInvalidPath()
- {
- using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
- {
- AssertExtensions.Throws<ArgumentException>("path", null, () => isf.CopyFile("\0bad", "bar"));
- AssertExtensions.Throws<ArgumentException>("path", null, () => isf.CopyFile("foo", "\0bad"));
- }
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void CopyFile_RaisesIsolatedStorageException()
{
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void CopyFile_CopyOver(PresetScopes scope)
{
TestHelper.WipeStores();
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void CopyFile_CopiesFile(PresetScopes scope)
{
TestHelper.WipeStores();
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class CreateDirectoryTests : IsoStorageTest
{
[Fact]
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void CreateDirectory_RaisesArgumentException()
- {
- using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
- {
- AssertExtensions.Throws<ArgumentException>("path", null, () => isf.CreateDirectory("\0bad"));
- }
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void CreateDirectory_IsolatedStorageException()
{
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)]
public void CreateDirectory_Existance(PresetScopes scope)
{
using (var isf = GetPresetScope(scope))
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class CreateFileTests : IsoStorageTest
{
[Fact]
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void CreateFile_RaisesArgumentException()
- {
- using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
- {
- AssertExtensions.Throws<ArgumentException>("path", null, () => isf.CreateFile("\0bad"));
- }
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void CreateFile_IsolatedStorageException()
{
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)]
public void CreateFile_Existence(PresetScopes scope)
{
using (var isf = GetPresetScope(scope))
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class DeleteDirectoryTests : IsoStorageTest
{
[Fact]
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void DeleteDirectory_DeletesDirectory(PresetScopes scope)
{
TestHelper.WipeStores();
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void DeleteDirectory_CannotDeleteWithContent(PresetScopes scope)
{
TestHelper.WipeStores();
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class DeleteFileTests : IsoStorageTest
{
[Fact]
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void DeleteFile_DeletesFile(PresetScopes scope)
{
TestHelper.WipeStores();
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class DirectoryExistsTests : IsoStorageTest
{
[Fact]
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void DirectoryExists_RaisesArgumentException()
- {
- using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
- {
- AssertExtensions.Throws<ArgumentException>("path", null, () => isf.DirectoryExists("\0bad"));
- }
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void DirectoryExists_False()
{
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
[Theory]
[MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)]
public void DirectoryExists_Existance(PresetScopes scope)
{
using (var isf = GetPresetScope(scope))
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class FileExistsTests : IsoStorageTest
{
[Fact]
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void FileExists_RaisesArgumentException()
- {
- using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
- {
- AssertExtensions.Throws<ArgumentException>("path", null, () => isf.FileExists("\0bad"));
- }
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void FileExists_False()
{
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
[Theory]
[MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)]
public void FileExists_Existance(PresetScopes scope)
{
using (var isf = GetPresetScope(scope))
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class GetCreationTimeTests : IsoStorageTest
{
[Fact]
[Fact]
[PlatformSpecific(TestPlatforms.Windows | TestPlatforms.OSX)] // Filesystem timestamps vary in granularity
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void GetCreationTime_GetsTime_Windows_OSX()
{
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class GetFileNamesTests : IsoStorageTest
{
[Fact]
- [ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)]
public void GetFileNames_ThrowsArgumentNull()
{
using (var isf = IsolatedStorageFile.GetUserStoreForApplication())
[Fact]
[ActiveIssue(25428, TestPlatforms.AnyUnix)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void GetFileNames_RaisesInvalidPath_Core()
{
// We are no longer as aggressive with filters for enumerating files
}
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void GetFileNames_RaisesInvalidPath_Desktop()
- {
- using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
- {
- AssertExtensions.Throws<ArgumentException>("path", null, () => isf.GetFileNames("\0bad"));
- }
- }
-
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void GetFileNames_GetsFileNames(PresetScopes scope)
{
TestHelper.WipeStores();
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class GetLastAccessTimeTests : IsoStorageTest
{
[Fact]
}
[Fact]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void GetLastAccessTime_GetsTime()
{
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class GetLastWriteTimeTests : IsoStorageTest
{
[Fact]
}
[Fact]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void GetLastWriteTime_GetsTime()
{
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class GetStoreTests : IsoStorageTest
{
private static MethodInfo s_verifyScopeMethod;
}
[Fact]
- [ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)]
public void GetUserStoreForApplication()
{
var isf = IsolatedStorageFile.GetUserStoreForApplication();
}
[Fact]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void GetUserStoreForAssembly()
{
var isf = IsolatedStorageFile.GetUserStoreForAssembly();
}
[Fact]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void GetUserStoreForDomain()
{
var isf = IsolatedStorageFile.GetUserStoreForDomain();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void GetStore_ThrowsPlatformNotSupported()
{
Assert.Throws<PlatformNotSupportedException>(() => IsolatedStorageFile.GetStore(IsolatedStorageScope.User, typeof(object)));
}
[Fact]
- [ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)]
public void GetStore_NullParamsAllowed()
{
VerifyApplicationStore(IsolatedStorageFile.GetStore(IsolatedStorageScope.User | IsolatedStorageScope.Application, (Type)null));
}
[Fact]
- [ActiveIssue("dotnet/corefx #18269", TargetFrameworkMonikers.NetFramework)]
public void GetEnumerator_NoOp()
{
IEnumerator e = IsolatedStorageFile.GetEnumerator(IsolatedStorageScope.Assembly);
}
[Fact]
- [ActiveIssue("dotnet/corefx #18269", TargetFrameworkMonikers.NetFramework)]
public void GetEnumerator_ThrowsForCurrent()
{
IEnumerator e = IsolatedStorageFile.GetEnumerator(IsolatedStorageScope.Assembly);
namespace System.IO.IsolatedStorage.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework,
- "These are unit tests for the CoreFX implementation and don't apply to NetFX.")]
public partial class HelperTests
{
[Fact]
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class IdentityTests : IsoStorageTest
{
private class TestStorage : IsolatedStorage
// We put the tests in the "Store collection" to get them to pick up the StoreTestsFixture. This will run the fixture
// at the start and end of the collection, cleaning the test environment.
[Collection("Store collection")]
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class IsoStorageTest
{
public static IEnumerable<object[]> ValidScopes
namespace System.IO.IsolatedStorage
{
// Test default IsolatedStorage base class behaviors
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class IsolatedStorageBaseClassTests : IsoStorageTest
{
private class TestStorage : IsolatedStorage
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public partial class IsolatedStorageFileStreamTests : IsoStorageTest
{
[Theory, MemberData(nameof(ValidStores))]
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class MoveDirectoryTests : IsoStorageTest
{
[Fact]
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void MoveDirectory_RaisesInvalidPath()
- {
- using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
- {
- AssertExtensions.Throws<ArgumentException>("path", null, () => isf.MoveDirectory("\0bad", "bar"));
- AssertExtensions.Throws<ArgumentException>("path", null, () => isf.MoveDirectory("foo", "\0bad"));
- }
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void MoveDirectory_IsolatedStorageException()
{
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void MoveDirectory_MoveOver(PresetScopes scope)
{
TestHelper.WipeStores();
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void MoveDirectory_MovesDirectory(PresetScopes scope)
{
TestHelper.WipeStores();
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class MoveFileTests : IsoStorageTest
{
[Fact]
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void MoveFile_RaisesInvalidPath()
- {
- using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
- {
- AssertExtensions.Throws<ArgumentException>("path", null, () => isf.MoveFile("\0bad", "bar"));
- AssertExtensions.Throws<ArgumentException>("path", null, () => isf.MoveFile("foo", "\0bad"));
- }
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void MoveFile_RaisesIsolatedStorageException()
{
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void MoveFile_MoveOver(PresetScopes scope)
{
TestHelper.WipeStores();
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void MoveFile_MovesFile(PresetScopes scope)
{
TestHelper.WipeStores();
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class OpenFileTests : IsoStorageTest
{
[Fact]
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void OpenFile_RaisesArgumentException()
- {
- using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
- {
- AssertExtensions.Throws<ArgumentException>("path", null, () => isf.OpenFile("\0bad", FileMode.Create));
- AssertExtensions.Throws<ArgumentException>("path", null, () => isf.OpenFile("\0bad", FileMode.Create, FileAccess.ReadWrite));
- AssertExtensions.Throws<ArgumentException>("path", null, () => isf.OpenFile("\0bad", FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite));
- }
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void OpenFile_RaisesIsolatedStorageException()
{
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
}
[Fact]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void OpenFile_PassesFileShare()
{
TestHelper.WipeStores();
}
[Fact]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void OpenFile_PassesFileAccess()
{
TestHelper.WipeStores();
}
[Fact]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void OpenFile_PassesFileMode()
{
TestHelper.WipeStores();
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void OpenFile_Existence(PresetScopes scope)
{
TestHelper.WipeStores();
namespace System.IO.IsolatedStorage
{
- [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
public class RemoveTests : IsoStorageTest
{
[Fact]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void RemoveUserStoreForApplication()
{
TestHelper.WipeStores();
}
[Fact]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void RemoveUserStoreForAssembly()
{
TestHelper.WipeStores();
}
[Fact]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void RemoveUserStoreForDomain()
{
TestHelper.WipeStores();
}
[Theory, MemberData(nameof(ValidStores))]
- [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
public void RemoveStoreWithContent(PresetScopes scope)
{
TestHelper.WipeStores();
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard-Unix;
- netstandard-Windows_NT;
+ netcoreapp-Unix;
+ netcoreapp-Windows_NT;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
/// Test to validate we can create multiple concurrent read-only maps from the same file path.
/// </summary>
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "On netfx, the MMF.CreateFromFile default FileShare is None. We intentionally changed it in netcoreapp in #6092.")]
public void FileInUse_CreateFromFile_SucceedsWithReadOnly()
{
const int Capacity = 4096;
[Theory]
[InlineData(MemoryMappedFileAccess.ReadExecute)]
[InlineData(MemoryMappedFileAccess.ReadWriteExecute)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "CreateFromFile in desktop uses FileStream's ctor that takes a FileSystemRights in order to specify execute privileges.")]
public void FileNotOpenedForExecute(MemoryMappedFileAccess access)
{
using (TempFile file = new TempFile(GetTestFilePath(), 4096))
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "CreateFromFile in desktop uses FileStream's ctor that takes a FileSystemRights in order to specify execute privileges.")]
public void WriteToReadOnlyFile_CopyOnWrite()
{
WriteToReadOnlyFile(MemoryMappedFileAccess.CopyOnWrite, (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && geteuid() == 0));
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "CreateFromFile in desktop uses FileStream's ctor that takes a FileSystemRights in order to specify execute privileges.")]
- public void WriteToReadOnlyFile_CopyOnWrite_netfx()
- {
- WriteToReadOnlyFile(MemoryMappedFileAccess.CopyOnWrite, succeeds: true);
- }
-
/// <summary>
/// Test to ensure that leaveOpen is appropriately respected, either leaving the FileStream open
/// or closing it on disposal.
<ProjectGuid>{9D6F6254-B5A3-40FF-8925-68AA8D1CE933}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="MemoryMappedFile.CreateFromFile.Tests.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{C92FF1A4-DEA1-4F0F-9AEB-94C9B2561B57}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Tests.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
return 0;
}
-#if !netstandard
+#if netcoreapp
public override async ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken = default)
{
await WaitForReadTask.Task;
cancellationToken.ThrowIfCancellationRequested();
}
-#if !netstandard
+#if netcoreapp
public override async ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default)
{
await WaitForWriteTask.Task;
return Task.CompletedTask;
}
-#if !netstandard
+#if netcoreapp
public override ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default)
{
if (_writes >= _maxWrites)
return bytes;
}
-#if !netstandard
+#if netcoreapp
public override async ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken cancellationToken = default)
{
if (_throwOnNextCallToRead)
<PropertyGroup>
<ProjectGuid>{9E984EB2-827E-4029-9647-FB5F8B67C553}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<!-- Some internal types are needed, so we reference the implementation assembly, rather than the reference assembly. -->
<DefaultReferenceExclusions Include="System.IO.Pipelines" />
<ReferenceFromRuntime Include="System.IO.Pipelines" />
<Compile Include="StreamPipeWriterTests.cs" />
<Compile Include="Infrastructure\ThrowAfterNWritesStream.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="PipeLengthTests.cs" />
<Compile Include="BufferSegmentPoolTest.cs" />
<Compile Include="PipeReaderWriterFacts.nonnetstandard.cs" />
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_NamedPipeStream()
{
string pipeName = GetUniquePipeName();
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_NamedPipeStream_ClientDisposed()
{
string pipeName = GetUniquePipeName();
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_NamedPipeStream_ClientHandleClosed()
{
string pipeName = GetUniquePipeName();
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_NamedPipeStream_ServerDisconnected()
{
string pipeName = GetUniquePipeName();
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_NamedPipeStream_ServerDisposed()
{
string pipeName = GetUniquePipeName();
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_NamedPipeStream_ServerHandleClosed()
{
string pipeName = GetUniquePipeName();
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void GetAccessControl_DisposedStream()
{
using (var pair = CreateServerClientPair())
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void GetAccessControl_ConnectedStream()
{
using (var pair = CreateServerClientPair())
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_NullPipeSecurity()
{
using (var pair = CreateServerClientPair())
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_DisposedStream()
{
using (var pair = CreateServerClientPair())
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_ConnectedStream()
{
using (var pair = CreateServerClientPair())
[Theory]
[InlineData(PipeDirection.Out, PipeDirection.In)]
[InlineData(PipeDirection.In, PipeDirection.Out)]
- [ActiveIssue("dotnet/corefx #18546", TargetFrameworkMonikers.NetFramework)]
public void ReadModeToByte_Accepted(PipeDirection serverDirection, PipeDirection clientDirection)
{
using (AnonymousPipeServerStream server = new AnonymousPipeServerStream(serverDirection))
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard-Unix;
- netstandard-Windows_NT;
netcoreapp-Unix;
netcoreapp-Windows_NT;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
[InlineData(PipeDirection.In)]
[InlineData(PipeDirection.InOut)]
[InlineData(PipeDirection.Out)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This scenario is not handled with System.ArgumentException on Full Framework")]
[PlatformSpecific(TestPlatforms.Windows)] // accessing SafePipeHandle on Unix fails for a non-connected stream
public static void Windows_CreateFromDisposedServerHandle_Throws_ObjectDisposedException(PipeDirection direction)
{
Assert.Throws<ObjectDisposedException>(() => new NamedPipeServerStream(direction, true, true, pipe.SafePipeHandle).Dispose());
}
- [Theory]
- [InlineData(PipeDirection.In)]
- [InlineData(PipeDirection.InOut)]
- [InlineData(PipeDirection.Out)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, ".NET Core handles this scenario by throwing ArgumentException instead")]
- [PlatformSpecific(TestPlatforms.Windows)] // accessing SafePipeHandle on Unix fails for a non-connected stream
- public static void Windows_CreateFromAlreadyBoundHandle_Throws_ApplicationException(PipeDirection direction)
- {
- // The pipe is already bound
- using (var pipe = new NamedPipeServerStream(GetUniquePipeName(), direction, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous))
- {
- SafePipeHandle handle = pipe.SafePipeHandle;
- Assert.Throws<ApplicationException>(() => new NamedPipeServerStream(direction, true, true, handle));
- }
- }
-
[Fact]
[PlatformSpecific(TestPlatforms.AnyUnix)] // accessing SafePipeHandle on Unix fails for a non-connected stream
public static void Unix_GetHandleOfNewServerStream_Throws_InvalidOperationException()
[InlineData(PipeDirection.In)]
[InlineData(PipeDirection.InOut)]
[InlineData(PipeDirection.Out)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET framework handles this scenario by throwing ApplicationException instead")]
[PlatformSpecific(TestPlatforms.Windows)] // accessing SafePipeHandle on Unix fails for a non-connected stream
public static void Windows_CreateFromAlreadyBoundHandle_Throws_ArgumentException(PipeDirection direction)
{
namespace System.IO.Pipes.Tests
{
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public sealed class NamedPipeTest_CrossProcess
{
[Fact]
namespace System.IO.Pipes.Tests
{
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Read_ServerOut_ClientIn : PipeTest_Read
{
protected override ServerClientPair CreateServerClientPair()
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Read_ServerIn_ClientOut : PipeTest_Read
{
protected override ServerClientPair CreateServerClientPair()
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Read_ServerInOut_ClientInOut : PipeTest_Read
{
protected override ServerClientPair CreateServerClientPair()
public override bool SupportsBidirectionalReadingWriting => true;
}
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Read_ServerInOut_ClientInOut_APMWaitForConnection : PipeTest_Read
{
protected override ServerClientPair CreateServerClientPair()
[InlineData(TokenImpersonationLevel.Impersonation)]
[InlineData(TokenImpersonationLevel.Delegation)]
[PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public async Task RunAsClient_Windows(TokenImpersonationLevel tokenImpersonationLevel)
{
string pipeName = GetUniquePipeName();
}
[Fact]
- [ActiveIssue("dotnet/corefx #16934", TargetFrameworkMonikers.NetFramework)] //Hangs forever in desktop as it doesn't have cancellation support
public async Task Server_ReadWriteCancelledToken_Throws_OperationCanceledException()
{
using (NamedPipePair pair = CreateNamedPipePair())
}
[Fact]
- [ActiveIssue("dotnet/corefx #16934", TargetFrameworkMonikers.NetFramework)] //Hangs forever in desktop as it doesn't have cancellation support
public async Task Client_ReadWriteCancelledToken_Throws_OperationCanceledException()
{
using (NamedPipePair pair = CreateNamedPipePair())
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Simple_ServerInOutRead_ClientInOutWrite : NamedPipeTest_Simple
{
protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions)
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Simple_ServerInOutWrite_ClientInOutRead : NamedPipeTest_Simple
{
protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions)
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Simple_ServerInOut_ClientIn : NamedPipeTest_Simple
{
protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions)
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Simple_ServerInOut_ClientOut : NamedPipeTest_Simple
{
protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions)
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Simple_ServerOut_ClientIn : NamedPipeTest_Simple
{
protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions)
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Simple_ServerIn_ClientOut : NamedPipeTest_Simple
{
protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions)
/// The Specific NamedPipe tests cover edge cases or otherwise narrow cases that
/// show up within particular server/client directional combinations.
/// </summary>
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Specific : NamedPipeTestBase
{
[Fact]
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/pull/25877 yet to be ported to netfx")]
[PlatformSpecific(TestPlatforms.Windows)] // Unix ignores MaxNumberOfServerInstances and second client also connects.
public void ClientConnect_Throws_Timeout_When_Pipe_Busy()
{
[Theory]
[MemberData(nameof(GetCancellationTokens))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/pull/25877 yet to be ported to netfx")]
[PlatformSpecific(TestPlatforms.Windows)] // Unix ignores MaxNumberOfServerInstances and second client also connects.
public async void ClientConnectAsync_With_Cancellation_Throws_Timeout_When_Pipe_Busy(CancellationToken cancellationToken)
{
namespace System.IO.Pipes.Tests
{
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Write_ServerOut_ClientIn : PipeTest_Write
{
protected override ServerClientPair CreateServerClientPair()
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Write_ServerIn_ClientOut : PipeTest_Write
{
protected override ServerClientPair CreateServerClientPair()
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
+ [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Write_ServerInOut_ClientInOut : PipeTest_Write
{
protected override ServerClientPair CreateServerClientPair()
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "There is a bug in netfx around async read on a broken PipeStream. See #2601 and #2899. This bug is fixed in netcore.")]
public virtual async Task ReadFromPipeWithClosedPartner_ReadNoBytes()
{
using (ServerClientPair pair = CreateServerClientPair())
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "There is a bug in netfx around async read on a broken PipeStream. See #2601 and #2899. This bug is fixed in netcore.")]
public virtual async Task ReadFromPipeWithClosedPartner_Span_ReadNoBytes()
{
using (ServerClientPair pair = CreateServerClientPair())
}
[Fact]
- [ActiveIssue("dotnet/corefx #19287", TargetFrameworkMonikers.NetFramework)]
public async Task ValidFlush_DoesntThrow()
{
using (ServerClientPair pair = CreateServerClientPair())
<ProjectGuid>{142469EC-D665-4FE2-845A-FDA69F9CC557}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AnonymousPipeTests\AnonymousPipeTest.CreateServer.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
- netstandard-Linux;
- netstandard-OSX;
+ netcoreapp-Windows_NT;
+ netcoreapp-Linux;
+ netcoreapp-OSX;
netfx;
+ uap-Windows_NT
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{4259DCE9-3480-40BB-B08A-64A2D446264B}</ProjectGuid>
- <Configurations>netfx-Debug;netfx-Release;netstandard-Linux-Debug;netstandard-Linux-Release;netstandard-OSX-Debug;netstandard-OSX-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netfx-Debug;netfx-Release;netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<ProjectGuid>{55F26FB1-D4AF-48CA-A470-83113AE7BFDB}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetFX allows a negative Position following some PositionPointer overflowing inputs. See dotnet/coreclr#11376.")]
public static void OverflowPositionPointer()
{
unsafe
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Difference in behavior that added extra checks to BinaryReader/Writer buffers on .NET Core")]
public void Read_InvalidEncoding()
{
using (var str = CreateStream())
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
Assert.Equal(500, buffer.Length);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/coreclr/pull/23700")]
[Fact]
public void MemoryStream_GetBuffer_AfterCapacityReset()
{
Assert.Equal("HelloWorld", str2);
}
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void NullEncodingThrows()
- {
- // [] Check for ArgumentNullException on null encoding
- //-----------------------------------------------------------------
-
- Assert.Throws<ArgumentNullException>(() => new StreamWriter(new MemoryStream(), null));
- }
-
[Fact]
public static void UTF8Encoding()
{
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework throws NullReferenceException")]
public async Task NullNewLineAsync()
{
using (MemoryStream ms = new MemoryStream())
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework throws NullReferenceException")]
public async Task NullNewLineAsync()
{
using (MemoryStream ms = new MemoryStream())
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="BinaryReader\BinaryReaderTests.netcoreapp.cs" Condition="'$(TargetGroup)' == 'netcoreapp'" />
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "#23810 not fixed on .NET Framework")]
public void ReadZeroCharacters()
{
using (CharArrayTextReader tr = GetCharArray().textReader)
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<ProjectGuid>{DC683D60-34EC-4D85-B6E0-E97FDB37A583}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Json\JsonArrayTests.cs" />
Expression.Lambda<Func<int[]>>(Expression.NewArrayBounds(typeof(int), Expression.Constant(-2)));
var func = lambda.Compile(useInterpreter);
OverflowException ex = Assert.Throws<OverflowException>(() => func());
-
- if (!PlatformDetection.IsNetNative) // Exceptions do not always have messages
- Assert.Equal(localizedMessage, ex.Message);
+ Assert.Equal(localizedMessage, ex.Message);
}
[Theory, ClassData(typeof(CompilationTypes))]
typeof(int), Expression.Constant(0), Expression.Constant(0), Expression.Constant(-2)));
var func = lambda.Compile(useInterpreter);
OverflowException ex = Assert.Throws<OverflowException>(() => func());
-
- if (!PlatformDetection.IsNetNative) // Exceptions do not always have messages
- Assert.Equal(localizedMessage, ex.Message);
+ Assert.Equal(localizedMessage, ex.Message);
}
}
}
private static void AssertBlock(int n, object obj)
{
- if (!PlatformDetection.IsNetNative) // .NET Native blocks internal framework reflection.
- {
- AssertTypeName("Block" + n, obj);
- }
+ AssertTypeName("Block" + n, obj);
}
private static void AssertTypeName(string expected, object obj)
ConstantExpression[] args = Enumerable.Range(0, N).Select(i => Expression.Constant(i)).ToArray();
MethodCallExpression expr = Expression.Call(obj, typeof(MS).GetMethod("I" + N), args);
-
- if (!PlatformDetection.IsNetNative) // .NET Native blocks internal framework reflection.
- {
- Assert.Equal("InstanceMethodCallExpressionN", expr.GetType().Name);
- }
-
+
+ Assert.Equal("InstanceMethodCallExpressionN", expr.GetType().Name);
Assert.Same(obj, expr.Object);
Assert.Equal(N, expr.ArgumentCount);
MethodCallExpression expr = Expression.Call(typeof(MS).GetMethod("S" + N), args);
- if (!PlatformDetection.IsNetNative) // .NET Native blocks internal framework reflection.
- {
- Assert.Equal("MethodCallExpressionN", expr.GetType().Name);
- }
-
+ Assert.Equal("MethodCallExpressionN", expr.GetType().Name);
Assert.Equal(N, expr.ArgumentCount);
for (var i = 0; i < N; i++)
{
private static void AssertStaticMethodCall(int n, object obj)
{
- if (!PlatformDetection.IsNetNative) // .NET Native blocks internal framework reflection.
- {
- AssertTypeName("MethodCallExpression" + n, obj);
- }
+ AssertTypeName("MethodCallExpression" + n, obj);
}
private static void AssertInstanceMethodCall(int n, object obj)
{
- if (!PlatformDetection.IsNetNative) // .NET Native blocks internal framework reflection.
- {
- AssertTypeName("InstanceMethodCallExpression" + n, obj);
- }
+ AssertTypeName("InstanceMethodCallExpression" + n, obj);
}
private static void AssertTypeName(string expected, object obj)
private static void AssertArgumentException(Action action, Type exceptionType, string paramName)
{
ArgumentException ex = (ArgumentException)Assert.Throws(exceptionType, action);
- if (!PlatformDetection.IsNetNative) // The .NET Native toolchain optimizes away exception ParamNames
- {
- Assert.Equal(paramName, ex.ParamName);
- }
+ Assert.Equal(paramName, ex.ParamName);
}
[Theory]
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uapaot-Windows_NT;
uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
ConstructorInfo ctor = viewType.GetConstructors().Single();
TargetInvocationException tie = Assert.Throws<TargetInvocationException>(() => ctor.Invoke(new object[] { null }));
ArgumentNullException ane = (ArgumentNullException)tie.InnerException;
- if (!PlatformDetection.IsNetNative) // The .NET Native toolchain optimizes away exception ParamNames
- {
- Assert.Equal(ctor.GetParameters()[0].Name, ane.ParamName);
- }
+ Assert.Equal(ctor.GetParameters()[0].Name, ane.ParamName);
}
public static IEnumerable<object[]> OnePerType()
}
TargetInvocationException tie = Assert.Throws<TargetInvocationException>(() => BindingRestrictionsProxyCtor.Invoke(new object[] {null}));
ArgumentNullException ane = (ArgumentNullException)tie.InnerException;
- if (!PlatformDetection.IsNetNative) // The .NET Native toolchain optimizes away exception ParamNames
- {
- Assert.Equal("node", ane.ParamName);
- }
+ Assert.Equal("node", ane.ParamName);
}
}
}
ConstructorInfo constructor = debugViewType.GetConstructors().Single();
TargetInvocationException tie = Assert.Throws<TargetInvocationException>(() => constructor.Invoke(new object[] {null}));
var ane = (ArgumentNullException)tie.InnerException;
- if (!PlatformDetection.IsNetNative) // The .NET Native toolchain optimizes away exception ParamNames
- {
- Assert.Equal("collection", ane.ParamName);
- }
+ Assert.Equal("collection", ane.ParamName);
}
}
}
=> Enumerable.Range(1, 6).SelectMany(i => Types, (i, t) => new object[] { i, t });
[Theory, MemberData(nameof(SizesAndSuffixes))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Internal framework reflection not supported on UapAot.")]
public void AritySpecialisedUsedWhenPossible(int size, string nameSuffix)
{
CallSiteBinder binder = Binder.GetMember(
}
[Theory, MemberData(nameof(SizesAndSuffixes))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Internal framework reflection not supported on UapAot.")]
public void TypedAritySpecialisedUsedWhenPossible(int size, string nameSuffix)
{
CallSiteBinder binder = Binder.GetMember(
private static void AssertInvocation(int n, object obj)
{
- if (!PlatformDetection.IsNetNative) // .NET Native blocks internal framework reflection.
- {
- AssertTypeName("InvocationExpression" + n, obj);
- }
+ AssertTypeName("InvocationExpression" + n, obj);
}
private static void AssertTypeName(string expected, object obj)
[Theory]
[ClassData(typeof(CompilationTypes))]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20717 - fails on x64", TargetFrameworkMonikers.UapAot)]
public static void UnaryPlus(bool useInterpreter)
{
ConstantExpression ce = Expression.Constant((ushort)10);
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Spill_Optimizations_LiteralField_NetFramework()
- {
- Expression<Func<double>> e =
- Expression.Lambda<Func<double>>(
- Expression.Add(
- Expression.Field(null, typeof(Math).GetField(nameof(Math.PI))),
- Spill(Expression.Constant(0.0))
- )
- );
-
- e.VerifyIL(@"
- .method float64 ::lambda_method(class [System.Linq.Expressions]System.Runtime.CompilerServices.Closure)
- {
- .maxstack 3
- .locals init (
- [0] float64,
- [1] float64
- )
-
- // Save rhs (`try { 0.0 } finally {}`) into V_0
- .try
- {
- IL_0000: ldc.r8 0
- IL_0009: stloc.1
- IL_000a: leave IL_0010
- }
- finally
- {
- IL_000f: endfinally
- }
- IL_0010: ldloc.1
- IL_0011: stloc.0
-
- // <OPTIMIZATION> Evaluate lhs (`Math.PI` gets inlined) </OPTIMIZATION>
- IL_0012: ldc.r8 3.14159265358979
-
- // Load rhs from V_0
- IL_001b: ldloc.0
-
- // Evaluate `lhs + rhs`
- IL_001c: add
-
- IL_001d: ret
- }"
- );
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Spill_Optimizations_LiteralField_NotNetFramework()
{
Expression<Func<double>> e =
<PropertyGroup>
<!-- Enabling the interpreter for RC1 in all builds, see https://github.com/dotnet/corefx/issues/4033 -->
<FeatureInterpret>true</FeatureInterpret>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<ProjectGuid>{4B4AA59B-89F9-4A34-B3C3-C97EF531EE00}</ProjectGuid>
- <IsInterpreting Condition="'$(TargetGroup)' == 'uapaot'">true</IsInterpreting>
+ <IsInterpreting>false</IsInterpreting>
<DefineConstants Condition=" '$(IsInterpreting)' != 'true' ">$(DefineConstants);FEATURE_COMPILE</DefineConstants>
<DefineConstants Condition=" '$(FeatureInterpret)' == 'true' ">$(DefineConstants);FEATURE_INTERPRET</DefineConstants>
<IncludeDefaultReferences>false</IncludeDefaultReferences>
<ReferenceFromRuntime Include="System.IO.FileSystem" />
<ReferenceFromRuntime Include="System.Runtime.InteropServices.RuntimeInformation" />
<ReferenceFromRuntime Include="System.Runtime.InteropServices" />
- <ReferenceFromRuntime Include="System.Private.Interop" Condition="'$(TargetGroup)' == 'uapaot'" />
<ReferenceFromRuntime Include="netstandard" />
</ItemGroup>
<ItemGroup>
<Compile Include="ILReader\PrivateReflectionHelpers.cs" />
<Compile Include="ILReader\LocalsSignatureParser.cs" />
<Compile Include="ILReader\SigParser.cs" />
- </ItemGroup>
- <!-- DebuggerAttribute tests require internal framework Reflection and will not work on AoT platforms.
- The proper way to test these is via the debugger expression evaluator, not Reflection. -->
- <ItemGroup Condition="'$(TargetGroup)'!='uapaot'">
<Compile Include="DebugViewTests.cs" />
<Compile Include="DebuggerTypeProxy\ExpressionDebuggerTypeProxyTests.cs" />
<Compile Include="Dynamic\BindingRestrictionsProxyTests.cs" />
[MemberData(nameof(UnaryCancelingOperators))]
[MemberData(nameof(BinaryCancelingOperators))]
[MemberData(nameof(OrderCancelingOperators))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core bug fix https://github.com/dotnet/corefx/pull/2307")]
public static void ToArray_OperationCanceledException_PreCanceled(Labeled<Func<ParallelQuery<int>, Action, ParallelQuery<int>>> operation)
{
AssertThrows.AlreadyCanceled(source => operation.Item(source, () => { }).ToArray());
[Theory]
[MemberData(nameof(UnaryOperators))]
[MemberData(nameof(BinaryOperators))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void GroupJoin(Labeled<Operation> source, Labeled<Operation> operation)
{
Action<Operation, Operation> groupJoin = (left, right) =>
[Theory]
[MemberData(nameof(UnaryOperators))]
[MemberData(nameof(BinaryOperators))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void GroupJoin_NotPipelined(Labeled<Operation> source, Labeled<Operation> operation)
{
Action<Operation, Operation> groupJoin = (left, right) =>
[Theory]
[MemberData(nameof(UnaryOperators))]
[MemberData(nameof(BinaryOperators))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void Join(Labeled<Operation> source, Labeled<Operation> operation)
{
Action<Operation, Operation> join = (left, right) =>
[Theory]
[MemberData(nameof(UnaryOperators))]
[MemberData(nameof(BinaryOperators))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void Join_NotPipelined(Labeled<Operation> source, Labeled<Operation> operation)
{
Action<Operation, Operation> join = (left, right) =>
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
uap;
netcoreapp;
</BuildConfigurations>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core bug fix https://github.com/dotnet/corefx/pull/1970 not available in desktop")]
public static void Cast_ArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("source", () => ((ParallelQuery<object>)null).Cast<int>());
[Theory]
[MemberData(nameof(GroupJoinMultipleData), new[] { 0, 1, 2, KeyFactor * 2 - 1, KeyFactor * 2 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void GroupJoin_Multiple(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
ParallelQuery<int> leftQuery = left.Item;
[Theory]
[OuterLoop]
[MemberData(nameof(GroupJoinMultipleData), new int[] { /* Sources.OuterLoopCount */ })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void GroupJoin_Multiple_Longrunning(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
GroupJoin_Multiple(left, leftCount, right, rightCount);
[Theory]
[MemberData(nameof(GroupJoinMultipleData), new[] { 0, 1, 2, KeyFactor * 2 - 1, KeyFactor * 2 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void GroupJoin_Multiple_LeftWithOrderingColisions(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
ParallelQuery<int> leftQuery = left.Item.AsUnordered().OrderBy(x => 0);
[Theory]
[OuterLoop]
[MemberData(nameof(GroupJoinMultipleData), new int[] { /* Sources.OuterLoopCount */ })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void GroupJoin_Multiple_LeftWithOrderingColisions_Longrunning(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
GroupJoin_Multiple_LeftWithOrderingColisions(left, leftCount, right, rightCount);
[Theory]
[MemberData(nameof(GroupJoinMultipleData), new[] { 0, 1, 2, KeyFactor * 2 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void GroupJoin_CustomComparator(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
ParallelQuery<int> leftQuery = left.Item;
[Theory]
[OuterLoop]
[MemberData(nameof(GroupJoinMultipleData), new int[] { /* Sources.OuterLoopCount */ })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void GroupJoin_CustomComparator_Longrunning(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
GroupJoin_CustomComparator(left, leftCount, right, rightCount);
[Theory]
[MemberData(nameof(GroupJoinMultipleData), new[] { 0, 1, 2, KeyFactor * 2 - 1, KeyFactor * 2 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void GroupJoin_CustomComparator_LeftWithOrderingColisions(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
ParallelQuery<int> leftQuery = left.Item.AsUnordered().OrderBy(x => x / KeyFactor);
[Theory]
[OuterLoop]
[MemberData(nameof(GroupJoinMultipleData), new int[] { /* Sources.OuterLoopCount */ })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void GroupJoin_CustomComparator_LeftWithOrderingColisions_Longrunning(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
GroupJoin_CustomComparator_LeftWithOrderingColisions(left, leftCount, right, rightCount);
[Theory]
[MemberData(nameof(JoinMultipleData), new[] { 0, 1, 2, KeyFactor * 2 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void Join_Multiple(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
ParallelQuery<int> leftQuery = left.Item;
[Theory]
[OuterLoop]
[MemberData(nameof(JoinMultipleData), new[] { 512, 1024 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void Join_Multiple_Longrunning(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
Join_Multiple(left, leftCount, right, rightCount);
[Theory]
[MemberData(nameof(JoinMultipleData), new[] { 2, KeyFactor - 1, KeyFactor, KeyFactor + 1, KeyFactor * 2 - 1, KeyFactor * 2, KeyFactor * 2 + 1 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void Join_Multiple_LeftWithOrderingColisions(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
LeftOrderingCollisionTestWithOrderedRight validator = new LeftOrderingCollisionTestWithOrderedRight();
[Theory]
[OuterLoop]
[MemberData(nameof(JoinMultipleData), new[] { 512, 1024 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void Join_Multiple_LeftWithOrderingColisions_Longrunning(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
Join_Multiple_LeftWithOrderingColisions(left, leftCount, right, rightCount);
[Theory]
[MemberData(nameof(JoinOrderedLeftUnorderedRightData), new[] { 2, KeyFactor - 1, KeyFactor, KeyFactor + 1, KeyFactor * 2 - 1, KeyFactor * 2, KeyFactor * 2 + 1 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve grouping of order-identical left keys through repartitioning (see https://github.com/dotnet/corefx/pull/27930#issuecomment-372084741)")]
public static void Join_Multiple_LeftWithOrderingColisions_UnorderedRight(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
LeftOrderingCollisionTestWithUnorderedRight validator = new LeftOrderingCollisionTestWithUnorderedRight();
[Theory]
[OuterLoop]
[MemberData(nameof(JoinOrderedLeftUnorderedRightData), new[] { 256, 512 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve grouping of order-identical left keys through repartitioning (see https://github.com/dotnet/corefx/pull/27930#issuecomment-372084741)")]
public static void Join_Multiple_LeftWithOrderingColisions_UnorderedRight_Longrunning(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
Join_Multiple_LeftWithOrderingColisions_UnorderedRight(left, leftCount, right, rightCount);
[Theory]
[MemberData(nameof(JoinMultipleData), new[] { 0, 1, 2, KeyFactor * 2 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void Join_CustomComparator(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
ParallelQuery<int> leftQuery = left.Item;
[Theory]
[OuterLoop]
[MemberData(nameof(JoinMultipleData), new[] { 512, 1024 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void Join_CustomComparator_Longrunning(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
Join_CustomComparator(left, leftCount, right, rightCount);
[Theory]
[MemberData(nameof(JoinMultipleData), new[] { 2, KeyFactor - 1, KeyFactor, KeyFactor + 1, KeyFactor * 2 - 1, KeyFactor * 2, KeyFactor * 2 + 1 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void Join_CustomComparator_LeftWithOrderingColisions(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
LeftOrderingCollisionTestWithOrderedRightAndCustomComparator validator = new LeftOrderingCollisionTestWithOrderedRightAndCustomComparator();
[Theory]
[OuterLoop]
[MemberData(nameof(JoinMultipleData), new[] { 512, 1024 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")]
public static void Join_CustomComparator_LeftWithOrderingColisions_Longrunning(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
Join_CustomComparator_LeftWithOrderingColisions(left, leftCount, right, rightCount);
[Theory]
[MemberData(nameof(JoinOrderedLeftUnorderedRightData), new[] { 2, KeyFactor - 1, KeyFactor, KeyFactor + 1, KeyFactor * 2 - 1, KeyFactor * 2, KeyFactor * 2 + 1 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve grouping of order-identical left keys through repartitioning (see https://github.com/dotnet/corefx/pull/27930#issuecomment-372084741)")]
public static void Join_CustomComparator_LeftWithOrderingColisions_UnorderedRight(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
LeftOrderingCollisionTestWithUnorderedRightAndCustomComparator validator = new LeftOrderingCollisionTestWithUnorderedRightAndCustomComparator();
[Theory]
[OuterLoop]
[MemberData(nameof(JoinOrderedLeftUnorderedRightData), new[] { 256 })]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve grouping of order-identical left keys through repartitioning (see https://github.com/dotnet/corefx/pull/27930#issuecomment-372084741)")]
public static void Join_CustomComparator_LeftWithOrderingColisions_UnorderedRight_Longrunning(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
Join_CustomComparator_LeftWithOrderingColisions_UnorderedRight(left, leftCount, right, rightCount);
[MemberData(nameof(Sources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(Sources))]
[MemberData(nameof(OrderByRandomData), new[] { 0, 1, 2, 16 })]
[MemberData(nameof(UnorderedSources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(UnorderedSources))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/issues/18141")]
// Regression test for the PLINQ version of #2239 - comparer returning max/min value.
public static void OrderByDescending_ExtremeComparer(Labeled<ParallelQuery<int>> labeled, int count)
{
[MemberData(nameof(Sources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(Sources))]
[MemberData(nameof(OrderByRandomData), new[] { 0, 1, 2, 16 })]
[MemberData(nameof(UnorderedSources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(UnorderedSources))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Validates .NET Core bug fix https://github.com/dotnet/corefx/pull/2305")]
public static void OrderBy_NotPipelined_ExtremeComparer(Labeled<ParallelQuery<int>> labeled, int count)
{
int prev = 0;
[MemberData(nameof(Sources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(Sources))]
[MemberData(nameof(OrderByRandomData), new[] { 0, 1, 2, 16 })]
[MemberData(nameof(UnorderedSources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(UnorderedSources))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Validates .NET Core bug fix https://github.com/dotnet/corefx/pull/2305")]
public static void OrderByDescending_NotPipelined_ExtremeComparer(Labeled<ParallelQuery<int>> labeled, int count)
{
int prev = count - 1;
[MemberData(nameof(Sources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(Sources))]
[MemberData(nameof(OrderByRandomData), new[] { 0, 1, 2, 16 })]
[MemberData(nameof(UnorderedSources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(UnorderedSources))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Validates .NET Core bug fix https://github.com/dotnet/corefx/pull/2305")]
// Regression test for the PLINQ version of #2239 - comparer returning max/min value.
public static void ThenBy_ExtremeComparer(Labeled<ParallelQuery<int>> labeled, int count)
{
[MemberData(nameof(Sources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(Sources))]
[MemberData(nameof(OrderByRandomData), new[] { 0, 1, 2, 16 })]
[MemberData(nameof(UnorderedSources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(UnorderedSources))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Validates .NET Core bug fix https://github.com/dotnet/corefx/pull/2305")]
// Regression test for the PLINQ version of #2239 - comparer returning max/min value.
public static void ThenByDescending_ExtremeComparer(Labeled<ParallelQuery<int>> labeled, int count)
{
[Theory]
[MemberData(nameof(Sources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(Sources))]
[MemberData(nameof(UnorderedSources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(UnorderedSources))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Validates .NET Core bug fix https://github.com/dotnet/corefx/pull/2305")]
public static void ThenBy_NotPipelined_ExtremeComparer(Labeled<ParallelQuery<int>> labeled, int count)
{
int prev = 0;
[MemberData(nameof(Sources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(Sources))]
[MemberData(nameof(OrderByRandomData), new[] { 0, 1, 2, 16 })]
[MemberData(nameof(UnorderedSources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(UnorderedSources))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core bug fix https://github.com/dotnet/corefx/pull/2305")]
public static void ThenByDescending_NotPipelined_ExtremeComparer(Labeled<ParallelQuery<int>> labeled, int count)
{
int prev = count - 1;
[InlineData(1)]
[InlineData(2)]
[InlineData(16)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core bug fix https://github.com/dotnet/corefx/pull/1215")]
public static void Sum_Float(int count)
{
Assert.Equal(Functions.SumRange(0, count), ParallelEnumerable.Range(0, count).Select(x => (float)x).Sum());
[OuterLoop]
[InlineData(1024 * 4)]
[InlineData(1024 * 64)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core bug fix https://github.com/dotnet/corefx/pull/1215")]
public static void Sum_Float_Longrunning(int count)
{
Sum_Float(count);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core bug fix https://github.com/dotnet/corefx/pull/2307")]
public static void ToArray_OperationCanceledException_PreCanceled()
{
AssertThrows.AlreadyCanceled(source => source.ToArray());
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{A7074928-82C3-4739-88FE-9B528977950C}</ProjectGuid>
- <!-- Avoid extreme slowness when running NETFX tests (ie with xunit.console.exe) -->
- <XUnitNoAppdomain>true</XUnitNoAppdomain>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Diagnostics\Tracing\TestEventListener.cs">
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
}
[Fact]
- [ActiveIssue("dotnet/corefx #16916", TargetFrameworkMonikers.NetFramework)] //This test hangs forever in query.GetEnumerator()
public void NullEnumerableConstantNullExpression()
{
IQueryable<int> query = new EnumerableQuery<int>((IEnumerable<int>)null);
Assert.Equal(new[] { 1, 2, 3 }, q.Cast<int>());
}
- [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support ConditionalExpression in EnumerableQuery")]
+ [Fact]
public void ExplicitlyTypedConditional()
{
Expression call = Expression.Call(
Assert.Equal(new long[] { 2, 3, 1 }, q);
}
- [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")]
+ [Fact]
public void Block()
{
Expression block = Expression.Block(
Assert.Equal(Enumerable.Range(0, 2), q);
}
- [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")]
+ [Fact]
public void ExplicitlyTypedBlock()
{
Expression block = Expression.Block(
Assert.Equal(Enumerable.Range(0, 2), q);
}
- [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")]
+ [Fact]
public void Return()
{
LabelTarget target = Expression.Label(typeof(IQueryable<int>));
Assert.Equal(Enumerable.Range(0, 2), q);
}
- [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")]
+ [Fact]
public void ReturnArray()
{
LabelTarget target = Expression.Label(typeof(IQueryable<int>));
Assert.Equal(new[] { 1, 1, 2, 3, 5, 8 }, q);
}
- [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")]
+ [Fact]
public void ReturnOrdered()
{
LabelTarget target = Expression.Label(typeof(IQueryable<int>));
Assert.Equal(new[] { 2, 1, 0 }, q);
}
- [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")]
+ [Fact]
public void ReturnOrderedAfterAsQueryable()
{
LabelTarget target = Expression.Label(typeof(IQueryable<int>));
Assert.Equal(new[] { 2, 1, 0 }, q);
}
- [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")]
+ [Fact]
public void ReturnNonQueryable()
{
LabelTarget target = Expression.Label(typeof(int));
Assert.Equal(3, _prov.Execute<int>(block));
}
- [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")]
+ [Fact]
public void ReturnNonQueryableUntyped()
{
LabelTarget target = Expression.Label(typeof(int));
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{7B88D79B-B799-4116-A7D0-AED572540CD4}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="'$(TargetGroup)'=='netcoreapp'">
<Compile Include="AppendPrependTests.cs" />
[Theory]
[MemberData(nameof(ManyConcatsData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Stack overflows on desktop due to inefficient Concat implementation")]
public void ManyConcatsRunOnce(IEnumerable<IEnumerable<int>> sources, IEnumerable<int> expected)
{
foreach (var transform in IdentityTransforms<int>())
Action<Action> assertThrows = (testCode) =>
{
- // The full .NET Framework uses unsigned arithmetic summing up collection counts.
- // See https://github.com/dotnet/corefx/pull/11492.
- if (PlatformDetection.IsFullFramework || PlatformDetection.IsUap)
- {
- testCode();
- }
- else
- {
- Assert.Throws<OverflowException>(testCode);
- }
+ Assert.Throws<OverflowException>(testCode);
};
// We need to use checked arithmetic summing up the collections' counts.
[Fact]
[OuterLoop("This test tries to catch stack overflows and can take a long time.")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Stack overflows on desktop due to inefficient Concat implementation")]
public void CountOfConcatCollectionChainShouldBeResilientToStackOverflow()
{
// Currently, .Concat chains of 3+ ICollections are represented as a
[Fact]
[OuterLoop("This test tries to catch stack overflows and can take a long time.")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Stack overflows on desktop due to inefficient Concat implementation")]
public void CountOfConcatEnumerableChainShouldBeResilientToStackOverflow()
{
// Concat chains where one or more of the inputs is not an ICollection
[Fact]
[OuterLoop("This test tries to catch stack overflows and can take a long time.")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Stack overflows on desktop due to inefficient Concat implementation")]
public void GettingFirstEnumerableShouldBeResilientToStackOverflow()
{
// When MoveNext() is first called on a chain of 3+ Concats, we have to
[Fact]
[OuterLoop("This test tries to catch stack overflows and can take a long time.")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Stack overflows on desktop due to inefficient Concat implementation")]
public void GetEnumerableOfConcatCollectionChainFollowedByEnumerableNodeShouldBeResilientToStackOverflow()
{
// Since concatenating even 1 lazy enumerable ruins the ability for ToArray/ToList
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
- uapaot;
</BuildConfigurations>
</PropertyGroup>
</Project>
"ToHashSet"
};
- if (PlatformDetection.IsFullFramework)
- {
- result = result.Concat(new[]
- {
- nameof(Enumerable.Append),
- nameof(Enumerable.Prepend)
- });
- }
-
return result;
}
{
// .NET Core returns the instance as an optimization.
// see https://github.com/dotnet/corefx/pull/2401.
- Assert.Equal(!PlatformDetection.IsFullFramework, ReferenceEquals(GetEmptyPartition<int>(), GetEmptyPartition<int>()));
+ Assert.Equal(true, ReferenceEquals(GetEmptyPartition<int>(), GetEmptyPartition<int>()));
}
[Fact]
Assert.Empty(GetEmptyPartition<int>().ToList());
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "netfx's Take returns a compiler-generated iterator whose Reset throws.")]
[Fact]
public void ResetIsNop()
{
{
[Theory]
[MemberData(nameof(DebuggerAttributesValid_Data))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Grouping<TKey, TValue> doesn't have a Debugger proxy in the full .NET Framework. See https://github.com/dotnet/corefx/issues/14790.")]
public void DebuggerAttributesValid<TKey, TElement>(IGrouping<TKey, TElement> grouping, string keyString)
{
Assert.Equal($"Key = {keyString}", DebuggerAttributes.ValidateDebuggerDisplayReferences(grouping));
// as nothing can be less than float.NaN. See https://github.com/dotnet/corefx/pull/2426.
// Without this optimization, we would iterate through int.MaxValue elements, which takes
// a long time.
- if (!PlatformDetection.IsFullFramework)
- {
- yield return new object[] { Enumerable.Repeat(float.NaN, int.MaxValue), float.NaN };
- }
+ yield return new object[] { Enumerable.Repeat(float.NaN, int.MaxValue), float.NaN };
yield return new object[] { Enumerable.Repeat(float.NaN, 3), float.NaN };
// Normally NaN < anything is false, as is anything < NaN
// as nothing can be less than double.NaN. See https://github.com/dotnet/corefx/pull/2426.
// Without this optimization, we would iterate through int.MaxValue elements, which takes
// a long time.
- if (!PlatformDetection.IsFullFramework)
- {
- yield return new object[] { Enumerable.Repeat(double.NaN, int.MaxValue), double.NaN };
- }
+ yield return new object[] { Enumerable.Repeat(double.NaN, int.MaxValue), double.NaN };
yield return new object[] { Enumerable.Repeat(double.NaN, 3), double.NaN };
yield return new object[] { new double[] { double.NaN, 6.8, 9.4, 10, 0, -5.6 }, double.NaN };
// as nothing can be less than float.NaN. See https://github.com/dotnet/corefx/pull/2426.
// Without this optimization, we would iterate through int.MaxValue elements, which takes
// a long time.
- if (!PlatformDetection.IsFullFramework)
- {
- yield return new object[] { Enumerable.Repeat((float?)float.NaN, int.MaxValue), float.NaN };
- }
+ yield return new object[] { Enumerable.Repeat((float?)float.NaN, int.MaxValue), float.NaN };
yield return new object[] { Enumerable.Repeat((float?)float.NaN, 3), float.NaN };
}
// as nothing can be less than double.NaN. See https://github.com/dotnet/corefx/pull/2426.
// Without this optimization, we would iterate through int.MaxValue elements, which takes
// a long time.
- if (!PlatformDetection.IsFullFramework)
- {
- yield return new object[] { Enumerable.Repeat((double?)double.NaN, int.MaxValue), double.NaN };
- }
+ yield return new object[] { Enumerable.Repeat((double?)double.NaN, int.MaxValue), double.NaN };
yield return new object[] { Enumerable.Repeat((double?)double.NaN, 3), double.NaN };
}
// The full .NET Framework has a bug where the input is incorrectly ordered if the comparer
// returns int.MaxValue or int.MinValue. See https://github.com/dotnet/corefx/pull/2240.
IEnumerable<int> ordered = outOfOrder.OrderByDescending(i => i, new ExtremeComparer()).ToArray();
- if (PlatformDetection.IsFullFramework)
- {
- Assert.Equal(new[] { 3, 5, 1, 4, 9, 2, 0, 8, 7, 6 }, ordered);
- }
- else
- {
- Assert.Equal(Enumerable.Range(0, 10).Reverse(), ordered);
- }
+ Assert.Equal(Enumerable.Range(0, 10).Reverse(), ordered);
}
[Fact]
// .NET Core fixes an oversight where we wouldn't properly dispose
// the SelectMany iterator. See https://github.com/dotnet/corefx/pull/13942.
- int expectedCurrent = PlatformDetection.IsFullFramework ? subLength : 0;
+ int expectedCurrent = 0;
Assert.Equal(expectedCurrent, e.Current);
Assert.False(e.MoveNext());
Assert.Equal(expectedCurrent, e.Current);
// The.NET full framework throws a NotImplementedException.
// See https://github.com/dotnet/corefx/pull/2959.
- if (PlatformDetection.IsFullFramework)
- {
- Assert.Throws<NotImplementedException>(() => enumerator.Reset());
- }
- else
- {
- Assert.Throws<NotSupportedException>(() => enumerator.Reset());
- }
+ Assert.Throws<NotSupportedException>(() => enumerator.Reset());
}
[Fact]
// .NET Core shortcircuits as an optimization.
// See https://github.com/dotnet/corefx/pull/2350.
- Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 4, pred.Calls);
+ Assert.Equal(4, pred.Calls);
}
[Fact]
// .NET Core shortcircuits as an optimization.
// See https://github.com/dotnet/corefx/pull/2350.
- Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 5, tracker.Moves);
+ Assert.Equal(5, tracker.Moves);
}
[Fact]
// .NET Core shortcircuits as an optimization.
// See https://github.com/dotnet/corefx/pull/2350.
- Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 5, tracker.Moves);
+ Assert.Equal(5, tracker.Moves);
}
[Fact]
// .NET Core shortcircuits as an optimization.
// See https://github.com/dotnet/corefx/pull/2350.
- Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 5, tracker.Moves);
+ Assert.Equal(5, tracker.Moves);
}
[Fact]
// .NET Core shortcircuits as an optimization.
// See https://github.com/dotnet/corefx/pull/2350.
- Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 5, tracker.Moves);
+ Assert.Equal(5, tracker.Moves);
}
[Fact]
// .NET Core shortcircuits as an optimization.
// See https://github.com/dotnet/corefx/pull/2350.
- Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 4, tracker.Moves);
- Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 4, pred.Calls);
+ Assert.Equal(4, tracker.Moves);
+ Assert.Equal(4, pred.Calls);
}
[Fact]
// .NET Core shortcircuits as an optimization.
// See https://github.com/dotnet/corefx/pull/2350.
- Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 4, tracker.Moves);
- Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 4, pred.Calls);
+ Assert.Equal(4, tracker.Moves);
+ Assert.Equal(4, pred.Calls);
}
[Fact]
// .NET Core shortcircuits as an optimization.
// See https://github.com/dotnet/corefx/pull/2350.
- Assert.Equal(PlatformDetection.IsFullFramework ? 4 : tracker0.Moves, tracker1.Moves);
- Assert.Equal(PlatformDetection.IsFullFramework ? 4 : pred0.Calls, pred1.Calls);
+ Assert.Equal(tracker0.Moves, tracker1.Moves);
+ Assert.Equal(pred0.Calls, pred1.Calls);
}
[Fact]
// .NET Core shortcircuits as an optimization.
// See https://github.com/dotnet/corefx/pull/2350.
- Assert.Equal(PlatformDetection.IsFullFramework ? 4 : tracker0.Moves, tracker1.Moves);
- Assert.Equal(PlatformDetection.IsFullFramework ? 4 : pred0.Calls, pred1.Calls);
+ Assert.Equal(tracker0.Moves, tracker1.Moves);
+ Assert.Equal(pred0.Calls, pred1.Calls);
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{7C70BB15-870B-4946-8098-625DACD645A6}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uapaot-Debug;uapaot-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetGroup)'=='netcoreapp'">
+ <ItemGroup>
<Compile Include="AppendPrependTests.cs" />
<Compile Include="SkipLastTests.cs" />
<Compile Include="TakeLastTests.cs" />
<Compile Include="ToHashSetTests.cs" />
<Compile Include="SelectManyTests.netcoreapp.cs" />
<Compile Include="ZipTests.netcoreapp.cs" />
- </ItemGroup>
- <ItemGroup>
<Compile Include="AggregateTests.cs" />
<Compile Include="AllTests.cs" />
<Compile Include="AnyTests.cs" />
<Compile Include="$(CommonTestPath)\System\Linq\SkipTakeData.cs">
<Link>Common\System\Linq\SkipTakeData.cs</Link>
</Compile>
- </ItemGroup>
- <!-- DebuggerAttribute tests require internal framework Reflection and will not work on AoT platforms.
- The proper way to test these is via the debugger expression evaluator, not Reflection. -->
- <ItemGroup Condition="'$(TargetGroup)'!='uapaot'">
<Compile Include="$(CommonTestPath)\System\Diagnostics\DebuggerAttributes.cs">
<Link>Common\System\Diagnostics\DebuggerAttributes.cs</Link>
</Compile>
// .NET Core returns the instance as an optimization.
// see https://github.com/dotnet/corefx/pull/2401.
- Action<object, object> assertSame = (objA, objB) =>
- Assert.Equal(!PlatformDetection.IsFullFramework, ReferenceEquals(objA, objB));
+ Action<object, object> assertSame = (objA, objB) => Assert.Equal(true, ReferenceEquals(objA, objB));
assertSame(emptySourceArray.ToArray(), emptySourceArray.ToArray());
{
// .NET Core returns the instance as an optimization.
// see https://github.com/dotnet/corefx/pull/2401.
- Assert.Equal(!PlatformDetection.IsFullFramework, ReferenceEquals(Enumerable.Empty<int>().ToArray(), Enumerable.Empty<int>().ToArray()));
+ Assert.Equal(true, ReferenceEquals(Enumerable.Empty<int>().ToArray(), Enumerable.Empty<int>().ToArray()));
var array = new int[0];
Assert.NotSame(array, array.ToArray());
Third
}
- [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET framework disallows copying assignable value types. See corefx#13816")]
+ [Fact]
public void ToArray_Cast()
{
Enum0[] source = { Enum0.First, Enum0.Second, Enum0.Third };
{
[Theory]
[MemberData(nameof(DebuggerAttributesValid_Data))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Lookup<T> doesn't have a Debugger proxy in the full .NET framework. See https://github.com/dotnet/corefx/issues/14790.")]
public void DebuggerAttributesValid<TKey, TElement>(ILookup<TKey, TElement> lookup)
{
Assert.Equal($"Count = {lookup.Count}", DebuggerAttributes.ValidateDebuggerDisplayReferences(lookup));
// The full .NET Framework throws a NotImplementedException.
// See https://github.com/dotnet/corefx/pull/2959.
- if (PlatformDetection.IsFullFramework)
- {
- Assert.Throws<NotImplementedException>(() => enumerator.Reset());
- }
- else
- {
- Assert.Throws<NotSupportedException>(() => enumerator.Reset());
- }
+ Assert.Throws<NotSupportedException>(() => enumerator.Reset());
}
[Fact]
<Project>
<PropertyGroup>
<BuildConfigurations>
- netcoreapp-Windows_NT;
- netfx;
+ netcoreapp-Windows_NT;
+ netfx;
</BuildConfigurations>
</PropertyGroup>
</Project>
[Fact]
[OuterLoop]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop framework doesn't support large arrays by default.")]
public static void MemoryManagerPinLargeArray()
{
// Early-out: we can only run this test on 64-bit platforms.
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This unit test relies on internal implementation details of Memory<T> on netcoreapp.")]
public static void CreateFromPinnedArrayIntSliceRemainsPinned()
{
int[] a = { 90, 91, 92, 93, 94, 95, 96, 97, 98 };
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This unit test relies on internal implementation details of Memory<T> on netcoreapp.")]
public static void CreateFromPinnedArrayIntReadOnlyMemorySliceRemainsPinned()
{
int[] a = { 90, 91, 92, 93, 94, 95, 96, 97, 98 };
Assert.NotSame(subString1, subString3);
Assert.NotSame(subString2, subString3);
}
-
- // This test is only relevant for portable span
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Optimization only applies to portable span.")]
- [Fact]
- public static void ToStringSpanOverFullStringReturnsOriginal()
- {
- string original = TestHelpers.BuildString(10, 42);
- ReadOnlySpan<char> span = original.AsSpan();
-
- string returnedString = span.ToString();
- string returnedStringUsingSlice = span.Slice(0, original.Length).ToString();
-
- Assert.Same(original, returnedString);
- Assert.Same(original, returnedStringUsingSlice);
- }
}
}
<Link>Common\System\MutableDecimal.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netstandard'">
- <Compile Include="$(CommonTestPath)\Tests\System\SpanExtensions.netstandard.cs">
- <Link>System\SpanExtensions.netstandard.cs</Link>
- </Compile>
- </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
</ItemGroup>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
+ netcoreapp-Windows_NT;
+ netfx-Windows_NT;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{17D5CC82-F72C-4DD2-B6DB-DE7FB2F19C34}</ProjectGuid>
- <Configurations>netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetsWindows)' == 'true' ">
<Compile Include="$(CommonTestPath)\System\Net\Configuration.cs">
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- netstandard-Windows_NT;
- netstandard-Unix;
uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
{
using Configuration = System.Net.Test.Common.Configuration;
- [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
public abstract class DiagnosticsTest : HttpClientHandlerTestBase
{
public DiagnosticsTest(ITestOutputHelper output) : base(output) { }
[Theory, MemberData(nameof(RedirectStatusCodes))]
public async Task GetAsync_AllowAutoRedirectFalse_RedirectFromHttpToHttp_StatusCodeRedirect(int statusCode)
{
- if (statusCode == 308 && (PlatformDetection.IsFullFramework || IsWinHttpHandler && PlatformDetection.WindowsVersion < 10))
+ if (statusCode == 308 && (IsWinHttpHandler && PlatformDetection.WindowsVersion < 10))
{
// 308 redirects are not supported on old versions of WinHttp, or on .NET Framework.
return;
newMethod = "POST";
}
- if (statusCode == 308 && (PlatformDetection.IsFullFramework || IsWinHttpHandler && PlatformDetection.WindowsVersion < 10))
+ if (statusCode == 308 && (IsWinHttpHandler && PlatformDetection.WindowsVersion < 10))
{
// 308 redirects are not supported on old versions of WinHttp, or on .NET Framework.
return;
[Theory, MemberData(nameof(RedirectStatusCodes))]
public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttp_StatusCodeOK(int statusCode)
{
- if (statusCode == 308 && (PlatformDetection.IsFullFramework || IsWinHttpHandler && PlatformDetection.WindowsVersion < 10))
+ if (statusCode == 308 && (IsWinHttpHandler && PlatformDetection.WindowsVersion < 10))
{
// 308 redirects are not supported on old versions of WinHttp, or on .NET Framework.
return;
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework allows HTTPS to HTTP redirection")]
[OuterLoop("Uses external server")]
[Fact]
public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpsToHttp_StatusCodeRedirect()
_output.WriteLine("Skipping test due to Windows 10 version prior to Version 1703.");
return;
}
- else if (PlatformDetection.IsFullFramework)
- {
- // Skip this test if running on .NET Framework. Exceeding max redirections will not throw
- // exception. Instead, it simply returns the 3xx response.
- _output.WriteLine("Skipping test on .NET Framework due to behavior difference.");
- return;
- }
HttpClientHandler handler = CreateHttpClientHandler();
handler.MaxAutomaticRedirections = maxHops;
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Doesn't handle fragments according to https://tools.ietf.org/html/rfc7231#section-7.1.2")]
[SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Doesn't handle fragments according to https://tools.ietf.org/html/rfc7231#section-7.1.2")]
[Theory]
[InlineData("#origFragment", "", "#origFragment", false)]
[Theory, MemberData(nameof(RedirectStatusCodes))]
public async Task GetAsync_CredentialIsCredentialCacheUriRedirect_StatusCodeOK(int statusCode)
{
- if (statusCode == 308 && (PlatformDetection.IsFullFramework || IsWinHttpHandler && PlatformDetection.WindowsVersion < 10))
+ if (statusCode == 308 && (IsWinHttpHandler && PlatformDetection.WindowsVersion < 10))
{
// 308 redirects are not supported on old versions of WinHttp, or on .NET Framework.
return;
[Theory, MemberData(nameof(RedirectStatusCodes))]
public async Task DefaultHeaders_SetCredentials_ClearedOnRedirect(int statusCode)
{
- if (statusCode == 308 && (PlatformDetection.IsFullFramework || IsWinHttpHandler && PlatformDetection.WindowsVersion < 10))
+ if (statusCode == 308 && (IsWinHttpHandler && PlatformDetection.WindowsVersion < 10))
{
// 308 redirects are not supported on old versions of WinHttp, or on .NET Framework.
return;
Assert.True(cts.Token.IsCancellationRequested, "cts token IsCancellationRequested");
- if (!PlatformDetection.IsFullFramework)
- {
- // .NET Framework has bug where it doesn't propagate token information.
- Assert.True(ex.CancellationToken.IsCancellationRequested, "exception token IsCancellationRequested");
- }
+ // .NET Framework has bug where it doesn't propagate token information.
+ Assert.True(ex.CancellationToken.IsCancellationRequested, "exception token IsCancellationRequested");
+
clientCanceled.SetResult(true);
}
},
[Theory]
[InlineData(ClientCertificateOption.Manual)]
[InlineData(ClientCertificateOption.Automatic)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Fails with \"Authentication failed\" error.")]
public async Task AutomaticOrManual_DoesntFailRegardlessOfWhetherClientCertsAreAvailable(ClientCertificateOption mode)
{
if (!BackendSupportsCustomCertificateHandling) // can't use [Conditional*] right now as it's evaluated at the wrong time for SocketsHttpHandler
});
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Netfx handler does not support custom cookie header")]
[Fact]
public async Task GetAsync_AddCookieHeader_CookieHeaderSent()
{
}
[ActiveIssue(30051, TargetFrameworkMonikers.Uap)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Netfx handler does not support custom cookie header")]
[Fact]
public async Task GetAsync_AddMultipleCookieHeaders_CookiesSent()
{
return cookieHeaderValue;
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Netfx handler does not support custom cookie header")]
[ConditionalFact]
public async Task GetAsync_SetCookieContainerAndCookieHeader_BothCookiesSent()
{
}
[ActiveIssue(30051, TargetFrameworkMonikers.Uap)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Netfx handler does not support custom cookie header")]
[ConditionalFact]
public async Task GetAsync_SetCookieContainerAndMultipleCookieHeaders_BothCookiesSent()
{
yield return new object[] { "ABC", "123", useCookies };
yield return new object[] { "Hello", "World", useCookies };
yield return new object[] { "foo", "bar", useCookies };
-
- if (!PlatformDetection.IsFullFramework) {
- yield return new object[] { "Hello World", "value", useCookies };
- }
-
+ yield return new object[] { "Hello World", "value", useCookies };
yield return new object[] { ".AspNetCore.Session", "RAExEmXpoCbueP_QYM", useCookies };
yield return new object[]
}
}
- [ActiveIssue(23702, TargetFrameworkMonikers.NetFramework)]
[SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP HTTP stack doesn't support .Proxy property")]
[Fact]
public async Task ProxyExplicitlyProvided_DefaultCredentials_Ignored()
public HttpClientHandler_MaxConnectionsPerServer_Test(ITestOutputHelper output) : base(output) { }
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "MaxConnectionsPerServer either returns two or int.MaxValue depending if ctor of HttpClientHandlerTest executed first. Disabling cause of random xunit execution order.")]
public void Default_ExpectedValue()
{
using (HttpClientHandler handler = CreateHttpClientHandler())
[Theory]
[InlineData(0)]
[InlineData(-1)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NETFX doesn't throw on invalid values")]
public void Set_InvalidValues_Throws(int invalidValue)
{
using (HttpClientHandler handler = CreateHttpClientHandler())
return;
}
- if (PlatformDetection.IsFullFramework &&
- (proxyAuthScheme == AuthenticationSchemes.Negotiate || proxyAuthScheme == AuthenticationSchemes.Ntlm))
- {
- // Skip due to bug in .NET Framework with Windows auth and proxy tunneling.
- return;
- }
-
if (!PlatformDetection.IsWindows &&
(proxyAuthScheme == AuthenticationSchemes.Negotiate || proxyAuthScheme == AuthenticationSchemes.Ntlm))
{
}
}
- [ActiveIssue(23702, TargetFrameworkMonikers.NetFramework)]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
public async Task ProxyAuth_Digest_Succeeds()
{
{
using Configuration = System.Net.Test.Common.Configuration;
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework throws PNSE for ServerCertificateCustomValidationCallback")]
public abstract partial class HttpClientHandler_ServerCertificates_Test : HttpClientHandlerTestBase
{
private static bool ClientSupportsDHECipherSuites => (!PlatformDetection.IsWindows || PlatformDetection.IsWindows10Version1607OrGreater);
using Configuration = System.Net.Test.Common.Configuration;
[SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "SslProtocols not supported on UAP")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "SslProtocols property requires .NET 4.7.2")]
public abstract partial class HttpClientHandler_SslProtocols_Test : HttpClientHandlerTestBase
{
public HttpClientHandler_SslProtocols_Test(ITestOutputHelper output) : base(output) { }
[InlineData(SslProtocols.Tls11 | SslProtocols.Tls12)]
[InlineData(SslProtocols.Tls | SslProtocols.Tls12)]
[InlineData(SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12)]
-#if !netstandard
[InlineData(SslProtocols.Tls13)]
[InlineData(SslProtocols.Tls11 | SslProtocols.Tls13)]
[InlineData(SslProtocols.Tls12 | SslProtocols.Tls13)]
[InlineData(SslProtocols.Tls | SslProtocols.Tls13)]
[InlineData(SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12 | SslProtocols.Tls13)]
-#endif
public void SetGetProtocols_Roundtrips(SslProtocols protocols)
{
using (HttpClientHandler handler = CreateHttpClientHandler())
yield return new object[] { SslProtocols.Ssl2, true };
}
#pragma warning restore 0618
-#if !netstandard
// These protocols are new, and might not be enabled everywhere yet
if (PlatformDetection.IsUbuntu1810OrHigher)
{
yield return new object[] { SslProtocols.Tls13, false };
yield return new object[] { SslProtocols.Tls13, true };
}
-#endif
}
[ConditionalTheory]
public HttpClientHandlerTest(ITestOutputHelper output) : base(output)
{
- if (PlatformDetection.IsFullFramework)
- {
- // On .NET Framework, the default limit for connections/server is very low (2).
- // On .NET Core, the default limit is higher. Since these tests run in parallel,
- // the limit needs to be increased to avoid timeouts when running the tests.
- System.Net.ServicePointManager.DefaultConnectionLimit = int.MaxValue;
- }
}
[Fact]
Assert.True(handler.SupportsRedirectConfiguration);
// Changes from .NET Framework (Desktop).
- if (!PlatformDetection.IsFullFramework)
- {
- Assert.False(handler.CheckCertificateRevocationList);
- Assert.Equal(0, handler.MaxRequestContentBufferSize);
- Assert.Equal(SslProtocols.None, handler.SslProtocols);
- }
+ Assert.False(handler.CheckCertificateRevocationList);
+ Assert.Equal(0, handler.MaxRequestContentBufferSize);
+ Assert.Equal(SslProtocols.None, handler.SslProtocols);
}
}
});
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "No exception thrown")]
[Fact]
public async Task SendAsync_TransferEncodingSetButNoRequestContent_Throws()
{
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "netfx's ConnectStream.ReadAsync tries to read beyond data already buffered, causing hangs #18864")]
[OuterLoop("Slow response")]
[Fact]
public async Task SendAsync_ReadFromSlowStreamingServer_PartialDataReturned()
return;
}
- if (PlatformDetection.IsFullFramework)
- {
- // Skip test on .NET Framework. It will sometimes not throw TaskCanceledException.
- // Instead it might throw the following top-level and inner exceptions depending
- // on race conditions.
- //
- // System.Net.Http.HttpRequestException : Error while copying content to a stream.
- // ---- System.IO.IOException : The read operation failed, see inner exception.
- //-------- System.Net.WebException : The request was aborted: The request was canceled.
- return;
- }
-
await LoopbackServer.CreateServerAsync(async (server1, url1) =>
{
await LoopbackServer.CreateServerAsync(async (server2, url2) =>
}
[ActiveIssue(37352)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework currently does not allow unicode in DNS names")]
[OuterLoop("Uses external server")]
[Fact]
public async Task GetAsync_UnicodeHostName_SuccessStatusCodeInResponse()
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Doesn't send content for get requests")]
[ActiveIssue(29802, TargetFrameworkMonikers.Uap)]
[Fact]
public async Task GetAsync_ExpectContinueTrue_NoContent_StillSendsHeader()
[MemberData(nameof(Interim1xxStatusCode))]
public async Task SendAsync_1xxResponsesWithHeaders_InterimResponsesHeadersIgnored(HttpStatusCode responseStatusCode)
{
- // Skip test on .NET Framework since it doesn't have the fix.
- if (PlatformDetection.IsFullFramework && (int)responseStatusCode >= 102) return;
-
var clientFinished = new TaskCompletionSource<bool>();
const string TestString = "test";
const string CookieHeaderExpected = "yummy_cookie=choco";
[MemberData(nameof(Interim1xxStatusCode))]
public async Task SendAsync_Unexpected1xxResponses_DropAllInterimResponses(HttpStatusCode responseStatusCode)
{
- // Skip test on .NET Framework since it doesn't have the fix.
- if (PlatformDetection.IsFullFramework && (int)responseStatusCode >= 102) return;
-
var clientFinished = new TaskCompletionSource<bool>();
const string TestString = "test";
[OuterLoop("Uses external server")]
[Theory, MemberData(nameof(EchoServers))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework disposes request content after send")]
[ActiveIssue(31104, TestPlatforms.AnyUnix)]
public async Task PostAsync_ReuseRequestContent_Success(Uri remoteServer)
{
string method,
bool secureServer)
{
- if (PlatformDetection.IsFullFramework && method == "GET")
- {
- // .NET Framework doesn't allow a content body with this HTTP verb.
- // It will throw a System.Net.ProtocolViolation exception.
- return;
- }
-
using (HttpClient client = CreateHttpClient())
{
var request = new HttpRequestMessage(
string method,
bool secureServer)
{
- if (PlatformDetection.IsFullFramework && method == "HEAD")
- {
- // .NET Framework doesn't allow a content body with this HTTP verb.
- // It will throw a System.Net.ProtocolViolation exception.
- return;
- }
-
if (PlatformDetection.IsUap && method == "TRACE")
{
// UAP platform doesn't allow a content body with this HTTP verb.
Assert.Equal(new Version(1, 1), receivedRequestVersion);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Throws exception sending request using Version(0,0)")]
[OuterLoop("Uses external server")]
[Fact]
public async Task SendAsync_RequestVersionNotSpecified_ServerReceivesVersion11Request()
Assert.Equal(new Version(1, 1), receivedRequestVersion);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Specifying Version(2,0) throws exception on netfx")]
[OuterLoop("Uses external server")]
[ConditionalTheory]
[MemberData(nameof(Http2Servers))]
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Specifying Version(2,0) throws exception on netfx")]
[Fact]
public async Task SendAsync_RequestVersion20_HttpNotHttps_NoUpgradeRequest()
{
});
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Specifying Version(2,0) throws exception on netfx")]
[OuterLoop("Uses external server")]
[ConditionalTheory(nameof(IsWindows10Version1607OrGreater)), MemberData(nameof(Http2NoPushServers))]
public async Task SendAsync_RequestVersion20_ResponseVersion20(Uri server)
protected virtual bool UseSocketsHttpHandler => true;
protected virtual bool UseHttp2 => false;
- protected bool IsWinHttpHandler => !UseSocketsHttpHandler && PlatformDetection.IsWindows && !PlatformDetection.IsUap && !PlatformDetection.IsFullFramework;
+ protected bool IsWinHttpHandler => !UseSocketsHttpHandler && PlatformDetection.IsWindows && !PlatformDetection.IsUap;
protected bool IsCurlHandler => !UseSocketsHttpHandler && !PlatformDetection.IsWindows;
- protected bool IsNetfxHandler => PlatformDetection.IsWindows && PlatformDetection.IsFullFramework;
+ protected bool IsNetfxHandler => false;
protected bool IsUapHandler => PlatformDetection.IsWindows && PlatformDetection.IsUap;
public HttpClientHandlerTestBase(ITestOutputHelper output)
{
HttpClientHandler handler;
- if (PlatformDetection.IsUap || PlatformDetection.IsFullFramework || useSocketsHttpHandler)
+ if (PlatformDetection.IsUap || useSocketsHttpHandler)
{
handler = new HttpClientHandler();
}
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "no exception throw on netfx")]
[Theory]
[InlineData(1, 2, true)]
[InlineData(1, 127, true)]
using (var client = new HttpClient(new CustomResponseHandler((r,c) => Task.FromResult(new HttpResponseMessage() { Content = null }))))
{
Assert.Same(string.Empty, await client.GetStringAsync(CreateFakeUri()));
-
- if (PlatformDetection.IsFullFramework)
- {
- Assert.Equal(Array.Empty<byte>(), await client.GetByteArrayAsync(CreateFakeUri()));
- }
- else
- {
- Assert.Same(Array.Empty<byte>(), await client.GetByteArrayAsync(CreateFakeUri()));
- }
-
+ Assert.Same(Array.Empty<byte>(), await client.GetByteArrayAsync(CreateFakeUri()));
Assert.Same(Stream.Null, await client.GetStreamAsync(CreateFakeUri()));
}
}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework disposes request content after send")]
public async Task SendAsync_RequestContentNotDisposed()
{
var content = new ByteArrayContent(new byte[1]);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public async Task ReadAsStringAsync_SetQuotedCharset_ParsesContent()
{
string sourceString = "some string";
public async Task GetAsync_RequestVersion0X_ThrowsOr11(int minorVersion)
{
Type exceptionType = null;
- if (PlatformDetection.IsFullFramework)
- {
- exceptionType = typeof(ArgumentException);
- }
- else if (UseSocketsHttpHandler)
+ if (UseSocketsHttpHandler)
{
exceptionType = typeof(NotSupportedException);
}
public async Task GetAsync_UnknownRequestVersion_ThrowsOrDegradesTo11(int majorVersion, int minorVersion)
{
Type exceptionType = null;
- if (PlatformDetection.IsFullFramework)
- {
- exceptionType = typeof(ArgumentException);
- }
await LoopbackServer.CreateServerAsync(async (server, url) =>
{
[InlineData(7)]
public async Task GetAsync_ResponseUnknownVersion1X_Success(int responseMinorVersion)
{
- bool reportAs11 = PlatformDetection.IsFullFramework;
+ bool reportAs11 = false;
bool reportAs00 = !UseSocketsHttpHandler;
await LoopbackServer.CreateServerAsync(async (server, url) =>
[InlineData(9)]
public async Task GetAsync_ResponseVersion0X_ThrowsOr10(int responseMinorVersion)
{
- bool reportAs10 = PlatformDetection.IsFullFramework;
+ bool reportAs10 = false;
await LoopbackServer.CreateServerAsync(async (server, url) =>
{
public async Task GetAsyncVersion11_BadResponseVersion_ThrowsOr00(int responseMajorVersion, int responseMinorVersion)
{
// Full framework reports 1.0 or 1.1, depending on minor version, instead of throwing
- bool reportAs1X = PlatformDetection.IsFullFramework;
+ bool reportAs1X = false;
// CurlHandler reports these as 0.0, except for 2.0 which is reported as 2.0, instead of throwing.
bool reportAs00 = false;
public async Task GetAsync_ExpectedStatusCodeAndReason_PlatformBehaviorTest(string statusLine,
int expectedStatusCode, string reasonWithSpace, string reasonNoSpace)
{
- if (UseSocketsHttpHandler || PlatformDetection.IsFullFramework)
+ if (UseSocketsHttpHandler)
{
// SocketsHttpHandler and .NET Framework will keep the space characters.
await GetAsyncSuccessHelper(statusLine, expectedStatusCode, reasonWithSpace);
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The following pass on .NET Core but fail on .NET Framework.")]
[InlineData("HTTP/1.1 200", 200, "")] // This test data requires the fix in .NET Framework 4.7.3
[InlineData("HTTP/1.1 200 O\tK", 200, "O\tK")]
[InlineData("HTTP/1.1 200 O \t\t \t\t\t\t \t K", 200, "O \t\t \t\t\t\t \t K")]
[InlineData("HTTP/1.1 200\t")]
public async Task GetAsync_InvalidStatusLine_ThrowsExceptionOnSocketsHttpHandler(string responseString)
{
- if (UseSocketsHttpHandler || PlatformDetection.IsFullFramework)
+ if (UseSocketsHttpHandler)
{
// SocketsHttpHandler and .NET Framework will throw HttpRequestException.
await GetAsyncThrowsExceptionHelper(responseString);
}, new LoopbackServer.Options { StreamWrapper = GetStream });
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Does not support LF-only
[Theory]
[InlineData("\r\n")]
[InlineData("\n")]
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "netfx disposes content when method throws.")]
[Fact]
public void EnsureSuccessStatusCode_NonSuccessStatusCode_ContentIsNotDisposed()
{
public HttpRetryProtocolTests(ITestOutputHelper output) : base(output) { }
[Fact]
- [ActiveIssue(26770, TargetFrameworkMonikers.NetFramework)]
public async Task GetAsync_RetryOnConnectionClosed_Success()
{
if (!IsRetrySupported)
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NETFX has smaller size limits")]
public async Task ReadAsStreamAsync_LargeContent_AllBytesRead()
{
var form = new MultipartFormDataContent();
using (Stream s = await mc.ReadAsStreamAsync())
{
Assert.True(s.CanRead);
- Assert.Equal(PlatformDetection.IsFullFramework, s.CanWrite);
+ Assert.Equal(false, s.CanWrite);
Assert.True(s.CanSeek);
AssertExtensions.Throws<ArgumentNullException>("buffer", null, () => s.Read(null, 0, 0));
AssertExtensions.Throws<ArgumentException>("buffer", null, () => { s.ReadAsync(new byte[1], 1, 1); });
AssertExtensions.Throws<ArgumentOutOfRangeException>("value", () => s.Position = -1);
-
- // NETFX is not throwing exceptions but probably should since the stream should be considered read-only.
- if (!PlatformDetection.IsFullFramework)
- {
- AssertExtensions.Throws<ArgumentOutOfRangeException>("value", () => s.Seek(-1, SeekOrigin.Begin));
- AssertExtensions.Throws<ArgumentOutOfRangeException>("origin", () => s.Seek(0, (SeekOrigin)42));
- Assert.Throws<NotSupportedException>(() => s.Write(new byte[1], 0, 0));
- Assert.Throws<NotSupportedException>(() => s.Write(new Span<byte>(new byte[1], 0, 0)));
- Assert.Throws<NotSupportedException>(() => { s.WriteAsync(new byte[1], 0, 0); });
- Assert.Throws<NotSupportedException>(() => s.SetLength(1));
- }
+ AssertExtensions.Throws<ArgumentOutOfRangeException>("value", () => s.Seek(-1, SeekOrigin.Begin));
+ AssertExtensions.Throws<ArgumentOutOfRangeException>("origin", () => s.Seek(0, (SeekOrigin)42));
+ Assert.Throws<NotSupportedException>(() => s.Write(new byte[1], 0, 0));
+ Assert.Throws<NotSupportedException>(() => s.Write(new Span<byte>(new byte[1], 0, 0)));
+ Assert.Throws<NotSupportedException>(() => { s.WriteAsync(new byte[1], 0, 0); });
+ Assert.Throws<NotSupportedException>(() => s.SetLength(1));
}
}
public PlatformHandler_IdnaProtocolTests(ITestOutputHelper output) : base(output) { }
protected override bool UseSocketsHttpHandler => false;
// WinHttp on Win7 does not support IDNA
- protected override bool SupportsIdna => !PlatformDetection.IsWindows7 && !PlatformDetection.IsFullFramework;
+ protected override bool SupportsIdna => !PlatformDetection.IsWindows7;
}
public sealed class PlatformHandler_HttpRetryProtocolTests : HttpRetryProtocolTests
public PostScenarioTest(ITestOutputHelper output) : base(output) { }
[ActiveIssue(30057, TargetFrameworkMonikers.Uap)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework disposes request content after send")]
[OuterLoop("Uses external servers")]
[Theory, MemberData(nameof(EchoServers))]
public async Task PostRewindableStreamContentMultipleTimes_StreamContentFullySent(Uri serverUri)
[OuterLoop("Uses external servers")]
[Theory, MemberData(nameof(VerifyUploadServers))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "netfx behaves differently and will buffer content and use 'Content-Length' semantics")]
[SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WinRT behaves differently and will use 'Content-Length' semantics")]
public async Task PostUsingNoSpecifiedSemantics_UsesChunkedSemantics(Uri serverUri)
{
<DefineConstants>$(DefineConstants);SYSNETHTTP_NO_OPENSSL</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonPath)\Interop\Unix\Interop.Libraries.cs" Condition="'$(TargetsUnix)' == 'true'">
<Link>Common\System\Net\Http\HuffmanDecoder.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netstandard'">
- <Compile Include="$(CommonTestPath)\System\IO\StreamSpanExtensions.netstandard.cs">
- <Link>Common\System\IO\StreamSpanExtensions.netstandard.cs</Link>
- </Compile>
- </ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'uap'">
<Reference Include="Windows" />
<Compile Include="MultiInterfaceNonRewindableReadOnlyStream.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
- netstandard-OSX;
- netstandard-Unix;
+ netcoreapp-Windows_NT;
+ netcoreapp-OSX;
+ netcoreapp-Unix;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
await ValidateValidUser();
}
- [ActiveIssue(19967, TargetFrameworkMonikers.NetFramework)]
[Theory]
[MemberData(nameof(BasicAuthenticationHeader_TestData))]
public async Task BasicAuthentication_InvalidRequest_SendsStatusCodeClient(string header, HttpStatusCode statusCode)
yield return new object[] { "abc", HttpStatusCode.InternalServerError };
}
- [ActiveIssue(19967, TargetFrameworkMonikers.NetFramework)]
[ConditionalTheory(nameof(Helpers) + "." + nameof(Helpers.IsWindowsImplementation))] // [ActiveIssue(20098, TestPlatforms.Unix)]
[InlineData("ExampleRealm")]
[InlineData(" ExampleRealm ")]
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core fixes a bug where HttpListenerPrefixCollection.CopyTo(null) throws an NRE.")]
public void CopyTo_NullArray_ThrowsArgumentNullExceptionOnNetCore()
{
var listener = new HttpListener();
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, ".NET Core fixes a bug where HttpListenerPrefixCollection.CopyTo(null) throws an NRE.")]
- public void CopyTo_NullArray_ThrowsNullReferenceExceptionOnNetFx()
- {
- var listener = new HttpListener();
- Assert.Throws<NullReferenceException>(() => listener.Prefixes.CopyTo((Array)null, 0));
- Assert.Throws<NullReferenceException>(() => listener.Prefixes.CopyTo(null, 0));
- }
-
- [Fact]
public void CopyTo_MultidimensionalArray_ThrowsIndexOutOfRangeException()
{
var listener = new HttpListener();
yield return new object[] { "http://\\/" };
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Issue #19619
[Theory]
[MemberData(nameof(InvalidPrefix_TestData))]
public void Add_InvalidPrefixNotStarted_ThrowsHttpListenerExceptionOnStart(string uriPrefix)
Assert.Throws<HttpListenerException>(() => listener.Start());
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Issue #19619
[Theory]
[MemberData(nameof(InvalidPrefix_TestData))]
public void Add_InvalidPrefixAlreadyStarted_ThrowsHttpListenerExceptionOnAdd(string uriPrefix)
yield return new object[] { "Unknown-Header: Test", Encoding.Default };
- if (!PlatformDetection.IsFullFramework)
- {
- // .NET Framework wrongly uses ' ' and ',' as delimiter for parsing Content-Type header.
- // "charset=unicode;" will be parsed as "unicode;" for charSet parameter. Then the following GetEncoding(charSet)
- // will fail with ArgumentException. In this case, Encoding.Default will be chosen for ContentEncoding,
- // even if client explicitly specifies the Unicode encoding in the header.
- yield return new object[] { "Content-Type:application/json;charset=unicode; boundary=something", Encoding.Unicode };
- yield return new object[] { "Content-Type:application/json;boundary=something; charset=unicode;", Encoding.Unicode };
- yield return new object[] { "Content-Type:application/json;boundary=something; charset=unicode; ", Encoding.Unicode };
- }
+ // .NET Framework wrongly uses ' ' and ',' as delimiter for parsing Content-Type header.
+ // "charset=unicode;" will be parsed as "unicode;" for charSet parameter. Then the following GetEncoding(charSet)
+ // will fail with ArgumentException. In this case, Encoding.Default will be chosen for ContentEncoding,
+ // even if client explicitly specifies the Unicode encoding in the header.
+ yield return new object[] { "Content-Type:application/json;charset=unicode; boundary=something", Encoding.Unicode };
+ yield return new object[] { "Content-Type:application/json;boundary=something; charset=unicode;", Encoding.Unicode };
+ yield return new object[] { "Content-Type:application/json;boundary=something; charset=unicode; ", Encoding.Unicode };
}
[Theory]
}
};
- // Unicode queries are destroyed by HttpListener.
- // [ActiveIssue(19967, TargetFrameworkMonikers.NetFramework)]
- //
- if (!PlatformDetection.IsFullFramework)
+ yield return new object[]
{
- yield return new object[]
+ "?name1=+&name2=\u1234&\u0100=value&name3=\u00FF", new NameValueCollection
{
- "?name1=+&name2=\u1234&\u0100=value&name3=\u00FF", new NameValueCollection
- {
- { "name1", " " },
- { "name2", "á\u0088´" },
- { "Ä\u0080", "value" },
- { "name3", "ÿ" }
- }
- };
- }
+ { "name1", " " },
+ { "name2", "á\u0088´" },
+ { "Ä\u0080", "value" },
+ { "name3", "ÿ" }
+ }
+ };
yield return new object[] { "", new NameValueCollection() };
yield return new object[] { "?", new NameValueCollection() };
144, "Set-Cookie: name=value", null
};
- if (!PlatformDetection.IsFullFramework)
+ yield return new object[]
{
- yield return new object[]
+ new CookieCollection()
{
- new CookieCollection()
- {
- new Cookie("foo bar", "value")
- },
- 147, "Set-Cookie: foo bar=value", null
- };
- }
+ new Cookie("foo bar", "value")
+ },
+ 147, "Set-Cookie: foo bar=value", null
+ };
yield return new object[]
{
uint[] timeouts = new uint[6];
// We need url group id which is private so we get it using reflection.
- string urlGroupIdName = PlatformDetection.IsFullFramework ? "m_UrlGroupId" : "_urlGroupId";
+ string urlGroupIdName = "_urlGroupId";
FieldInfo info = typeof(HttpListener).GetField(urlGroupIdName, BindingFlags.Instance | BindingFlags.NonPublic);
ulong urlGroupId = (ulong)info.GetValue(_listener);
{
// [ActiveIssue(20392, TargetFrameworkMonikers.Netcoreapp)]
string expectedStatusDescription = statusDescription;
- if (!PlatformDetection.IsFullFramework && statusDescription == null)
+ if (statusDescription == null)
{
expectedStatusDescription = string.Empty;
}
{
// [ActiveIssue(20392, TargetFrameworkMonikers.Netcoreapp)]
string expectedStatusDescription = statusDescription;
- if (!PlatformDetection.IsFullFramework && statusDescription == null)
+ if (statusDescription == null)
{
expectedStatusDescription = string.Empty;
}
<ProjectGuid>{851A40FE-7F07-415D-8592-5FE2096E84D3}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StringResourcesPath>../src/Resources/Strings.resx</StringResourcesPath>
- <Configurations>netstandard-OSX-Debug;netstandard-OSX-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="GetContextHelper.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void Set_EmptyName_Throws()
{
AssertExtensions.Throws<ArgumentException>("name", () => mail.Headers.Set(string.Empty, "value"));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void Set_EmptyValue_Throws()
{
AssertExtensions.Throws<ArgumentException>("value", () => mail.Headers.Set("name", string.Empty));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void Add_EmptyName_Throws()
{
AssertExtensions.Throws<ArgumentException>("name", () => mail.Headers.Add(string.Empty, "value"));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void Add_EmptyValue_Throws()
{
AssertExtensions.Throws<ArgumentException>("value", () => mail.Headers.Add("name", string.Empty));
public class LoggingTest
{
[Fact]
- [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
public void EventSource_ExistsWithCorrectId()
{
Type esType = typeof(SmtpClient).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false);
}
[Fact]
- [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
public void EventSource_EventsRaisedAsExpected()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "MailWriter is reflection blocked.")]
public void SentSpecialLengthMailAttachment_Base64Decode_Success()
{
// The special length follows pattern: (3N - 1) * 0x4400 + 1
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[Fact]
public void ServicePoint_NetCoreApp_AddressIsAccessible()
{
}
}
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- [Fact]
- public void ServicePoint_NetFramework_AddressIsInaccessible()
- {
- using (var smtp = new SmtpClient("localhost", 25))
- {
- ServicePoint sp = smtp.ServicePoint;
- Assert.Throws<NotSupportedException>(() => sp.Address);
- }
- }
-
[Fact]
public void ServicePoint_ReflectsHostAndPortChange()
{
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework has a bug and could hang in case of null or empty body")]
[Theory]
[InlineData("howdydoo")]
[InlineData("")]
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NETFX doesn't have the fix for encoding")]
[Theory]
[InlineData(false, false, false)]
[InlineData(false, false, true)] // Received subjectText.
<PropertyGroup>
<ProjectGuid>{A26D88B7-6EF6-4C8C-828B-7B57732CCE38}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AlternateViewCollectionTest.cs" />
public class NTAuthenticationStubTests
{
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Requires internal Reflection (NTAuthentication)")]
public void TestReflectedTypes()
{
Assert.NotNull(NTAuthentication.s_type);
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
- netstandard-Unix;
+ uap-Windows_NT;
+ netcoreapp-Windows_NT;
+ netcoreapp-Unix;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
public static class LoggingTest
{
[Fact]
- [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
public static void EventSource_ExistsWithCorrectId()
{
Type esType = typeof(Dns).GetTypeInfo().Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false);
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{4FE5ECEE-ACC5-4558-A946-573426599B73}</ProjectGuid>
- <Configurations>netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="GetHostByAddressTest.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
public class LoggingTest
{
[Fact]
- [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
public void EventSource_ExistsWithCorrectId()
{
Type esType = typeof(NetworkChange).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false);
Assert.Equal(addressBytes, expectedBytes);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "netfx doesn't have fix #32724")]
[Theory]
[InlineData("F")]
[InlineData("M0")]
<ProjectGuid>{DCBB8805-4658-44BF-B5E8-B6714EC8936B}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StringResourcesPath>../../src/Resources/Strings.resx</StringResourcesPath>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<!-- Shared code with src assembly -->
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Unix;
- netstandard-Windows_NT;
+ netcoreapp-Unix;
+ netcoreapp-Windows_NT;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
public class LoggingTest
{
[Fact]
- [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
public void EventSource_ExistsWithCorrectId()
{
Type esType = typeof(Ping).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false);
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{43CE20B7-389B-41BB-8390-447521DF3BD4}</ProjectGuid>
- <Configurations>netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<!-- Test APIs introduced after 1.0 -->
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Unix;
- netstandard-Windows_NT;
+ uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
[Theory]
[InlineData(true)]
[InlineData(false)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // .NET Framework will not perform domainTable clean up.
public static void AddCookies_CapacityReached_OldCookiesRemoved(bool isFromSameDomain)
{
const int Capacity = 10;
c.Value = null;
Assert.Equal(string.Empty, c.Value);
}
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] // Cookie.Value returns null on full framework, empty string on .NETCore
- public static void Value_PassNullToCtor_GetReturnsEmptyString_net46()
- {
- var cookie = new Cookie("SomeName", null);
- // Cookie.Value returns null on full framework.
- Assert.Null(cookie.Value);
- }
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Cookie.Value returns null on full framework, empty string on .NETCore
public static void Value_PassNullToCtor_GetReturnsEmptyString()
{
var cookie = new Cookie("SomeName", null);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // IPAddress.Value can be set on full framework
public static void Address_ReadOnlyStatics_Set_Failure()
{
Assert.Throws<SocketException>(() => IPAddress.Any.Address = MaxAddress - 1);
public class LoggingTest
{
[Fact]
- [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
public void EventSource_ExistsWithCorrectId()
{
Type esType = typeof(IPAddress).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false);
}
[Fact]
- [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
public void EventSource_EventsRaisedAsExpected()
{
RemoteExecutor.Invoke(() =>
<PropertyGroup>
<ProjectGuid>{E671BC9F-A64C-4504-8B00-7A3215B99AF9}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CookieTest.cs" />
[Theory]
[MemberData(nameof(SetCookiesData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void SetCookies_Success(Uri uri, string cookieHeader, Cookie[] expected)
{
CookieContainer cc = CreateCount11Container();
{
public class AuthenticationManagerTest
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "AuthenticationManager supported on NETFX")]
[Fact]
public void Authenticate_NotSupported()
{
int count = 0;
IEnumerator modules = AuthenticationManager.RegisteredModules;
while (modules.MoveNext()) count++;
- Assert.Equal(PlatformDetection.IsFullFramework ? 5 : 0, count);
+ Assert.Equal(0, count);
}
[Fact]
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
public abstract class AsyncFileWebRequestTestBase : FileWebRequestTestBase
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Concurrent read/write only supported on .NET Core via PR 12231")]
[Fact]
public async Task ConcurrentReadWrite_ResponseBlocksThenGetsNullStream()
{
#pragma warning disable 0618 //GlobalProxySelection is Deprecated.
Assert.NotNull(GlobalProxySelection.Select);
- if (!PlatformDetection.IsFullFramework)
- {
- // On .NET Framework, the default value for Select property
- // is an internal WebRequest.WebProxyWrapper object which
- // works similarly to DefaultWebProxy but is not the same object.
- Assert.Equal(GlobalProxySelection.Select, WebRequest.DefaultWebProxy);
- }
+ // On .NET Framework, the default value for Select property
+ // is an internal WebRequest.WebProxyWrapper object which
+ // works similarly to DefaultWebProxy but is not the same object.
+ Assert.Equal(GlobalProxySelection.Select, WebRequest.DefaultWebProxy);
#pragma warning restore 0618
WebRequest.DefaultWebProxy = myProxy;
Assert.Equal(HttpWebRequest.DefaultMaximumResponseHeadersLength, 64);
Assert.NotNull(HttpWebRequest.DefaultCachePolicy);
Assert.Equal(HttpWebRequest.DefaultCachePolicy.Level, RequestCacheLevel.BypassCache);
- Assert.Equal(PlatformDetection.IsFullFramework ? 64 : 0, HttpWebRequest.DefaultMaximumErrorResponseLength);
+ Assert.Equal(0, HttpWebRequest.DefaultMaximumErrorResponseLength);
Assert.NotNull(request.Proxy);
Assert.Equal(remoteServer, request.RequestUri);
Assert.True(request.SupportsCookieContainer);
Assert.False(request.AllowReadStreamBuffering);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "not supported on .NET Framework")]
[Theory, MemberData(nameof(EchoServers))]
public void AllowReadStreamBuffering_SetTrueThenGet_ExpectTrue(Uri remoteServer)
{
Assert.False(request.PreAuthenticate);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #19225")]
[Theory, MemberData(nameof(EchoServers))]
public void PreAuthenticate_SetAndGetBooleanResponse_ValuesMatch(Uri remoteServer)
{
[Theory]
[MemberData(nameof(Dates_ReadValue_Data))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework,
- "Net Framework currently retains the custom date parsing that retains some bugs (mostly related to offset), and also prevents setting the raw header value")]
public void IfModifiedSince_ReadValue(string raw, DateTime expected)
{
HttpWebRequest request = WebRequest.CreateHttp("http://localhost");
[Theory]
[MemberData(nameof(Dates_Invalid_Data))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework,
- "Net Framework currently retains the custom date parsing that accepts a wider range of values, and also prevents setting the raw header value")]
public void IfModifiedSince_InvalidValue(string invalid)
{
HttpWebRequest request = WebRequest.CreateHttp("http://localhost");
[Theory]
[MemberData(nameof(Dates_ReadValue_Data))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework,
- "Net Framework currently retains the custom date parsing that retains some bugs (mostly related to offset), and also prevents setting the raw header value")]
public void Date_ReadValue(string raw, DateTime expected)
{
HttpWebRequest request = WebRequest.CreateHttp("http://localhost");
[Theory]
[MemberData(nameof(Dates_Invalid_Data))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework,
- "Net Framework currently retains the custom date parsing that accepts a wider range of values, and also prevents setting the raw header value")]
public void Date_InvalidValue(string invalid)
{
HttpWebRequest request = WebRequest.CreateHttp("http://localhost");
[Theory, MemberData(nameof(EchoServers))]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "no exception thrown on mono")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "no exception thrown on netfx")]
public void BeginGetRequestStream_CreatePostRequestThenCallTwice_ThrowsInvalidOperationException(Uri remoteServer)
{
HttpWebRequest request = HttpWebRequest.CreateHttp(remoteServer);
using (request.EndGetRequestStream(request.BeginGetRequestStream(null, null), out context))
{
- if (PlatformDetection.IsFullFramework)
- {
- Assert.NotNull(context);
- }
- else
- {
- Assert.Null(context);
- }
+ Assert.Null(context);
}
return Task.FromResult<object>(null);
[ActiveIssue(19083)]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "dotnet/corefx #19083")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #19083")]
[Fact]
public async Task Abort_BeginGetRequestStreamThenAbort_EndGetRequestStreamThrowsWebException()
{
}
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "ResponseCallback not called after Abort on mono")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "ResponseCallback not called after Abort on netfx")]
[Fact]
public async Task Abort_BeginGetResponseThenAbort_ResponseCallbackCalledBeforeAbortReturns()
{
WebResponse response = await getResponse;
HttpWebResponse httpResponse = (HttpWebResponse)response;
httpResponse.Close();
- if (PlatformDetection.IsFullFramework)
+
+ // TODO: Issue #18851. Investigate .NET Core to see if it can
+ // match .NET Framework.
+ Assert.Throws<ObjectDisposedException>(() =>
{
- Stream stream = httpResponse.GetResponseStream();
- }
- else
- {
- // TODO: Issue #18851. Investigate .NET Core to see if it can
- // match .NET Framework.
- Assert.Throws<ObjectDisposedException>(() =>
- {
- httpResponse.GetResponseStream();
- });
- }
+ httpResponse.GetResponseStream();
+ });
});
}
BinaryFormatter formatter = new BinaryFormatter();
HttpWebResponse hwr = (HttpWebResponse)response;
- if (PlatformDetection.IsFullFramework)
- {
- formatter.Serialize(fs, hwr);
- }
- else
- {
- // HttpWebResponse is not serializable on .NET Core.
- Assert.Throws<SerializationException>(() => formatter.Serialize(fs, hwr));
- }
+ // HttpWebResponse is not serializable on .NET Core.
+ Assert.Throws<SerializationException>(() => formatter.Serialize(fs, hwr));
}
}
});
[Theory]
[MemberData(nameof(Dates_ReadValue_Data))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework,
- "Net Framework currently retains the custom date parsing that retains some bugs (mostly related to offset)")]
public async Task LastModified_ReadValue(string raw, DateTime expected)
{
await LoopbackServer.CreateServerAsync(async (server, url) =>
[Theory]
[MemberData(nameof(Dates_Now_Invalid_Data))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework,
- "Net Framework currently retains the custom date parsing that accepts a wider range of values")]
public async Task LastModified_InvalidValue(string invalid)
{
await LoopbackServer.CreateServerAsync(async (server, url) =>
public class LoggingTest
{
[Fact]
- [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "NetEventSource is only part of .NET Core.")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
public void EventSource_ExistsWithCorrectId()
{
Type esType = typeof(WebRequest).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false);
});
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "cancellation token ignored on netfx")]
[Fact]
public async Task FlushAsync_TokenIsCanceled_TaskIsCanceled()
{
<ProjectGuid>{E520B5FD-C6FF-46CF-8079-6C8098013EA3}</ProjectGuid>
<StringResourcesPath>../src/Resources/Strings.resx</StringResourcesPath>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
</PropertyGroup>
<ItemGroup>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "CI uses old Framework version, which doesn't support using SslProtocols.None for default system behavior")]
public async Task ClientAsyncAuthenticate_SslStreamClientServerNone_UseStrongCryptoSet()
{
SslProtocols protocol = SslProtocols.None;
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Unix;
- netstandard-Windows_NT;
- netstandard-OSX;
+ uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
netcoreapp-OSX;
public class LoggingTest
{
[Fact]
- [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
public void EventSource_ExistsWithCorrectId()
{
Type esType = typeof(SslStream).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false);
}
[Fact]
- [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
public void EventSource_EventsRaisedAsExpected()
{
RemoteExecutor.Invoke(() =>
}
[ConditionalFact(nameof(IsNtlmInstalled))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core difference in behavior: https://github.com/dotnet/corefx/issues/5241")]
public async Task NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails()
{
string targetName = "testTargetName";
}
[ConditionalFact(nameof(IsNtlmInstalled))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Relies on FlushAsync override not available in desktop")]
public void NegotiateStream_StreamToStream_FlushAsync_Propagated()
{
VirtualNetwork network = new VirtualNetwork();
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework does not recover well from underlying stream failures")]
[Fact]
public async Task Read_CorrectlyUnlocksAfterFailure()
{
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Relies on FlushAsync override not available in desktop")]
public void SslStream_StreamToStream_FlushAsync_Propagated()
{
VirtualNetwork network = new VirtualNetwork();
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "ReadAsyncs on netfx aren't cancelable after they start.")]
[Fact]
public async Task ReadAsync_CanceledAfterStart_ThrowsOperationCanceledException()
{
<PropertyGroup>
<ProjectGuid>{A55A2B9A-830F-4330-A0E7-02A9FB30ABD2}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-OSX-Debug;netstandard-OSX-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetsUnix)' == 'true' ">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)'=='netcoreapp'">
- <!-- TODO #13070: Add net463 to the condition after the TFM gets updated to the actual .NET Framework 4.7-->
<Compile Include="..\..\src\System\Net\Security\SniHelper.cs">
<Link>src\SniHelper.cs</Link>
</Compile>
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop default SecurityProtocol to Ssl3; explicitly changed to SystemDefault for core.")]
public static void SecurityProtocol_Roundtrips()
{
RemoteExecutor.Invoke(() =>
}).Dispose();
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Ssl3 is supported by desktop but explicitly not by core")]
[Fact]
public static void SecurityProtocol_Ssl3_NotSupported()
{
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop ServicePoint lifetime is slightly longer due to implementation details of real implementation")]
public static void FindServicePoint_Collectible()
{
RemoteExecutor.Invoke(() =>
<PropertyGroup>
<ProjectGuid>{DC3BBD1F-37C8-40B2-B248-E12E8D0D146B}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ServicePointManagerTest.cs" />
}
}
- [ActiveIssue(22808, TargetFrameworkMonikers.NetFramework)]
[ActiveIssue(17209, TestPlatforms.AnyUnix)]
[OuterLoop] // TODO: Issue #11345
[Theory]
Assert.Throws<ArgumentOutOfRangeException>(() => Socket.Select(null, null, largeList, -1));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in AcceptAsync that dereferences null SAEA argument")]
[Fact]
public void AcceptAsync_NullAsyncEventArgs_Throws_ArgumentNull()
{
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in ReceiveAsync that dereferences null SAEA argument")]
[Fact]
public void ConnectAsync_NullAsyncEventArgs_Throws_ArgumentNull()
{
Assert.Throws<NotSupportedException>(() => GetSocket(AddressFamily.InterNetwork).ConnectAsync(eventArgs));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in ConnectAsync that dereferences null SAEA argument")]
[Fact]
public void ConnectAsync_Static_NullAsyncEventArgs_Throws_ArgumentNull()
{
Assert.Throws<ArgumentNullException>(() => Socket.ConnectAsync(SocketType.Stream, ProtocolType.Tcp, s_eventArgs));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in ReceiveAsync that dereferences null SAEA argument")]
[Fact]
public void ReceiveAsync_NullAsyncEventArgs_Throws_ArgumentNull()
{
Assert.Throws<ArgumentNullException>(() => GetSocket().ReceiveAsync(null));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in ReceiveFromAsync that dereferences null SAEA argument")]
[Fact]
public void ReceiveFromAsync_NullAsyncEventArgs_Throws_ArgumentNull()
{
AssertExtensions.Throws<ArgumentException>("RemoteEndPoint", () => GetSocket(AddressFamily.InterNetwork).ReceiveFromAsync(eventArgs));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in ReceiveMessageFromAsync that dereferences null SAEA argument")]
[Fact]
public void ReceiveMessageFromAsync_NullAsyncEventArgs_Throws_ArgumentNull()
{
AssertExtensions.Throws<ArgumentException>("RemoteEndPoint", () => GetSocket(AddressFamily.InterNetwork).ReceiveMessageFromAsync(eventArgs));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in SendAsync that dereferences null SAEA argument")]
[Fact]
public void SendAsync_NullAsyncEventArgs_Throws_ArgumentNull()
{
Assert.Throws<ArgumentNullException>(() => GetSocket().SendAsync(null));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in SendPacketsAsync that dereferences null SAEA argument")]
[Fact]
public void SendPacketsAsync_NullAsyncEventArgs_Throws_ArgumentNull()
{
Assert.Throws<ArgumentNullException>(() => GetSocket().SendPacketsAsync(null));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in SendPacketsAsync that dereferences null SAEA.SendPacketsElements")]
[Fact]
public void SendPacketsAsync_NullSendPacketsElements_Throws_ArgumentNull()
{
Assert.Throws<NotSupportedException>(() => GetSocket().SendPacketsAsync(eventArgs));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in SendToAsync that dereferences null SAEA argument")]
[Fact]
public void SendToAsync_NullAsyncEventArgs_Throws_ArgumentNull()
{
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
- netstandard-Unix;
+ uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
Assert.Contains(e.SocketErrorCode, new[] { SocketError.AccessDenied, SocketError.ProtocolNotSupported });
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Sockets are still inheritable on netfx: https://github.com/dotnet/corefx/pull/32903")]
[Theory]
[InlineData(true, 0)] // Accept
[InlineData(false, 0)]
{
public class IPPacketInformationTest
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in IPPacketInformation.Equals that dereferences null address")]
[Fact]
public void Equals_DefaultValues_Success()
{
Assert.False(default(IPPacketInformation) != default(IPPacketInformation));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in IPPacketInformation.GetHashCode that dereferences null address")]
[Fact]
public void GetHashCode_DefaultValues_Success()
{
}
[Fact]
- [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
public static void EventSource_ExistsWithCorrectId()
{
Type esType = typeof(Socket).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false);
[OuterLoop]
[Fact]
- [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
public void EventSource_EventsRaisedAsExpected()
{
RemoteExecutor.Invoke(() =>
});
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Optimized .NET Core CopyToAsync doesn't use Begin/EndRead, skipping code that throws ObjectDisposedException on netfx")]
[Fact]
public async Task CopyToAsync_DisposedSourceStream_ThrowsOnWindows_NoThrowOnUnix()
{
#pragma warning restore
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "SupportsIPv6 factors in config data")]
[Fact]
public void SupportsIPv6_MatchesOSSupportsIPv6()
{
#pragma warning restore
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[Fact]
public void UseOnlyOverlappedIO_AlwaysFalse()
{
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in SendPacketsAsync that dereferences null SAEA argument")]
[OuterLoop] // TODO: Issue #11345
[Theory]
[InlineData(SocketImplementationType.APM)]
});
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in SendPacketsAsync that dereferences null m_SendPacketsElementsInternal array")]
[OuterLoop] // TODO: Issue #11345
[Theory]
[InlineData(SocketImplementationType.APM)]
[Theory]
[InlineData(SocketImplementationType.APM)]
[InlineData(SocketImplementationType.Async)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in corefx that is not in netfx. See https://github.com/dotnet/corefx/pull/34331")]
public void SendPacketsElement_FileStreamIsReleasedOnError(SocketImplementationType type)
{
// this test checks that FileStreams opened by the implementation of SendPacketsAsync
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "SAEA left in unusable state after failed BeginGetHostAddresses on netfx")]
[Fact]
public async Task SocketConnectAsync_IPAddressAny_SocketAsyncEventArgsReusableAfterFailure()
{
{
public class SocketInformationTest
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[Fact]
public void Socket_Ctor_DuplicateAndClose_Throw()
{
<ProjectGuid>{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Accept.cs" />
<Compile Include="Connect.cs" />
<Compile Include="Close.cs" />
<Compile Include="CreateSocketTests.cs" />
- <Compile Include="CreateSocketTests.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="CreateSocketTests.netcoreapp.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
<Compile Include="DisposedSocketTests.cs" />
<Compile Include="DnsEndPointTest.cs" />
<Compile Include="DualModeSocketTest.cs" />
<Compile Include="ExecutionContextFlowTest.cs" />
- <Compile Include="ExecutionContextFlowTest.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="ExecutionContextFlowTest.netcoreapp.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
<Compile Include="IPPacketInformationTest.cs" />
- <Compile Include="KeepAliveTest.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="KeepAliveTest.netcoreapp.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
<Compile Include="LingerStateTest.cs" />
<Compile Include="LoggingTest.cs" />
<Compile Include="NetworkStreamTest.cs" />
- <Compile Include="NetworkStreamTest.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="NetworkStreamTest.netcoreapp.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
<Compile Include="ReceiveMessageFrom.cs" />
<Compile Include="ReceiveMessageFromAsync.cs" />
<Compile Include="SelectTest.cs" />
<Compile Include="SendPacketsAsync.cs" />
- <Compile Include="SendPacketsAsync.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="SendPacketsAsync.netcoreapp.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
<Compile Include="SendPacketsElementTest.cs" />
<Compile Include="SendFile.cs" />
<Compile Include="OSSupport.cs" />
- <Compile Include="SendPacketsElementTest.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="SendPacketsElementTest.netcoreapp.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
<Compile Include="SendReceive.cs" />
- <Compile Include="SendReceive.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="SendReceive.netcoreapp.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
<Compile Include="SocketTestHelper.cs" />
- <Compile Include="SocketTestHelper.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="SocketTestHelper.netcoreapp.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
<Compile Include="SelectAndPollTests.cs" />
<Compile Include="SocketInformationTest.cs" />
<Compile Include="TcpListenerTest.cs" />
<Compile Include="TcpClientTest.cs" />
<Compile Include="Shutdown.cs" />
<Compile Include="SocketAsyncEventArgsTest.cs" />
- <Compile Include="SocketAsyncEventArgsTest.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="SocketAsyncEventArgsTest.netcoreapp.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
<Compile Include="SocketOptionNameTest.cs" />
<Compile Include="SocketOptionNameTest.Unix.cs" Condition="'$(TargetsUnix)' == 'true'" />
<Compile Include="SocketOptionNameTest.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
<Compile Include="MulticastOptionTest.cs" />
<Compile Include="UdpClientTest.cs" />
- <Compile Include="UnixDomainSocketTest.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="UnixDomainSocketTest.netcoreapp.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
<!-- Common Sockets files -->
<Compile Include="$(CommonTestPath)\System\Net\Configuration.cs">
<Link>SocketCommon\Configuration.cs</Link>
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in Connected that dereferences null Client socket")]
[OuterLoop] // TODO: Issue #11345
[Fact]
public void ConnectedAvailable_NullClient()
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in ExclusiveAddressUse that dereferences null Client socket")]
[OuterLoop] // TODO: Issue #11345
[Fact]
public void ExclusiveAddressUse_NullClient()
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in TcpClient.Dispose/EndConnect: the former nulls out Client, which the latter tries to use")]
[OuterLoop] // TODO: Issue #11345
[Theory]
[InlineData(false)]
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void BeginSend_IPv6Socket_IPv4Dns_Success()
{
using (var receiver = new UdpClient("127.0.0.1", DiscardPort))
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
- netstandard-Unix;
+ netcoreapp-Windows_NT;
+ netcoreapp-Unix;
+ uap-Windows_NT
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}</ProjectGuid>
- <Configurations>netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="SocketPerformanceAsyncTests.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{D2348221-084D-4076-91BF-C24D28E7D386}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
{
public class WebHeaderCollectionLoggingTest
{
- [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "NetEventSource is only part of .NET Core")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core")]
public void EventSource_ExistsWithCorrectId()
{
Type esType = typeof(WebHeaderCollection).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false);
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{F8C21EE8-B271-4014-B9D9-B2C31520AF3F}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="WebHeaderCollectionTest.cs" />
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Does not work in Mono")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void GetValues_MultipleSetCookieHeadersWithExpiresAttribute_Success()
{
WebHeaderCollection w = new WebHeaderCollection();
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Does not work in Mono")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void GetValues_SingleSetCookieHeaderWithMultipleCookiesWithExpiresAttribute_Success()
{
WebHeaderCollection w = new WebHeaderCollection();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void GetValues_MultipleSetCookieHeadersWithNoAttribute_Success()
{
WebHeaderCollection w = new WebHeaderCollection();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void GetValues_SingleSetCookieHeaderWithMultipleCookiesWithNoAttribute_Success()
{
WebHeaderCollection w = new WebHeaderCollection();
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Does not work in Mono")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void GetValues_InvalidSetCookieHeader_Success()
{
WebHeaderCollection w = new WebHeaderCollection();
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{0DB204CE-1CB8-4CC2-A2E3-43DA93DC898B}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="WebProxyTest.cs" />
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Not yet fixed in the .NET framework")]
public static void WebProxy_BypassOnLocal_ConfiguredToNotBypassLocal()
{
Assert.False(new WebProxy("microsoft", BypassOnLocal: false).IsBypassed(new Uri($"http://{IPAddress.Loopback}")));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void WebProxy_GetDefaultProxy_NotSupported()
{
#pragma warning disable 0618 // obsolete method
}, server);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Cancellation sometimes throw wrong exceptions, dotnet/corefx #28777")]
[OuterLoop("Uses external servers")]
[ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))]
public async Task CloseAsync_Cancel_Success(Uri server)
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Cancellation sometimes throw wrong exceptions, dotnet/corefx #26635")]
[OuterLoop("Uses external servers")]
[ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))]
public async Task ReceiveAsync_ReceiveThenCancel_ThrowsOperationCanceledException(Uri server)
{
// Recreate the minimum WebSocket buffer size values from the .NET Framework version of WebSocket,
// and pick the correct name of the buffer used when throwing an ArgumentOutOfRangeException.
- int minSendBufferSize = PlatformDetection.IsFullFramework ? 16 : 1;
- int minReceiveBufferSize = PlatformDetection.IsFullFramework ? 256 : 1;
- string bufferName = PlatformDetection.IsFullFramework ? "internalBuffer" : "buffer";
+ int minSendBufferSize = 1;
+ int minReceiveBufferSize = 1;
+ string bufferName = "buffer";
var cws = new ClientWebSocket();
InvalidOperationException exception;
using (var tcc = new ThreadCultureChange())
{
- // The .NET Native toolchain optimizes away exception messages.
- if (!PlatformDetection.IsNetNative)
- tcc.ChangeCultureInfo(CultureInfo.InvariantCulture);
+ tcc.ChangeCultureInfo(CultureInfo.InvariantCulture);
exception = await Assert.ThrowsAsync<InvalidOperationException>(
() => cws.CloseOutputAsync(WebSocketCloseStatus.Empty, "", new CancellationToken()));
}
- // The .NET Native toolchain optimizes away exception messages.
- if (!PlatformDetection.IsNetNative)
- {
- string expectedMessage = ResourceHelper.GetExceptionMessage("net_WebSockets_NotConnected");
- Assert.Equal(expectedMessage, exception.Message);
- }
-
+ string expectedMessage = ResourceHelper.GetExceptionMessage("net_WebSockets_NotConnected");
+ Assert.Equal(expectedMessage, exception.Message);
Assert.Equal(WebSocketState.None, cws.State);
}
}
using (var tcc = new ThreadCultureChange())
{
- // The .NET Native toolchain optimizes away exception messages.
- if (!PlatformDetection.IsNetNative)
- tcc.ChangeCultureInfo(CultureInfo.InvariantCulture);
-
+ tcc.ChangeCultureInfo(CultureInfo.InvariantCulture);
exception = await Assert.ThrowsAsync<InvalidOperationException>(
() => cws.ReceiveAsync(segment, ct));
}
- // The .NET Native toolchain optimizes away exception messages.
- if (!PlatformDetection.IsNetNative)
- {
- string expectedMessage = ResourceHelper.GetExceptionMessage("net_WebSockets_NotConnected");
- Assert.Equal(expectedMessage, exception.Message);
- }
-
+ string expectedMessage = ResourceHelper.GetExceptionMessage("net_WebSockets_NotConnected");
+ Assert.Equal(expectedMessage, exception.Message);
Assert.Equal(WebSocketState.None, cws.State);
}
}
InvalidOperationException exception;
using (var tcc = new ThreadCultureChange())
{
- // The .NET Native toolchain optimizes away exception messages.
- if (!PlatformDetection.IsNetNative)
- tcc.ChangeCultureInfo(CultureInfo.InvariantCulture);
-
+ tcc.ChangeCultureInfo(CultureInfo.InvariantCulture);
exception = await Assert.ThrowsAsync<InvalidOperationException>(
() => cws.SendAsync(segment, WebSocketMessageType.Text, false, ct));
}
- // The .NET Native toolchain optimizes away exception messages.
- if (!PlatformDetection.IsNetNative)
- {
- string expectedMessage = ResourceHelper.GetExceptionMessage("net_WebSockets_NotConnected");
- Assert.Equal(expectedMessage, exception.Message);
- }
-
+ string expectedMessage = ResourceHelper.GetExceptionMessage("net_WebSockets_NotConnected");
+ Assert.Equal(expectedMessage, exception.Message);
Assert.Equal(WebSocketState.None, cws.State);
}
}
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
- netstandard-Unix;
netcoreapp-Windows_NT;
netcoreapp-Unix;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
Assert.Equal(WebSocketState.Closed, cws.State);
// .NET Framework and UAP implmentations have different exception message from .NET Core.
- if (!PlatformDetection.IsFullFramework && !PlatformDetection.IsUap)
+ if (!PlatformDetection.IsUap)
{
Assert.Equal(exceptionMessage, ex.Message);
}
}
}
- [ActiveIssue(18784, TargetFrameworkMonikers.NetFramework)]
[OuterLoop("Uses external servers")]
[ConditionalTheory(nameof(WebSocketsSupported))]
public async Task ConnectAsync_AddHostHeader_Success()
public class LoggingTest
{
[Fact]
- [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
public void EventSource_ExistsWithCorrectId()
{
Type esType = typeof(ClientWebSocket).GetTypeInfo().Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false);
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Skip due to bugs in NETFX WebSocket, dotnet/corefx #33401")]
[OuterLoop("Uses external servers")]
[ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))]
public async Task SendAsync_MultipleOutstandingSendOperations_Throws(Uri server)
<PropertyGroup>
<ProjectGuid>{7C395A91-D955-444C-98BF-D3F809A56CE1}</ProjectGuid>
<StringResourcesPath>../src/Resources/Strings.resx</StringResourcesPath>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
</PropertyGroup>
<!-- Do not reference these assemblies from the TargetingPack since we are building part of the source code for tests. -->
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{CF73547B-07D2-4290-A14A-CA2A354F4D21}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Net\WebSockets\WebSocketCreateTest.cs">
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{0887C5AD-1BE1-4898-94CD-FE2104E04A4A}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="WebSocketTests.cs" />
Assert.Equal(Message, wse.Message);
Assert.Same(inner, wse.InnerException);
}
-
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsFullFramework))]
- public void GetObjectData_Success()
- {
- var wse = new WebSocketException();
- wse.GetObjectData(new SerializationInfo(typeof(WebSocketException), new FormatterConverter()), new StreamingContext());
- }
}
}
new MemoryStream(), "subProtocol", 16480, 9856, TimeSpan.FromSeconds(-2), false, WebSocket.CreateClientBuffer(16480, 9856)));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[Fact]
public static void RegisterPrefixes_Unsupported()
{
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void PerspectiveFarPlaneAtInfinityTest()
{
var nearPlaneDistance = 0.125f;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void PerspectiveFieldOfViewFarPlaneAtInfinityTest()
{
var nearPlaneDistance = 0.125f;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void PerspectiveOffCenterFarPlaneAtInfinityTest()
{
var nearPlaneDistance = 0.125f;
Assert.Throws<NullReferenceException>(() => v1.CopyTo(null, 0));
Assert.Throws<ArgumentOutOfRangeException>(() => v1.CopyTo(a, -1));
- Assert.Throws<ArgumentOutOfRangeException>(() => v1.CopyTo(a, a.Length));
-
- if (!PlatformDetection.IsNetNative)
- {
- AssertExtensions.Throws<ArgumentException>(null, () => v1.CopyTo(a, 2));
- }
- else
- {
- // The .NET Native code generation optimizer does aggressive optimizations to range checks
- // which result in an ArgumentOutOfRangeException exception being thrown at runtime.
- Assert.ThrowsAny<ArgumentException>(() => v1.CopyTo(a, 2));
- }
+ Assert.Throws<ArgumentOutOfRangeException>(() => v1.CopyTo(a, a.Length));
+ AssertExtensions.Throws<ArgumentException>(null, () => v1.CopyTo(a, 2));
v1.CopyTo(a, 1);
v1.CopyTo(b);
// A test for Clamp (Vector2f, Vector2f, Vector2f)
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void Vector2ClampTest()
{
Vector2 a = new Vector2(0.5f, 0.3f);
Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value.");
}
- // A test for Clamp (Vector2f, Vector2f, Vector2f) for netfx only
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void Vector2ClampTestFX()
- {
- Vector2 a = new Vector2(0.5f, 0.3f);
- Vector2 min = new Vector2(0.0f, 0.1f);
- Vector2 max = new Vector2(1.0f, 1.1f);
-
- // Normal case.
- // Case N1: specified value is in the range.
- Vector2 expected = new Vector2(0.5f, 0.3f);
- Vector2 actual = Vector2.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value.");
- // Normal case.
- // Case N2: specified value is bigger than max value.
- a = new Vector2(2.0f, 3.0f);
- expected = max;
- actual = Vector2.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value.");
- // Case N3: specified value is smaller than max value.
- a = new Vector2(-1.0f, -2.0f);
- expected = min;
- actual = Vector2.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value.");
- // Case N4: combination case.
- a = new Vector2(-2.0f, 4.0f);
- expected = new Vector2(min.X, max.Y);
- actual = Vector2.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value.");
- // User specified min value is bigger than max value.
- max = new Vector2(0.0f, 0.1f);
- min = new Vector2(1.0f, 1.1f);
-
- // Case W1: specified value is in the range.
- a = new Vector2(0.5f, 0.3f);
- expected = min;
- actual = Vector2.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value.");
-
- // Normal case.
- // Case W2: specified value is bigger than max and min value.
- a = new Vector2(2.0f, 3.0f);
- expected = min;
- actual = Vector2.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value.");
-
- // Case W3: specified value is smaller than min and max value.
- a = new Vector2(-1.0f, -2.0f);
- expected = min;
- actual = Vector2.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value.");
- }
-
// A test for Lerp (Vector2f, Vector2f, float)
[Fact]
public void Vector2LerpTest()
// A test for Clamp (Vector3f, Vector3f, Vector3f)
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void Vector3ClampTest()
{
Vector3 a = new Vector3(0.5f, 0.3f, 0.33f);
Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value.");
}
- // A test for Clamp (Vector3f, Vector3f, Vector3f) for netfx only
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void Vector3ClampTestFX()
- {
- Vector3 a = new Vector3(0.5f, 0.3f, 0.33f);
- Vector3 min = new Vector3(0.0f, 0.1f, 0.13f);
- Vector3 max = new Vector3(1.0f, 1.1f, 1.13f);
-
- // Normal case.
- // Case N1: specified value is in the range.
- Vector3 expected = new Vector3(0.5f, 0.3f, 0.33f);
- Vector3 actual = Vector3.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value.");
-
- // Normal case.
- // Case N2: specified value is bigger than max value.
- a = new Vector3(2.0f, 3.0f, 4.0f);
- expected = max;
- actual = Vector3.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value.");
-
- // Case N3: specified value is smaller than max value.
- a = new Vector3(-2.0f, -3.0f, -4.0f);
- expected = min;
- actual = Vector3.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value.");
-
- // Case N4: combination case.
- a = new Vector3(-2.0f, 0.5f, 4.0f);
- expected = new Vector3(min.X, a.Y, max.Z);
- actual = Vector3.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value.");
-
- // User specified min value is bigger than max value.
- max = new Vector3(0.0f, 0.1f, 0.13f);
- min = new Vector3(1.0f, 1.1f, 1.13f);
-
- // Case W1: specified value is in the range.
- a = new Vector3(0.5f, 0.3f, 0.33f);
- expected = min;
- actual = Vector3.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value.");
-
- // Normal case.
- // Case W2: specified value is bigger than max and min value.
- a = new Vector3(2.0f, 3.0f, 4.0f);
- expected = min;
- actual = Vector3.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value.");
-
- // Case W3: specified value is smaller than min and max value.
- a = new Vector3(-2.0f, -3.0f, -4.0f);
- expected = min;
- actual = Vector3.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value.");
- }
-
// A test for TransformNormal (Vector3f, Matrix4x4)
[Fact]
public void Vector3TransformNormalTest()
// A test for Clamp (Vector4f, Vector4f, Vector4f)
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void Vector4ClampTest()
{
Vector4 a = new Vector4(0.5f, 0.3f, 0.33f, 0.44f);
Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value.");
}
- // A test for Clamp (Vector4f, Vector4f, Vector4f) for netfx only
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void Vector4ClampTestFX()
- {
- Vector4 a = new Vector4(0.5f, 0.3f, 0.33f, 0.44f);
- Vector4 min = new Vector4(0.0f, 0.1f, 0.13f, 0.14f);
- Vector4 max = new Vector4(1.0f, 1.1f, 1.13f, 1.14f);
-
- // Normal case.
- // Case N1: specified value is in the range.
- Vector4 expected = new Vector4(0.5f, 0.3f, 0.33f, 0.44f);
- Vector4 actual = Vector4.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value.");
-
- // Normal case.
- // Case N2: specified value is bigger than max value.
- a = new Vector4(2.0f, 3.0f, 4.0f, 5.0f);
- expected = max;
- actual = Vector4.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value.");
-
- // Case N3: specified value is smaller than max value.
- a = new Vector4(-2.0f, -3.0f, -4.0f, -5.0f);
- expected = min;
- actual = Vector4.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value.");
-
- // Case N4: combination case.
- a = new Vector4(-2.0f, 0.5f, 4.0f, -5.0f);
- expected = new Vector4(min.X, a.Y, max.Z, min.W);
- actual = Vector4.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value.");
-
- // User specified min value is bigger than max value.
- max = new Vector4(0.0f, 0.1f, 0.13f, 0.14f);
- min = new Vector4(1.0f, 1.1f, 1.13f, 1.14f);
-
- // Case W1: specified value is in the range.
- a = new Vector4(0.5f, 0.3f, 0.33f, 0.44f);
- expected = min;
- actual = Vector4.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value.");
-
- // Normal case.
- // Case W2: specified value is bigger than max and min value.
- a = new Vector4(2.0f, 3.0f, 4.0f, 5.0f);
- expected = min;
- actual = Vector4.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value.");
-
- // Case W3: specified value is smaller than min and max value.
- a = new Vector4(-2.0f, -3.0f, -4.0f, -5.0f);
- expected = min;
- actual = Vector4.Clamp(a, min, max);
- Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value.");
- }
-
// A test for Lerp (Vector4f, Vector4f, float)
[Fact]
public void Vector4LerpTest()
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
uap;
- uapaot;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
}
[Fact]
- // skip the test on desktop as "new ObservableCollection<int>()" returns 0 length collection
- // skip the test on UapAot as the requires Reflection on internal framework types.
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot)]
public static void DebuggerAttributeTests()
{
ObservableCollection<int> col = new ObservableCollection<int>(new[] {1, 2, 3, 4});
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void DebuggerAttribute_NullCollection_ThrowsArgumentNullException()
{
TargetInvocationException ex = Assert.Throws<TargetInvocationException>(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ObservableCollection<int>), null));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void OnDeserialized_MonitorNotInitialized_ExpectSuccess()
{
var observableCollection = new ObservableCollection<int>();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void DebuggerAttributeTests()
{
ReadOnlyDictionary<int, int> dict = new ReadOnlyDictionary<int, int>(new Dictionary<int, int>{{1, 2}, {2, 4}, {3, 6}});
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void DebuggerAttribute_NullDictionary_ThrowsArgumentNullException()
{
TargetInvocationException ex = Assert.Throws<TargetInvocationException>(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ReadOnlyDictionary<int, int>), null));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void DebuggerAttribute_NullDictionaryKeys_ThrowsArgumentNullException()
{
TargetInvocationException ex = Assert.Throws<TargetInvocationException>(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ReadOnlyDictionary<int, int>.KeyCollection), new Type[] { typeof(int) }, null));
}
[Fact]
- // skip the test on desktop as "new ObservableCollection<int>()" returns 0 length collection
- // skip the test on UapAot as the requires Reflection on internal framework types.
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot)]
public static void DebuggerAttribute_Tests()
{
ReadOnlyObservableCollection<int> col = new ReadOnlyObservableCollection<int>(new ObservableCollection<int>(new[] {1, 2, 3, 4}));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public static void DebuggerAttribute_NullCollection_ThrowsArgumentNullException()
{
TargetInvocationException ex = Assert.Throws<TargetInvocationException>(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ReadOnlyObservableCollection<int>), null));
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{43841228-2A2B-4215-B97F-33006995E486}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release;uapaot-Debug;uapaot-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Releaseuap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Collections\IEnumerableTest.cs">
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework has a bug and throws NRE because it uses the typeName in a Debug.Assert")]
public void Ctor_NullStringNetCore_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("typeName", () => new TypeConverterAttribute((string)null));
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, ".NET Framework has a bug and throws NRE because it uses the typeName in a Debug.Assert")]
- public void Ctor_NullStringNetFramework_ThrowsNullReferenceException()
- {
- Assert.Throws<NullReferenceException>(() => new TypeConverterAttribute((string)null));
- }
-
[Theory]
[InlineData(typeof(int))]
public void Ctor_Type(Type type)
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework has a bug and throws NRE")]
public void Ctor_NullTypeNetCore_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("type", () => new TypeConverterAttribute((Type)null));
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, ".NET Framework has a bug and throws NRE")]
- public void Ctor_NullTypeNetFramework_ThrowsNullReferenceException()
- {
- Assert.Throws<NullReferenceException>(() => new TypeConverterAttribute((Type)null));
- }
-
- [Fact]
public void Default_Get_ReturnsExpected()
{
Assert.Empty(TypeConverterAttribute.Default.ConverterTypeName);
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{0febe054-68ac-446f-b999-9068736d3cec}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="UriRelativeResolutionTest.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
};
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void AbsoluteUri_DangerousPathSymbols_RFC3986CompliantAbsoluteUri()
{
Uri uri;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void AbsolutePath_DangerousPathSymbols_RFC3986CompliantAbsolutePath()
{
Uri uri;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void Segments_DangerousPathSymbols_RFC3986CompliantPathSegments()
{
Uri uri;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void Equality_DangerousPathSymbols_RFC3986CompliantEquality()
{
string baseUri = "http://a/%C3%88/";
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void PathAndQuery_DangerousQuerySymbols_RFC3986CompliantPathAndQuery()
{
Uri uri;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void Query_DangerousQuerySymbols_RFC3986CompliantQuery()
{
Uri uri;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void Equality_DangerousQuerySymbols_RFC3986CompliantEquality()
{
string baseUri = "http://a/%C3%88/";
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void Fragment_DangerousFragmentSymbols_RFC3986CompliantFragment()
{
Uri uri;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void UserInfo_DangerousUserInfoSymbols_RFC3986CompliantUserInfo()
{
Uri uri;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void Iri_UnknownSchemeWithoutAuthority_DoesNormalize()
{
string[] paths = { "\u00E8", "%C3%A8" };
/// CheckIsReserved().
/// </summary>
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void Iri_CheckIsReserved_EscapingBehavior()
{
for (int i = 0; i < s_checkIsReservedEscapingStrings.GetLength(0); i++)
[InlineData("\u00E8")]
[InlineData("_\u00E8")]
[InlineData("_")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void Iri_FileUriUncFallback_DoesSupportUnicodeHost(string authority)
{
Uri fileTwoSlashes = new Uri("file://" + authority);
[Theory]
[InlineData(@"c:/path/with/unicode/ö/test.xml")]
[InlineData(@"file://c:/path/with/unicode/ö/test.xml")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void Iri_WindowsPathWithUnicode_DoesRemoveScheme(string uriString)
{
var uri = new Uri(uriString);
[InlineData("http:\u00E8")]
[InlineData("%C3%A8")]
[InlineData("\u00E8")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void Iri_RelativeUriCreation_ShouldNotNormalize(string uriString)
{
Uri href;
[Theory]
[MemberData(nameof(AllForbiddenDecompositions))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Disable until the .NET FX CI machines get the latest patches.")]
public void Iri_AllForbiddenDecompositions_IdnHostThrows(string scheme, string host)
{
Uri uri = new Uri(scheme + "://" + host);
[Theory]
[MemberData(nameof(AllForbiddenDecompositions))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Disable until the .NET FX CI machines get the latest patches.")]
public void Iri_AllForbiddenDecompositions_NonIdnPropertiesOk(string scheme, string host)
{
Uri uri = new Uri(scheme + "://" + host);
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{B0FFC4A8-BAC3-4A7F-8FD5-5B680209371C}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AppxUriValue.cs" />
//This test tests a case where the Core implementation of UriBuilder differs from Desktop Framework UriBuilder.
//The Query property will not longer prepend a ? character if the string being assigned is already prepended.
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Difference in behavior")]
public static void TestQuery()
{
var uriBuilder = new UriBuilder(@"http://foo/bar/baz?date=today");
[Theory]
[InlineData("#fragment", "#fragment")]
[InlineData("#", "#")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "In NET Core if the value starts with # then no other # is prepended, in Desktop we always prepend #")]
public void Fragment_Get_Set_StartsWithPound(string value, string expected)
{
var uriBuilder = new UriBuilder();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void UriAbsoluteUnEscaping_RFC3986UnreservedEscaped_AllUnescaped()
{
string escaped = Escape(RFC3986Unreserved);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")]
public void UriAbsoluteEscaping_SurrogatePair_LocaleIndependent()
{
string uriString = "http://contosotest.conto.soco.ntosoco.com/surrgtest()?$filter=";
[Theory]
[MemberData(nameof(TestIsWellFormedUriStringData))]
- // Bug hasn't been fixed yet on NetFramework
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void TestIsWellFormedUriString(string uriString, bool expected)
{
Assert.Equal(expected, Uri.IsWellFormedUriString(uriString, UriKind.RelativeOrAbsolute));
[Theory]
[MemberData(nameof(UriIsWellFormedUnwiseStringData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void UriIsWellFormed_AbsoluteUnicodeWithUnwise_Success(string uriString, bool expected)
{
Assert.Equal(expected, Uri.IsWellFormedUriString(uriString, UriKind.Absolute));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "See: dotnet/corefx #15145")]
public void Uri_Unicode_SurrogatePairs_Scheme()
{
var combinations = CartesianProductAll(char.IsHighSurrogate, char.IsLowSurrogate, false);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This test depends on a fix that has not yet made it to .NET Framework.")]
public static void Uri_ColonInLongRelativeUri_SchemeSuccessfullyParsed()
{
Uri absolutePart = new Uri("http://www.contoso.com");
[InlineData("0")]
[InlineData("000")]
[InlineData("65535")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Uri_PortTrailingSpaces_SpacesTrimmed(string portString)
{
Uri u = new Uri($"http://www.contoso.com:{portString} ");
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Uri_EmptyPortTrailingSpaces_UsesDefaultPortSpacesTrimmed()
{
Uri u = new Uri($"http://www.contoso.com: ");
--- /dev/null
+<Project>
+ <PropertyGroup>
+ <BuildConfigurations>
+ netcoreapp;
+ </BuildConfigurations>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
/// Validates the explicit float conversion operator on XAttribute.
/// </summary>
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void AttributeExplicitToFloat_NetFramework()
- {
- XAttribute e3 = new XAttribute("x", "5e+500");
- Assert.Throws<OverflowException>(() => (float)e3);
- }
-
- /// <summary>
- /// Validates the explicit float conversion operator on XAttribute.
- /// </summary>
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void AttributeExplicitToFloat_NotNetFramework()
{
XAttribute e3 = new XAttribute("x", "5e+500");
/// Validates the explicit double conversion operator on XAttribute.
/// </summary>
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void AttributeExplicitToDouble_NetFramework()
- {
- XAttribute e3 = new XAttribute("x", "5e+5000");
- Assert.Throws<OverflowException>(() => (double)e3);
- }
-
- /// <summary>
- /// Validates the explicit double conversion operator on XAttribute.
- /// </summary>
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void AttributeExplicitToDouble_NotNetFramework()
{
XAttribute e3 = new XAttribute("x", "5e+5000");
/// Validates the explicit float conversion operator on XElement.
/// </summary>
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void ElementExplicitToFloat_NetFramework()
- {
- XElement e3 = new XElement("x", "5e+500");
- Assert.Throws<OverflowException>(() => (float)e3);
- }
-
- /// <summary>
- /// Validates the explicit float conversion operator on XElement.
- /// </summary>
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void ElementExplicitToFloat_NotNetFramework()
{
XElement e3 = new XElement("x", "5e+500");
/// Validates the explicit double conversion operator on XElement.
/// </summary>
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void ElementExplicitToDouble_NetFramework()
- {
- XElement e3 = new XElement("x", "5e+5000");
- Assert.Throws<OverflowException>(() => (double)e3);
- }
-
- /// <summary>
- /// Validates the explicit double conversion operator on XElement.
- /// </summary>
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void ElementExplicitToDouble_NotNetFramework()
{
XElement e3 = new XElement("x", "5e+5000");
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{F6C73170-9333-4B52-B3FA-A536C5EA6A48}</ProjectGuid>
- <Configurations>Debug;Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="SDMAttribute.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{C560E194-5B14-4112-ABC6-3208491E53E6}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="EventsAdd.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{35FA1FA9-A504-4B9E-93F0-E5D03C21BECA}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Annotation.cs" />
<Compile Include="XLinqErrata4.cs" />
<Compile Include="XNameAPI.cs" />
<Compile Include="XAttribute.cs" />
- <Compile Include="LoadSaveAsyncTests.cs" Condition="'$(TargetGroup)'=='netcoreapp'" />
+ <Compile Include="LoadSaveAsyncTests.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(CommonTestPath)\System\Xml\ModuleCore\ModuleCore.csproj" />
using (XmlReader reader = doc.CreateReader())
{
Exception exception = AssertExtensions.Throws<ArgumentException>(null, () => MoveToFirstElement(reader).ReadOuterXml());
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages
- {
- // \p{Pi} any kind of opening quote https://www.compart.com/en/unicode/category/Pi
- // \p{Pf} any kind of closing quote https://www.compart.com/en/unicode/category/Pf
- // \p{Po} any kind of punctuation character that is not a dash, bracket, quote or connector https://www.compart.com/en/unicode/category/Po
- Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("]]>") + @"[\p{Pf}\p{Po}]"));
- Assert.True(Regex.IsMatch(exception.Message, @"\b" + "XML" + @"\b"));
- Assert.True(Regex.IsMatch(exception.Message, @"\b" + "CDATA" + @"\b"));
- }
+ // \p{Pi} any kind of opening quote https://www.compart.com/en/unicode/category/Pi
+ // \p{Pf} any kind of closing quote https://www.compart.com/en/unicode/category/Pf
+ // \p{Po} any kind of punctuation character that is not a dash, bracket, quote or connector https://www.compart.com/en/unicode/category/Po
+ Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("]]>") + @"[\p{Pf}\p{Po}]"));
+ Assert.True(Regex.IsMatch(exception.Message, @"\b" + "XML" + @"\b"));
+ Assert.True(Regex.IsMatch(exception.Message, @"\b" + "CDATA" + @"\b"));
}
}
using (XmlReader reader = doc.CreateReader())
{
Exception exception = AssertExtensions.Throws<ArgumentException>(null, () => MoveToFirstElement(reader).ReadOuterXml());
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages
- {
- // \b word boundary
- // \p{Pi} any kind of opening quote https://www.compart.com/en/unicode/category/Pi
- // \p{Pf} any kind of closing quote https://www.compart.com/en/unicode/category/Pf
- // \p{Po} any kind of punctuation character that is not a dash, bracket, quote or connector https://www.compart.com/en/unicode/category/Po
- Assert.True(Regex.IsMatch(exception.Message, @"\b" + "XML" + @"\b"));
- Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("--") + @"[\p{Pf}\p{Po}]"));
- Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("-") + @"[\p{Pf}\p{Po}]"));
- }
+ // \b word boundary
+ // \p{Pi} any kind of opening quote https://www.compart.com/en/unicode/category/Pi
+ // \p{Pf} any kind of closing quote https://www.compart.com/en/unicode/category/Pf
+ // \p{Po} any kind of punctuation character that is not a dash, bracket, quote or connector https://www.compart.com/en/unicode/category/Po
+ Assert.True(Regex.IsMatch(exception.Message, @"\b" + "XML" + @"\b"));
+ Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("--") + @"[\p{Pf}\p{Po}]"));
+ Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("-") + @"[\p{Pf}\p{Po}]"));
}
}
}
using (XmlReader reader = doc.CreateReader())
{
Exception exception = AssertExtensions.Throws<ArgumentException>(null, () => MoveToFirstElement(reader).ReadOuterXml());
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages
- {
- // \b word boundary
- // \p{Pi} any kind of opening quote https://www.compart.com/en/unicode/category/Pi
- // \p{Pf} any kind of closing quote https://www.compart.com/en/unicode/category/Pf
- // \p{Po} any kind of punctuation character that is not a dash, bracket, quote or connector https://www.compart.com/en/unicode/category/Po
- Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("?>") + @"[\p{Pf}\p{Po}]"));
- Assert.True(Regex.IsMatch(exception.Message, @"\b" + "XML" + @"\b"));
- }
+ // \b word boundary
+ // \p{Pi} any kind of opening quote https://www.compart.com/en/unicode/category/Pi
+ // \p{Pf} any kind of closing quote https://www.compart.com/en/unicode/category/Pf
+ // \p{Po} any kind of punctuation character that is not a dash, bracket, quote or connector https://www.compart.com/en/unicode/category/Po
+ Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("?>") + @"[\p{Pf}\p{Po}]"));
+ Assert.True(Regex.IsMatch(exception.Message, @"\b" + "XML" + @"\b"));
}
}
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
private void CompareParamName(string actual, string expected, string message)
{
- if (PlatformDetection.IsNetNative) // ILC optimization sets ParamName always to null.
- return;
-
TestLog.Compare(actual, expected, message);
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{5D4FB9ED-C3AC-4EFA-9FEE-619ED4B4B92D}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Collections\DictionaryExtensions.cs">
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
};
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void StringsDontHashToAnyKnownNonRandomizedSets()
{
var setOfHashes = new Tuple<int, int, int>(_strings[0].GetHashCode(), _strings[1].GetHashCode(), _strings[2].GetHashCode());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void StringsDoNotUseAlgorithmSimilarToCoreClrWhenRandomizedHashingIsDisabled()
{
// Even though GetHashCode gives different results on .NET 4.6 and CoreCLR with disabled
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void XmlQualifiedNameUsesStringGetHashCode()
{
Assert.Equal("foo".GetHashCode(), new XmlQualifiedName("foo").GetHashCode());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void SecureStringHasherUsesStringGetHashCode()
{
Assert.Equal("foo".GetHashCode(), new SecureStringHasher().GetHashCode("foo"));
<PropertyGroup>
<ProjectGuid>{A30BBA60-647C-4565-A42F-BE60B2CA2E8E}</ProjectGuid>
<RootNamespace>XmlMiscTests</RootNamespace>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="RandomizedHashing.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{6DC15D23-8213-4700-9815-AD8DEED1CE5F}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CharReaderTests.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{B51913C2-478E-46AA-A523-521BD4593651}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CReaderTestModule.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{04C5492C-FA54-4F93-8698-44B8BB7C72E0}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="FactoryReaderTests.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{2CA30CA9-FADA-4AB6-81E3-EAE61EF44463}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CNameTableTestModule.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{54B5F207-CC11-4AC3-B0D7-1E7A7E2F08DE}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ConformanceSettings.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{6DC919A7-CF8F-4CCD-A7E3-1AD9389FEC86}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="InheritedCases.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{1C8F67D6-1953-49D3-B716-F298883A79C6}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="InheritedCases.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{95C95878-A9CD-43D4-B1BB-D0DCAA54C3D7}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CFactoryModule.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{E6DAD59F-7CB7-4E70-B4C5-FCCBC3376EDE}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="xunit.execution.dotnet" />
}
[Theory]
- [XmlWriterInlineData(1, "Double", "float", false, null)]
- [XmlWriterInlineData(1, "Double", "Single", false, null)]
- [XmlWriterInlineData(2, "Double", "Double", false, null)]
-
- [XmlWriterInlineData(1, "UInt64", "float", true, 1.844674E+19F)]
- [XmlWriterInlineData(1, "UInt32", "float", true, 4.294967E+09F)]
- [XmlWriterInlineData(1, "Int32", "float", true, 2.147484E+09F)]
- [XmlWriterInlineData(1, "Decimal", "float", true, 7.922816E+28F)]
-
- [XmlWriterInlineData(1, "UInt64", "Double", true, 1.84467440737096E+19D)]
- [XmlWriterInlineData(1, "Int64", "Double", true, 9.22337203685478E+18D)]
- [XmlWriterInlineData(1, "Decimal", "Double", true, 7.92281625142643E+28D)]
-
- [XmlWriterInlineData(1, "UInt64", "Single", true, 1.844674E+19F)]
- [XmlWriterInlineData(1, "UInt32", "Single", true, 4.294967E+09F)]
- [XmlWriterInlineData(1, "Int32", "Single", true, 2.147484E+09F)]
- [XmlWriterInlineData(1, "Decimal", "Single", true, 7.922816E+28F)]
-
- [XmlWriterInlineData(2, "UInt64", "float", true, 1.844674E+19F)]
- [XmlWriterInlineData(2, "UInt32", "float", true, 4.294967E+09F)]
- [XmlWriterInlineData(2, "Int32", "float", true, 2.147484E+09F)]
- [XmlWriterInlineData(2, "Decimal", "float", true, 7.922816E+28F)]
-
- [XmlWriterInlineData(2, "UInt64", "Double", true, 1.84467440737096E+19D)]
- [XmlWriterInlineData(2, "Int64", "Double", true, 9.22337203685478E+18D)]
- [XmlWriterInlineData(2, "Decimal", "Double", true, 7.92281625142643E+28D)]
-
- [XmlWriterInlineData(2, "UInt64", "Single", true, 1.844674E+19F)]
- [XmlWriterInlineData(2, "UInt32", "Single", true, 4.294967E+09F)]
- [XmlWriterInlineData(2, "Int32", "Single", true, 2.147484E+09F)]
- [XmlWriterInlineData(2, "Decimal", "Single", true, 7.922816E+28F)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void writeValue_27_NetFramework(XmlWriterUtils utils, int param, string sourceStr, string destStr, bool isValid, object expVal)
- {
- writeValue_27(utils, param, sourceStr, destStr, isValid, expVal);
- }
-
- [Theory]
[XmlWriterInlineData(1, "Double", "float", true, float.PositiveInfinity)]
[XmlWriterInlineData(1, "Double", "Single", true, float.PositiveInfinity)]
[XmlWriterInlineData(2, "Double", "Double", true, 1.7976931348623157E+308)]
[XmlWriterInlineData(2, "UInt32", "Single", true, 4.2949673E+09F)]
[XmlWriterInlineData(2, "Int32", "Single", true, 2.1474836E+09F)]
[XmlWriterInlineData(2, "Decimal", "Single", true, 7.9228163E+28F)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void writeValue_27_NotNetFramework(XmlWriterUtils utils, int param, string sourceStr, string destStr, bool isValid, object expVal)
{
writeValue_27(utils, param, sourceStr, destStr, isValid, expVal);
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<ProjectGuid>{D0DF902A-2486-4A38-B7A7-232B9B6590E1}</ProjectGuid>
<DefineConstants>$(DefineConstants);FEATURE_XML_XPATH_ID</DefineConstants>
<RootNamespace>System.Xml.XPath.Tests</RootNamespace>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<CommonPathXPath>$(CommonPath)\System\Xml\XPath</CommonPathXPath>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<ProjectGuid>{7B57D5F1-4E6C-4280-AD5B-C71C73B66B11}</ProjectGuid>
<DefineConstants>$(DefineConstants);FEATURE_XML_XPATH_ID</DefineConstants>
<RootNamespace>System.Xml.XPath.XmlDocument.Tests</RootNamespace>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<CommonPathXPath>$(CommonPath)\System\Xml\XPath</CommonPathXPath>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{3F18D20D-0267-4381-857B-EEDB7B3FC549}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="EncodeDecodeTests.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Import Project="$(CommonTestPath)\Tests.props" />
<PropertyGroup>
<ProjectGuid>{7EAFC2D8-48D2-4A56-A9C6-6BADF2053499}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\ShouldNotBeInvokedException.cs">
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] //Fix for this edge case was only made in NetCore
public void InsertAfterRemovesDupRefAttrAtTheEnd()
{
const string attributeName = "existingAttr";
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] //Fix for this edge case was only made in NetCore
- public void InsertAfterThrowsArgumentOutOfRangeExceptionForDupRefAttrAtTheEnd_OldBehavior()
- {
- const string attributeName = "existingAttr";
- const string attributeUri = "some:existingUri";
- XmlDocument doc = CreateDocumentWithElement();
- XmlElement element = doc.DocumentElement;
- XmlAttribute anotherAttr1 = element.Attributes.Append(doc.CreateAttribute("attr1", "some:uri1"));
- XmlAttribute anotherAttr2 = element.Attributes.Append(doc.CreateAttribute("attr2", "some:uri2"));
- XmlAttribute refAttr = element.Attributes.Append(doc.CreateAttribute(attributeName, attributeUri)); //dup
- XmlAttribute newAttr = doc.CreateAttribute(attributeName, attributeUri);
-
- XmlAttributeCollection target = element.Attributes;
- Assert.Throws<ArgumentOutOfRangeException> (() => target.InsertAfter(newAttr, refAttr));
-
- Assert.Equal(2, target.Count);
- Assert.Same(anotherAttr1, target[0]);
- Assert.Same(anotherAttr2, target[1]);
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] //Fix for this edge case was only made in NetCore
public void InsertAfterReplacesDupRefAttr()
{
const string attributeName = "existingAttr";
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] //Fix for this edge case was only made in NetCore
- public void InsertAfterDoesNotReplaceDupRefAttr_OldBehavior()
- {
- const string attributeName = "existingAttr";
- const string attributeUri = "some:existingUri";
- XmlDocument doc = CreateDocumentWithElement();
- XmlElement element = doc.DocumentElement;
- XmlAttribute anotherAttr1 = element.Attributes.Append(doc.CreateAttribute("attr1", "some:uri1"));
- XmlAttribute anotherAttr2 = element.Attributes.Append(doc.CreateAttribute("attr2", "some:uri2"));
- XmlAttribute refAttr = element.Attributes.Append(doc.CreateAttribute(attributeName, attributeUri)); //dup
- XmlAttribute anotherAttr3 = element.Attributes.Append(doc.CreateAttribute("attr3", "some:uri3"));
- XmlAttribute newAttr = doc.CreateAttribute(attributeName, attributeUri);
-
- XmlAttributeCollection target = element.Attributes;
- target.InsertAfter(newAttr, refAttr);
-
- Assert.Equal(4, target.Count);
- Assert.Same(anotherAttr1, target[0]);
- Assert.Same(anotherAttr2, target[1]);
- Assert.Same(anotherAttr3, target[2]);
- Assert.Same(newAttr, target[3]);
- }
-
- [Fact]
public void InsertAfterRemovesDupRefAttrAfterAttrAndTheRef()
{
const string attributeName = "existingAttr";
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full Framework does not check for null argument in XmlAttributeCollection.SetNamedItem")]
public void SetNamedItemWithNullReturnsNull()
{
XmlDocument doc = CreateDocumentWithElement();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full Framework does not check for null argument in XmlAttributeCollection.SetNamedItem")]
public static void NamedItemIsNull()
{
var xmlDocument = new XmlDocument();
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Import Project="$(CommonTestPath)\Tests.props" />
<PropertyGroup>
<ProjectGuid>{6C6F323D-054E-4723-9DEA-1C5E1E45DF88}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="NodeReaderTestHelper.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{DA6A9B7F-F311-49A4-8BBE-42EF3152C37B}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ReadAsArrayTests.cs" />
}
}
- [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework throws AggregateException")]
+ [Fact]
public static void ReadAfterInitializationWithUriOnAsyncReaderTrows()
{
using (XmlReader reader = XmlReader.Create("http://test.test/test.html", new XmlReaderSettings() { Async = true }))
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
private static string _invalidCharInThisEncoding = "Invalid character in the given encoding";
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix is not shipped to .Net Framework, so will fail")]
public static void ReadWithSurrogateCharAndInvalidChar()
{
// {60, 0, 0, 0} is a normal char, {0, 34, 1, 0} is a surrogate char {62, 100, 60, 47} is an invalid char
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix is not shipped to .Net Framework, so will fail")]
public static void ReadWithSurrogateCharAndInvalidChar_ValidXmlStructure()
{
var bytes = new byte[] { 60, 0, 0, 0, 97, 0, 0, 0, 62, 0, 0, 0, 0, 34, 1, 0, 62, 100, 60, 47, 60, 0, 0, 0, 47, 0, 0, 0, 97, 0, 0, 0, 62, 0, 0, 0 };
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{507DB29F-74F5-4B34-A240-ABE7BD168DF6}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AsyncReaderLateInitTests.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{E4BC1A16-AD0A-4F70-BD2E-3346A4D9BC2B}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="XmlSystemPathResolverTests.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Import Project="$(CommonTestPath)\Tests.props" />
<PropertyGroup>
<ProjectGuid>{F011A6F5-BA48-4F8D-A20F-79CCE01CDE0E}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<None Include="$(SourceDir)\System.Private.Xml\src\Utils\DTDs\XHTML10\no_comments\xhtml1-frameset.dtd">
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{9EDAADA8-B658-430F-97EE-CCA494883D86}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CError.cs" />
CError.Compare(exception.SourceObject != null, "SourceObject == null");
return;
}
- if (!PlatformDetection.IsNetNative) // Cannot get names of internal framework types
- {
- CError.Compare(exception.SourceObject.GetType().ToString(), "MS.Internal.Xml.Cache.XPathDocumentNavigator", "SourceObject.GetType");
- }
+ CError.Compare(exception.SourceObject.GetType().ToString(), "MS.Internal.Xml.Cache.XPathDocumentNavigator", "SourceObject.GetType");
_output.WriteLine("Exc: " + exception);
}
}
//[Variation(Desc = "v6 - schema(Local)->schema(Local), but resolving external URI is not allowed", Priority = 1)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't have the switch AllowDefaultResolver and false is not default behavior")]
[Fact]
public void v6()
{
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
_expectedMessage = _expectedMessage.ToLowerInvariant();
_actualMessage = _actualMessage.ToLowerInvariant();
-
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages
+ if (Regex.Match(_actualMessage, _expectedMessage, RegexOptions.Singleline).ToString() != _actualMessage)
{
- if (Regex.Match(_actualMessage, _expectedMessage, RegexOptions.Singleline).ToString() != _actualMessage)
- {
- // Unescape before printing the expected message string
- _expectedMessage = Regex.Unescape(_expectedMessage);
- _output.WriteLine("Mismatch in error message");
- _output.WriteLine("===== Expected Message =====\n" + _expectedMessage);
- _output.WriteLine("===== Expected Message Length =====\n" + _expectedMessage.Length);
- _output.WriteLine("===== Actual Message =====\n" + _actualMessage);
- _output.WriteLine("===== Actual Message Length =====\n" + _actualMessage.Length);
- throw new VerifyException("Mismatch in error message");
- }
+ // Unescape before printing the expected message string
+ _expectedMessage = Regex.Unescape(_expectedMessage);
+ _output.WriteLine("Mismatch in error message");
+ _output.WriteLine("===== Expected Message =====\n" + _expectedMessage);
+ _output.WriteLine("===== Expected Message Length =====\n" + _expectedMessage.Length);
+ _output.WriteLine("===== Actual Message =====\n" + _actualMessage);
+ _output.WriteLine("===== Actual Message Length =====\n" + _actualMessage.Length);
+ throw new VerifyException("Mismatch in error message");
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{B0F53AAA-4ABC-44B2-9331-D3802340DD20}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Constructor_AddSchema.cs" />
return;
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This checks a quirked behavior and Full Framework always gets old behavior as Xunit runner always targets 4.5.2 TFM ")]
[Fact]
public void StringPassedToValidateEndElementDoesNotSatisfyIdentityConstraints()
{
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
- uapaot;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
- uapaot;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<DefineConstants>$(DefineConstants);ReflectionOnly</DefineConstants>
<ProjectGuid>{4050F1D1-1DD2-4B48-A17B-E3F955518C4B}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release;uapaot-Debug;uapaot-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Runtime\Serialization\Utils.cs" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{4050F1D1-1DD2-4B48-A17B-E3F90DD18C4B}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release;uapaot-Debug;uapaot-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Runtime\Serialization\Utils.cs" />
{
[Fact]
// XmlTypeMapping is not included in System.Xml.XmlSerializer 4.0.0.0 facade in GAC
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Xml_FromMappings()
{
var types = new[] { typeof(Guid), typeof(List<string>) };
[Fact]
// XmlTypeMapping is not included in System.Xml.XmlSerializer 4.0.0.0 facade in GAC
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Xml_ConstructorWithTypeMapping()
{
XmlTypeMapping mapping = null;
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Xml_FloatAsRoot_NetFramework()
- {
- Assert.StrictEqual(SerializeAndDeserialize<float>(float.MinValue,
-@"<?xml version=""1.0""?>
-<float>-3.40282347E+38</float>"), float.MinValue);
- Assert.StrictEqual(SerializeAndDeserialize<float>(float.MaxValue,
-@"<?xml version=""1.0""?>
-<float>3.40282347E+38</float>"), float.MaxValue);
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Xml_FloatAsRoot_NotNetFramework()
{
Assert.StrictEqual(SerializeAndDeserialize<float>(float.MinValue,
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void SoapAttributeTests()
{
SoapAttributes soapAttrs = new SoapAttributes();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_ComplexField()
{
XmlTypeMapping typeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(SoapEncodedTestType2));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_Basic()
{
XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(SoapEncodedTestType1));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_TypeWithNullableFields()
{
XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(SoapEncodedTestType4));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_Nullable()
{
XmlTypeMapping intMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(int?));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_Basic_FromMappings()
{
XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(SoapEncodedTestType1));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_With_SoapIgnore()
{
var soapAttributes = new SoapAttributes();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_With_SoapElement()
{
var soapAttributes = new SoapAttributes();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_With_SoapType()
{
var soapAttributes = new SoapAttributes();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_Enum()
{
XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(SoapEncodedTestEnum));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_Enum_With_SoapEnumOverrides()
{
var soapAtts = new SoapAttributes();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void SoapEncodedSerialization_SoapAttribute()
{
var soapAtts1 = new SoapAttributes();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void SoapEncodedSerialization_IncludeType()
{
var soapImporter = new SoapReflectionImporter();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void SoapEncodedSerialization_CircularLink()
{
XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(MyCircularLink));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_Array()
{
XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(MyGroup));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_List()
{
XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(MyGroup2));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_MyCollection()
{
XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(MyCollection<string>));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_WithNullables()
{
var mapping = new SoapReflectionImporter().ImportTypeMapping(typeof(WithNullables));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_Enums()
{
var mapping = new SoapReflectionImporter().ImportTypeMapping(typeof(WithEnums));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_Dictionary()
{
Assert.Throws<NotSupportedException>(() => { new SoapReflectionImporter().ImportTypeMapping(typeof(MyGroup3)); });
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_NestedPublicType()
{
XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(TypeWithNestedPublicType.LevelData));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_ObjectAsRoot()
{
XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(object));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_ObjectAsRoot_Nullable()
{
XmlTypeMapping nullableTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(TypeWithNullableObject));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void SoapSchemaMemberTest()
{
string ns = "http://www.w3.org/2001/XMLSchema";
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void XmlMembersMapping_Soap_SimpleType()
{
string memberName = "GetData";
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void XmlMembersMapping_Soap_CompositeType()
{
string memberName = "GetDataUsingDataContract";
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_TypeWithReadOnlyMyCollectionProperty()
{
XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(TypeWithReadOnlyMyCollectionProperty));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void XmlMembersMapping_Soap_SoapComplexType()
{
string memberName = "EchoComositeTypeXmlSerializerFormatSoapResult";
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void XmlMembersMapping_Soap_SoapComplexTypeWithArray()
{
string memberName = "EchoComositeTypeXmlSerializerFormatSoapResult";
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #21724")]
public static void DerivedTypeWithDifferentOverrides()
{
DerivedTypeWithDifferentOverrides value = new DerivedTypeWithDifferentOverrides() { Name1 = "Name1", Name2 = "Name2", Name3 = "Name3", Name4 = "Name4", Name5 = "Name5" };
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #21724")]
public static void DerivedTypeWithDifferentOverrides2()
{
DerivedTypeWithDifferentOverrides2 value = new DerivedTypeWithDifferentOverrides2() { Name1 = "Name1", Name2 = "Name2", Name3 = "Name3", Name4 = "Name4", Name5 = "Name5", Name6 = "Name6" };
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #31427")]
public static void SerializeXmlTextAttributeOnDerivedClass()
{
var value = new EnumTestDerived() { Test = TestEnum.On };
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #31427")]
public static void SerializePrimitiveXmlTextAttributeOnDerivedClass()
{
var value = new PrimiveAttributeTestDerived() { Number = 5 };
static XmlSerializerTests()
{
- if (!PlatformDetection.IsFullFramework)
- {
- MethodInfo method = typeof(XmlSerializer).GetMethod(SerializationModeSetterName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static);
- Assert.True(method != null, $"No method named {SerializationModeSetterName}");
+ MethodInfo method = typeof(XmlSerializer).GetMethod(SerializationModeSetterName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static);
+ Assert.True(method != null, $"No method named {SerializationModeSetterName}");
#if ReflectionOnly
- method.Invoke(null, new object[] { 1 });
+ method.Invoke(null, new object[] { 1 });
#endif
#if XMLSERIALIZERGENERATORTESTS
- method.Invoke(null, new object[] { 3 });
+ method.Invoke(null, new object[] { 3 });
#endif
- }
}
#endif
- private static bool IsTimeSpanSerializationAvailable => !PlatformDetection.IsFullFramework || (AppContext.TryGetSwitch("Switch.System.Xml.EnableTimeSpanSerialization", out bool result) && result);
+ private static bool IsTimeSpanSerializationAvailable => true;
[Fact]
public static void Xml_TypeWithDateTimePropertyAsXmlTime()
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_TypeWithEnumFlagPropertyHavingDefaultValue()
{
var mapping = new SoapReflectionImporter().ImportTypeMapping(typeof(TypeWithEnumFlagPropertyHavingDefaultValue));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_TypeWithXmlQualifiedName()
{
var mapping = new SoapReflectionImporter().ImportTypeMapping(typeof(TypeWithXmlQualifiedName));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")]
public static void Xml_Soap_TypeWithMyCollectionField()
{
XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(TypeWithMyCollectionField));
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{8CDE71C2-4DA4-4AF6-9897-CD953AE653C2}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="DisposeTests.cs" />
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Switch to throw exception was introduced in NetStandard1.7
public static void XmlWriterChecksUpperBoundOfLowerSurrogate_newBehavior()
{
// Turn the switch off to get the new behavior in case the platform has it on by default
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netfx;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{B01E2AE1-1B52-4518-B32E-016070356A7F}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
- <Compile Include="XslCompiledTransform.cs" />
- </ItemGroup>
<ItemGroup>
<Compile Include="Errata4.cs" />
<Compile Include="OutputSettings.cs" />
<Compile Include="XslTransformMultith.cs" />
<Compile Include="XsltSettings.cs" />
<Compile Include="XunitAssemblyAttribute.cs" />
+ <Compile Include="XslCompiledTransform.cs" />
<SupplementalTestData Include="..\TestFiles\**\*.*">
<Link>TestFiles\%(RecursiveDir)%(Filename)%(Extension)</Link>
<DestinationDir>TestFiles\%(RecursiveDir)</DestinationDir>
_output = output;
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does support Compiling JScript/CSharp scripts")]
//[Variation(id = 1, Desc = "Call Current without MoveNext")]
[InlineData()]
[Theory]
Assert.Equal("Compiling JScript/CSharp scripts is not supported", e.InnerException.Message);
}
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Only full framework supports Compiling JScript/CSharp scripts")]
- //[Variation(id = 1, Desc = "Call Current without MoveNext")]
- [Fact]
- public void NodeIter1_FullFramework()
- {
- XslCompiledTransform xslt = new XslCompiledTransform();
-
- XsltArgumentList xslArg = new XsltArgumentList();
- XmlUrlResolver ur = new XmlUrlResolver();
- Uri uriSource = ur.ResolveUri(null, FullFilePath("sample.xsd"));
- xslArg.AddParam("sourceUri", string.Empty, uriSource.ToString());
-
- xslt.Load(FullFilePath("xsd2cs1.xsl"), new XsltSettings(true, true), new XmlUrlResolver());
-
- Assert.Throws<System.InvalidOperationException>(() =>
- {
- XPathDocument doc = new XPathDocument(FullFilePath("sample.xsd"));
- using (StringWriter sw = new StringWriter())
- {
- xslt.Transform(doc, xslArg, sw);
- }
- });
- }
-
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does support Compiling JScript/CSharp scripts")]
//[Variation(id = 2, Desc = "Call Current after MoveNext")]
[InlineData()]
[Theory]
Assert.Equal("Compiling JScript/CSharp scripts is not supported", e.InnerException.Message);
}
-
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Only full framework supports Compiling JScript/CSharp scripts")]
- //[Variation(id = 2, Desc = "Call Current after MoveNext")]
- [Fact]
- public void NodeIter2_FullFramework()
- {
- XslCompiledTransform xslt = new XslCompiledTransform();
-
- XsltArgumentList xslArg = new XsltArgumentList();
- XmlUrlResolver ur = new XmlUrlResolver();
- Uri uriSource = ur.ResolveUri(null, FullFilePath("sample.xsd"));
- xslArg.AddParam("sourceUri", string.Empty, uriSource.ToString());
-
- xslt.Load(FullFilePath("xsd2cs2.xsl"), new XsltSettings(true, true), new XmlUrlResolver());
-
- XPathDocument doc = new XPathDocument(FullFilePath("sample.xsd"));
- using (StringWriter sw = new StringWriter())
- {
- xslt.Transform(doc, xslArg, sw);
- }
- }
}
}
Assert.Equal(actual, expected);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does support Compiling JScript/CSharp scripts")]
//[Variation(id = 1, Desc = "Test the script block with EnableScript, should work", Pri = 0, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", false, true })]
[InlineData(1, "XsltSettings.xml", "XsltSettings1.xsl", false, true)]
//[Variation(id = 4, Desc = "Test the script block with TrustedXslt, should work", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", true, true })]
Assert.Equal("Compiling JScript/CSharp scripts is not supported", e.InnerException.Message);
}
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Only full framework supports Compiling JScript/CSharp scripts")]
- //[Variation(id = 1, Desc = "Test the script block with EnableScript, should work", Pri = 0, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", false, true })]
- [InlineData(1, "XsltSettings.xml", "XsltSettings1.xsl", false, true)]
- //[Variation(id = 4, Desc = "Test the script block with TrustedXslt, should work", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", true, true })]
- [InlineData(4, "XsltSettings.xml", "XsltSettings1.xsl", true, true)]
- //[Variation(id = 9, Desc = "Test the combination of script and document function with TrustedXslt, should work", Pri = 0, Params = new object[] { "XsltSettings.xml", "XsltSettings3.xsl", true, true })]
- [InlineData(9, "XsltSettings.xml", "XsltSettings3.xsl", true, true)]
- //[Variation(id = 11, Desc = "Test the combination of script and document function with EnableScript, only script should work", Pri = 2, Params = new object[] { "XsltSettings.xml", "XsltSettings3.xsl", false, true })]
- [InlineData(11, "XsltSettings.xml", "XsltSettings3.xsl", false, true)]
- [Theory]
- public void XsltSettings1_1_ContainsScript_FullFramework(object param0, object param1, object param2, object param3, object param4)
- {
- XsltSettings1_1(param0, param1, param2, param3, param4);
- }
-
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does support Compiling JScript/CSharp scripts")]
//[Variation(id = 15, Desc = "Test 1 with Default settings, should fail", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", false, true, false, false })]
[InlineData(15, "XsltSettings.xml", "XsltSettings1.xsl", false, true, false, false)]
//[Variation(id = 16, Desc = "Test 2 with EnableScript override, should work", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", false, false, false, true })]
Assert.Equal("Compiling JScript/CSharp scripts is not supported", e.InnerException.Message);
}
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Only full framework supports Compiling JScript/CSharp scripts")]
- //[Variation(id = 15, Desc = "Test 1 with Default settings, should fail", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", false, true, false, false })]
- [InlineData(15, "XsltSettings.xml", "XsltSettings1.xsl", false, true, false, false)]
- //[Variation(id = 16, Desc = "Test 2 with EnableScript override, should work", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", false, false, false, true })]
- [InlineData(16, "XsltSettings.xml", "XsltSettings1.xsl", false, false, false, true)]
- //[Variation(id = 19, Desc = "Test 9 with Default settings override, should fail", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings3.xsl", true, true, false, false })]
- [InlineData(19, "XsltSettings.xml", "XsltSettings3.xsl", true, true, false, false)]
- //[Variation(id = 20, Desc = "Test 10 with TrustedXslt override, should work", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings3.xsl", false, false, true, true })]
- [InlineData(20, "XsltSettings.xml", "XsltSettings3.xsl", false, false, true, true)]
- [Theory]
- public void XsltSettings1_2_ContainsScript_FullFramework(object param0, object param1, object param2, object param3, object param4, object param5, object param6)
- {
- XsltSettings1_2(param0, param1, param2, param3, param4, param5, param6);
- }
-
//[Variation(id = 5, Desc = "Test the document function with EnableDocumentFunction, should work", Pri = 0, Params = new object[] { "XsltSettings.xml", "XsltSettings2.xsl", true, false })]
[InlineData(5, "XsltSettings.xml", "XsltSettings2.xsl", true, false)]
//[Variation(id = 8, Desc = "Test the document function with TrustedXslt, should work", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings2.xsl", true, true })]
m_xsltArg.AddExtensionObject(szDefaultNS, obj);
LoadXSL("MyObject_CaseSensitive.xsl", xslInputType, readerType);
var e = Assert.Throws<XsltException>(() => Transform_ArgList("fruits.xml", outputType, navType));
- var exceptionSourceAssembly = PlatformDetection.IsFullFramework ? "System.Data.SqlXml" : "System.Xml";
+ var exceptionSourceAssembly = "System.Xml";
CheckExpectedError(e, exceptionSourceAssembly, "Xslt_UnknownXsltFunction", new[] { "FN3" });
}
var e = Assert.Throws<XsltCompileException>(() => LoadXSL_Resolver("XmlResolver_Main.xsl", myResolver, inputType, readerType));
var xsltException = Assert.IsType<XsltException>(e.InnerException);
var absoluteUri = new Uri(Path.Combine(Environment.CurrentDirectory, FullFilePath("XmlResolver_Include.xsl"))).AbsoluteUri;
- var exceptionSourceAssembly = PlatformDetection.IsFullFramework ? "System.Data.SqlXml" : "System.Xml";
+ var exceptionSourceAssembly = "System.Xml";
CheckExpectedError(xsltException, exceptionSourceAssembly, "Xslt_CantResolve", new[] { absoluteUri });
}
[InlineData(InputType.Navigator, ReaderType.XmlValidatingReader, TransformType.Writer, DocType.XPathDocument)]
[InlineData(InputType.Navigator, ReaderType.XmlValidatingReader, TransformType.Stream, DocType.XPathDocument)]
[InlineData(InputType.Navigator, ReaderType.XmlValidatingReader, TransformType.TextWriter, DocType.XPathDocument)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Only full framework implicit resolver works")]
[Theory]
public void TC_No_Explicit_Resolver_Prohibits_External_Url(InputType inputType, ReaderType readerType, TransformType transformType, DocType docType)
{
Assert.True(false);
}
-
- //[Variation("Regression case for bug 80768")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework supports <msxml:script>")]
- [Fact]
- public void TC_Ensure_Script_Not_Allowed()
- {
-#pragma warning disable 0618
- xslt = new XslTransform();
-
- var xrLoad = new XmlValidatingReader(new XmlTextReader(FullFilePath("Bug80768.xsl")));
-#pragma warning restore 0618
- var xd = new XPathDocument(xrLoad, XmlSpace.Preserve);
- var e = Assert.Throws<XsltCompileException>(() => xslt.Load(xd, new XmlUrlResolver()));
- Assert.IsType<PlatformNotSupportedException>(e.InnerException);
- }
}
/***********************************************************/
}
catch (System.Xml.Xsl.XsltCompileException e)
{
- if (PlatformDetection.IsFullFramework)
- CheckExpectedError(e.InnerException, "system.data.sqlxml", "Xslt_WrongStylesheetElement", new string[] { "" });
- else
- CheckExpectedError(e.InnerException, "system.xml", "Xslt_WrongStylesheetElement", new string[] { "" });
+ CheckExpectedError(e.InnerException, "system.xml", "Xslt_WrongStylesheetElement", new string[] { "" });
return;
}
_output.WriteLine("No exception thrown for a loading a closed reader!");
}
catch (System.Xml.Xsl.XsltCompileException e)
{
-
- if (PlatformDetection.IsFullFramework)
- CheckExpectedError(e.InnerException, "system.data.sqlxml", "Xslt_WrongStylesheetElement", new string[] { "" });
- else
- CheckExpectedError(e.InnerException, "system.xml", "Xslt_WrongStylesheetElement", new string[] { "" });
+ CheckExpectedError(e.InnerException, "system.xml", "Xslt_WrongStylesheetElement", new string[] { "" });
}
finally
{
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
_expectedMessage = _expectedMessage.ToLowerInvariant();
_actualMessage = _actualMessage.ToLowerInvariant();
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages.
+ if (Regex.Match(_actualMessage, _expectedMessage, RegexOptions.Singleline).ToString() != _actualMessage)
{
- if (Regex.Match(_actualMessage, _expectedMessage, RegexOptions.Singleline).ToString() != _actualMessage)
- {
- // Unescape before printing the expected message string
- _expectedMessage = Regex.Unescape(_expectedMessage);
- _output.WriteLine("Mismatch in error message");
- _output.WriteLine("===== Expected Message =====\n" + _expectedMessage);
- _output.WriteLine("===== Expected Message Length =====\n" + _expectedMessage.Length);
- _output.WriteLine("===== Actual Message =====\n" + _actualMessage);
- _output.WriteLine("===== Actual Message Length =====\n" + _actualMessage.Length);
- throw new VerifyException("Mismatch in error message");
- }
+ // Unescape before printing the expected message string
+ _expectedMessage = Regex.Unescape(_expectedMessage);
+ _output.WriteLine("Mismatch in error message");
+ _output.WriteLine("===== Expected Message =====\n" + _expectedMessage);
+ _output.WriteLine("===== Expected Message Length =====\n" + _expectedMessage.Length);
+ _output.WriteLine("===== Actual Message =====\n" + _actualMessage);
+ _output.WriteLine("===== Actual Message Length =====\n" + _actualMessage.Length);
+ throw new VerifyException("Mismatch in error message");
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{ACF79A18-2655-452C-B4AC-10125F0AD7A8}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="cthread.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corert/issues/3637 - wrong exception thrown from DispatchProxy.Create()", TargetFrameworkMonikers.UapAot)]
public static void Create_Using_Concrete_Proxy_Type_Throws_ArgumentException()
{
AssertExtensions.Throws<ArgumentException>("T", () => DispatchProxy.Create<TestType_ConcreteClass, TestDispatchProxy>());
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corert/issues/3637 - wrong exception thrown from DispatchProxy.Create()", TargetFrameworkMonikers.UapAot)]
public static void Create_Using_Sealed_BaseType_Throws_ArgumentException()
{
AssertExtensions.Throws<ArgumentException>("TProxy", () => DispatchProxy.Create<TestType_IHelloService, Sealed_TestDispatchProxy>());
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corert/issues/3637 - wrong exception thrown from DispatchProxy.Create()", TargetFrameworkMonikers.UapAot)]
public static void Create_Using_Abstract_BaseType_Throws_ArgumentException()
{
AssertExtensions.Throws<ArgumentException>("TProxy", () => DispatchProxy.Create<TestType_IHelloService, Abstract_TestDispatchProxy>());
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corert/issues/3637 - wrong exception thrown from DispatchProxy.Create()", TargetFrameworkMonikers.UapAot)]
public static void Create_Using_BaseType_Without_Default_Ctor_Throws_ArgumentException()
{
AssertExtensions.Throws<ArgumentException>("TProxy", () => DispatchProxy.Create<TestType_IHelloService, NoDefaultCtor_TestDispatchProxy>());
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection on generated dispatch proxy types not allowed.")]
public static void Proxy_Declares_Interface_Properties()
{
TestType_IPropertyService proxy = DispatchProxy.Create<TestType_IPropertyService, TestDispatchProxy>();
#endif // netcoreapp
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection on generated dispatch proxy types not allowed.")]
public static void Proxy_Declares_Interface_Events()
{
TestType_IEventService proxy = DispatchProxy.Create<TestType_IEventService, TestDispatchProxy>();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection on generated dispatch proxy types not allowed.")]
public static void Proxy_Declares_Interface_Indexers()
{
TestType_IIndexerService proxy = DispatchProxy.Create<TestType_IIndexerService, TestDispatchProxy>();
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{089444FE-8FF5-4D8F-A51B-32D026425F6B}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="DispatchProxyTests.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{A5E6F8C2-8E71-4148-8806-12FFBDBE2974}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp;
netfx;
- <!-- netstandard; -->
+ <!-- uap; -->
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
{
public partial class SignatureDecoderTests
{
- private static readonly string RuntimeAssemblyName =
-#if netstandard
- "netstandard";
-#else
- PlatformDetection.IsFullFramework ? "mscorlib" : "System.Runtime";
-#endif
- private static readonly string CollectionsAssemblyName =
-#if netstandard
- "netstandard";
-#else
- PlatformDetection.IsFullFramework ? "mscorlib" : "System.Collections";
-#endif
+ private static readonly string RuntimeAssemblyName = PlatformDetection.IsFullFramework ? "mscorlib" : "System.Runtime";
+ private static readonly string CollectionsAssemblyName = PlatformDetection.IsFullFramework ? "mscorlib" : "System.Collections";
[Fact]
public unsafe void VerifyMultipleOptionalModifiers()
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ExternallyShipping>false</ExternallyShipping>
<!-- UAP build currently failing: https://github.com/dotnet/corefx/issues/31962 -->
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release<!-- ;netstandard-Debug;netstandard-Release --></Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release<!-- ;uap-Debug;uap-Release --></Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\Common\src\Interop\Windows\Interop.Libraries.cs">
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<ProjectGuid>{443B7659-B3FA-4B32-88BA-3A0517E21018}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\IO\TempDirectory.cs">
{
internal static class NetCoreApiEmulators
{
-#if !netstandard
+#if netcoreapp
public static bool IsSZArray(this Type t) => t.IsSZArray;
public static bool IsVariableBoundArray(this Type t) => t.IsVariableBoundArray;
public static bool IsTypeDefinition(this Type t) => t.IsTypeDefinition;
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
Assert.Throws<InvalidOperationException>(() => method.GetMetadataToken());
}
- public static bool GetMetadataTokenSupported
- {
- get
- {
- if (!PlatformDetection.IsNetNative)
- return true;
-
- // Expected false but in case .NET Native ever changes its mind...
- return typeof(MetadataTokenTests).HasMetadataToken();
- }
- }
+ public static bool GetMetadataTokenSupported => true;
public static bool IsReflectionEmitSupported => PlatformDetection.IsReflectionEmitSupported;
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{EC8FFAA7-CA1E-4631-A375-D54B1FC764F6}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "AssemblyName.CodeBase and EscapedCodeBase not supported on UapAot")]
public static void Verify_EscapedCodeBase()
{
AssemblyName n = new AssemblyName("MyAssemblyName");
[Theory]
[MemberData(nameof(Constructor_String_InvalidVersionTest_MemberData))]
- [SkipOnTargetFramework(
- TargetFrameworkMonikers.NetFramework,
- ".NET Core behavior differs from .NET Framework since it does not want to replicate some bugs")]
public static void Constructor_String_InvalidVersionTest(string versionStr)
{
Assert.Throws<FileLoadException>(() => new AssemblyName("a, Version=" + versionStr));
[Theory]
[MemberData(nameof(Constructor_String_VersionTest_MemberData))]
- [SkipOnTargetFramework(
- TargetFrameworkMonikers.NetFramework,
- ".NET Core behavior differs from .NET Framework since it does not want to replicate some bugs")]
public static void Constructor_String_VersionTest(Version expectedVersion, string versionStr)
{
Assert.NotNull(expectedVersion);
[Fact]
[ActiveIssue(33249)]
- [SkipOnTargetFramework(
- TargetFrameworkMonikers.NetFramework,
- ".NET Core behavior differs from .NET Framework since it does not want to replicate some bugs")]
public static void Constructor_String_LoadVersionTest()
{
string assemblyNamePrefix = "System.Reflection.Tests.Assembly_";
// Assembly.Location not supported (properly) on uapaot.
DestTestAssemblyPath = Path.Combine(base.TestDirectory, "TestAssembly.dll");
LoadFromTestPath = Path.Combine(base.TestDirectory, "System.Reflection.Tests.dll");
-
- // There is no dll to copy in ILC runs
- if (!PlatformDetection.IsNetNative)
- {
- File.Copy(SourceTestAssemblyPath, DestTestAssemblyPath);
- string currAssemblyPath = Path.Combine(Environment.CurrentDirectory, "System.Reflection.Tests.dll");
- File.Copy(currAssemblyPath, LoadFromTestPath, true);
- }
+ File.Copy(SourceTestAssemblyPath, DestTestAssemblyPath);
+ string currAssemblyPath = Path.Combine(Environment.CurrentDirectory, "System.Reflection.Tests.dll");
+ File.Copy(currAssemblyPath, LoadFromTestPath, true);
}
[Theory]
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "On desktop, XUnit hosts in an appdomain in such a way that GetEntryAssembly() returns null")]
public void GetEntryAssembly()
{
Assert.NotNull(Assembly.GetEntryAssembly());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetFile() not supported on UapAot")]
public void GetFile()
{
Assert.Throws<ArgumentNullException>(() => typeof(AssemblyTests).Assembly.GetFile(null));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetFiles() not supported on UapAot")]
public void GetFiles()
{
Assert.NotNull(typeof(AssemblyTests).Assembly.GetFiles());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET Framework supports SecurityRuleSet")]
public void SecurityRuleSet_Netcore()
{
Assert.Equal(SecurityRuleSet.None, typeof(AssemblyTests).Assembly.SecurityRuleSet);
- }
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "SecurityRuleSet is ignored in .NET Core")]
- public void SecurityRuleSet_Netfx()
- {
- Assert.Equal(SecurityRuleSet.Level2, typeof(AssemblyTests).Assembly.SecurityRuleSet);
- }
+ }
[Theory]
[MemberData(nameof(Load_TestData))]
string fullRuntimeTestsPath = Path.GetFullPath(RuntimeTestsDll);
var loadedAssembly1 = Assembly.LoadFile(fullRuntimeTestsPath);
- if (PlatformDetection.IsFullFramework)
- {
- Assert.Equal(currentAssembly, loadedAssembly1);
- }
- else
- {
- Assert.NotEqual(currentAssembly, loadedAssembly1);
+ Assert.NotEqual(currentAssembly, loadedAssembly1);
#if netcoreapp
- System.Runtime.Loader.AssemblyLoadContext alc = System.Runtime.Loader.AssemblyLoadContext.GetLoadContext(loadedAssembly1);
- string expectedName = string.Format("Assembly.LoadFile({0})", fullRuntimeTestsPath);
- Assert.Equal(expectedName, alc.Name);
- Assert.Contains(fullRuntimeTestsPath, alc.Name);
- Assert.Contains(expectedName, alc.ToString());
- Assert.Contains("System.Runtime.Loader.IndividualAssemblyLoadContext", alc.ToString());
+ System.Runtime.Loader.AssemblyLoadContext alc = System.Runtime.Loader.AssemblyLoadContext.GetLoadContext(loadedAssembly1);
+ string expectedName = string.Format("Assembly.LoadFile({0})", fullRuntimeTestsPath);
+ Assert.Equal(expectedName, alc.Name);
+ Assert.Contains(fullRuntimeTestsPath, alc.Name);
+ Assert.Contains(expectedName, alc.ToString());
+ Assert.Contains("System.Runtime.Loader.IndividualAssemblyLoadContext", alc.ToString());
#endif
- }
string dir = Path.GetDirectoryName(fullRuntimeTestsPath);
fullRuntimeTestsPath = Path.Combine(dir, ".", RuntimeTestsDll);
Assembly loadedAssembly2 = Assembly.LoadFile(fullRuntimeTestsPath);
- if (PlatformDetection.IsFullFramework)
- {
- Assert.NotEqual(loadedAssembly1, loadedAssembly2);
- }
- else
- {
- Assert.Equal(loadedAssembly1, loadedAssembly2);
- }
+ Assert.Equal(loadedAssembly1, loadedAssembly2);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.Uap, "The full .NET Framework has a bug and throws a NullReferenceException")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public void LoadFile_NullPath_Netcore_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("path", () => Assembly.LoadFile(null));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot, "The full .NET Framework supports Assembly.LoadFrom")]
public void LoadFromUsingHashValue_Netcore()
{
Assert.Throws<NotSupportedException>(() => Assembly.LoadFrom("abc", null, System.Configuration.Assemblies.AssemblyHashAlgorithm.SHA1));
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "The implementation of Assembly.LoadFrom is stubbed out in .NET Core")]
- public void LoadFromUsingHashValue_Netfx()
- {
- Assert.Throws<FileNotFoundException>(() => Assembly.LoadFrom("abc", null, System.Configuration.Assemblies.AssemblyHashAlgorithm.SHA1));
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() not supported on UapAot")]
public void LoadFrom_SamePath_ReturnsEqualAssemblies()
{
Assembly assembly1 = Assembly.LoadFrom(DestTestAssemblyPath);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() not supported on UapAot")]
public void LoadFrom_SameIdentityAsAssemblyWithDifferentPath_ReturnsEqualAssemblies()
{
Assembly assembly1 = Assembly.LoadFrom(typeof(AssemblyTests).Assembly.Location);
Assembly assembly2 = Assembly.LoadFrom(LoadFromTestPath);
- if (PlatformDetection.IsFullFramework)
- {
- Assert.NotEqual(assembly1, assembly2);
- }
- else
- {
- Assert.Equal(assembly1, assembly2);
- }
+ Assert.Equal(assembly1, assembly2);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() not supported on UapAot")]
public void LoadFrom_NullAssemblyFile_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("assemblyFile", () => Assembly.LoadFrom(null));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() not supported on UapAot")]
public void LoadFrom_EmptyAssemblyFile_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>("path", null, (() => Assembly.LoadFrom("")));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() not supported on UapAot")]
public void LoadFrom_NoSuchFile_ThrowsFileNotFoundException()
{
Assert.Throws<FileNotFoundException>(() => Assembly.LoadFrom("NoSuchPath"));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.UnsafeLoadFrom() not supported on UapAot")]
public void UnsafeLoadFrom_SamePath_ReturnsEqualAssemblies()
{
Assembly assembly1 = Assembly.UnsafeLoadFrom(DestTestAssemblyPath);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot, "The implementation of LoadFrom(string, byte[], AssemblyHashAlgorithm is not supported in .NET Core.")]
public void LoadFrom_WithHashValue_NetCoreCore_ThrowsNotSupportedException()
{
Assert.Throws<NotSupportedException>(() => Assembly.LoadFrom(DestTestAssemblyPath, new byte[0], Configuration.Assemblies.AssemblyHashAlgorithm.None));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot, "The full .NET Framework supports more than one module per assembly")]
public void LoadModule_Netcore()
{
Assembly assembly = typeof(AssemblyTests).Assembly;
Assert.Throws<NotImplementedException>(() => assembly.LoadModule("abc", null, null));
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "The coreclr doesn't support more than one module per assembly")]
- public void LoadModule_Netfx()
- {
- Assembly assembly = typeof(AssemblyTests).Assembly;
- AssertExtensions.Throws<ArgumentNullException>(null, () => assembly.LoadModule("abc", null));
- AssertExtensions.Throws<ArgumentNullException>(null, () => assembly.LoadModule("abc", null, null));
- }
-
#pragma warning disable 618
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFromWithPartialName() not supported on UapAot")]
public void LoadWithPartialName()
{
string simpleName = typeof(AssemblyTests).Assembly.GetName().Name;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFromWithPartialName() not supported on UapAot")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void LoadWithPartialName_Neg()
{
AssertExtensions.Throws<ArgumentNullException>("partialName", () => Assembly.LoadWithPartialName(null));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "CodeBase is not supported on UapAot")]
public void CodeBase()
{
Assert.NotEmpty(Helpers.ExecutingAssembly.CodeBase);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "ImageRuntimeVersion is not supported on UapAot.")]
public void ImageRuntimeVersion()
{
Assert.NotEmpty(Helpers.ExecutingAssembly.ImageRuntimeVersion);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "GetReferencedAssemblies is not supported on UapAot.")]
public void GetReferencedAssemblies()
{
// It is too brittle to depend on the assembly references so we just call the method and check that it does not throw.
[Theory]
[MemberData(nameof(GetCallingAssembly_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "GetCallingAssembly() is not supported on UapAot")]
public void GetCallingAssembly(Assembly assembly1, Assembly assembly2, bool expected)
{
Assert.Equal(expected, assembly1.Equals(assembly2));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetSatelliteAssembly() not supported on UapAot")]
public void GetSatelliteAssemblyNeg()
{
Assert.Throws<ArgumentNullException>(() => (typeof(AssemblyTests).Assembly.GetSatelliteAssembly(null)));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.Load(String) not supported on UapAot")]
public void AssemblyLoadFromString()
{
AssemblyName an = typeof(AssemblyTests).Assembly.GetName();
[Theory]
[MemberData(nameof(GetModules_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetModules() is not supported on UapAot.")]
public void GetModules_GetModule(Assembly assembly)
{
Assert.NotEmpty(assembly.GetModules());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetLoadedModules() is not supported on UapAot.")]
public void GetLoadedModules()
{
Assembly assembly = typeof(AssemblyTests).Assembly;
Assembly a = typeof(AssemblyNetCoreAppTests).Assembly;
Type[] forwardedTypes = a.GetForwardedTypes();
- // ActiveIssue: https://github.com/dotnet/corefx/issues/22773 - UapAot - TypeForwards to System.Runtime types not getting emitted when ILC runs in shared assembly mode.
- if (PlatformDetection.IsNetNative)
- {
- if (!forwardedTypes.Contains(typeof(string)))
- {
- forwardedTypes = forwardedTypes.Concat(new Type[] { typeof(string) }).ToArray();
- }
- }
-
forwardedTypes = forwardedTypes.OrderBy(t => t.FullName).ToArray();
Type[] expected = { typeof(string), typeof(TypeInForwardedAssembly), typeof(TypeInForwardedAssembly.PublicInner), typeof(TypeInForwardedAssembly.PublicInner.PublicInnerInner) };
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corert/issues/4230 - UapAot does not honor the ReferenceAssembly attribute", TargetFrameworkMonikers.UapAot)]
public static void AssemblyGetForwardedTypesLoadFailure()
{
Assembly a = typeof(TypeInForwardedAssembly).Assembly;
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Invoking static constructors are not supported on UapAot.")]
public void Invoke_StaticConstructor_NullObject_NullParameters()
{
ConstructorInfo[] constructors = GetConstructors(typeof(ClassWithStaticConstructor));
public class ManifestResourceInfoTests
{
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetManifestResourceInfo() not supported on UapAot")]
public void FileName()
{
Assembly assembly = typeof(ManifestResourceInfoTests).GetTypeInfo().Assembly;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetManifestResourceInfo() not supported on UapAot")]
public void ReferencedAssembly()
{
Assembly assembly = typeof(ManifestResourceInfoTests).GetTypeInfo().Assembly;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetManifestResourceInfo() not supported on UapAot")]
public void ResourceLocation()
{
Assembly assembly = typeof(ManifestResourceInfoTests).GetTypeInfo().Assembly;
[InlineData(typeof(Int64Attr), (long)77, "Int64AttrSimple")]
[InlineData(typeof(StringAttr), "hello", "StringAttrSimple")]
[InlineData(typeof(EnumAttr), PublicEnum.Case1, "EnumAttrSimple")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Custom Attributes on Modules not supported on UapAot.")]
public void CustomAttributes<CtorArg, NamedArg>(Type attrType, CtorArg expectedCtorValue, NamedArg expectedNamedValue)
{
Module module = typeof(ModuleTest).GetTypeInfo().Module;
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Querying HasDefaultValue of optional DateTime parameter may throw exception on NETFX")]
[InlineData(typeof(ParameterInfoMetadata), "MethodWithDefaultDateTime", 0, true)]
public void HasDefaultValue_broken_on_NETFX(Type type, string name, int index, bool expected)
{
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Querying DefaultValue of optional DateTime parameter may throw exception on NETFX")]
[InlineData(typeof(ParameterInfoMetadata), "MethodWithDefaultDateTime", 0, null)]
public void DefaultValue_broken_on_NETFX(Type type, string name, int index, object expected)
{
yield return new object[] { typeof(OptionalAttribute) };
yield return new object[] { typeof(OutAttribute) };
yield return new object[] { typeof(InAttribute) };
- if (!PlatformDetection.IsNetNative) // Native Metadata format does not expose FieldMarshal info: https://github.com/dotnet/corert/issues/3366
- {
- yield return new object[] { typeof(MarshalAsAttribute) };
- }
+ yield return new object[] { typeof(MarshalAsAttribute) };
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{B027C72E-F04E-42E0-A7F7-993AEF8400D2}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<LogicalName>ResourceTextFile.txt</LogicalName>
</EmbeddedResource>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netfx' And '$(TargetGroup)' != 'netstandard'">
+ <ItemGroup>
<Compile Include="AssemblyTests.netcoreapp.cs" />
<Compile Include="MemberInfoTests.netcoreapp.cs" />
<Compile Include="TypeInfoTests.netcoreapp.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
<TestDataPackageVersion>1.0.9</TestDataPackageVersion>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
</PropertyGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Import Project="$(CommonTestPath)\Tests.props" />
<PropertyGroup>
<ProjectGuid>{8D7202E8-084A-4C20-AB93-3BF70D2E0651}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
[Theory]
[MemberData(nameof(EnglishResourceData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "When getting resources from PRI file the casing doesn't matter, if it is there it will always find and return the resource")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "When getting resources from PRI file the casing doesn't matter, if it is there it will always find and return the resource")]
public static void IgnoreCase(string key, string expectedValue)
{
var manager = new ResourceManager("System.Resources.Tests.Resources.TestResx", typeof(ResourceManagerTests).GetTypeInfo().Assembly);
public static void File_GetObject(string key, object expectedValue, bool requiresBinaryFormatter = false)
{
var manager = ResourceManager.CreateFileBasedResourceManager("TestResx.netstandard17", Directory.GetCurrentDirectory(), null);
- if (requiresBinaryFormatter && !PlatformDetection.IsFullFramework)
+ if (requiresBinaryFormatter)
{
Assert.Throws<NotSupportedException>(() => manager.GetObject(key));
Assert.Throws<NotSupportedException>(() => manager.GetObject(key, new CultureInfo("en-US")));
var manager = ResourceManager.CreateFileBasedResourceManager("TestResx.netstandard17", Directory.GetCurrentDirectory(), null);
var culture = new CultureInfo("en-US");
ResourceSet set = manager.GetResourceSet(culture, true, true);
- if (requiresBinaryFormatter && !PlatformDetection.IsFullFramework)
+ if (requiresBinaryFormatter)
{
Assert.Throws<NotSupportedException>(() => set.GetObject(key));
}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "UwpAot currently allows custom assembly in ResourceManager constructor")]
public static void ConstructorNonRuntimeAssembly()
{
MockAssembly assembly = new MockAssembly();
<BinPlaceSatelliteAssemblies>true</BinPlaceSatelliteAssemblies>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="MissingManifestResourceExceptionTests.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{EFA745C2-3741-4D54-B2A1-1979E43354E4}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
- <Import Project="$(CommonTestPath)\Tests.props" />
<ItemGroup>
<Compile Include="ResourceWriterUnitTest.cs" />
</ItemGroup>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ProjectGuid>{8012DD70-A6D7-45C0-BC8E-DFFB48D86E08}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="UnsafeTests.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ProjectGuid>{057BF9A0-199B-4EB5-85D5-84982259C7BC}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Runtime\CompilerServices\RequiredAttributeAttributeTests.cs" />
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- netstandard-Windows_NT;
- netstandard-Unix;
uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
<DefineConstants Condition="'$(TargetsUnix)' == 'true'">$(DefineConstants);Unix</DefineConstants>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
+ <Compile Include="System\AppDomainTests.netcoreapp.cs" />
+ <Compile Include="System\Random.netcoreapp.cs" />
+ <Compile Include="System\IO\Path.IsPathFullyQualified.netcoreapp.cs" />
+ <Compile Include="System\IO\PathTestsBase.netcoreapp.cs" />
+ <Compile Include="System\IO\PathTests_Windows.netcoreapp.cs" />
+ <Compile Include="System\IO\PathTests.netcoreapp.cs" />
+ <Compile Include="System\IO\PathTests_Unix.cs" />
+ <Compile Include="System\IO\PathTests_Join.netcoreapp.cs" />
+ <Compile Include="System\Runtime\ProfileOptimization.netcoreapp.cs" />
+ <Compile Include="System\Runtime\CompilerServices\SwitchExpressionExceptionTests.cs" />
+ </ItemGroup>
<ItemGroup>
<Compile Include="System\ApplicationIdTests.cs" />
<Compile Include="System\Convert.cs" />
<Compile Include="System\EnvironmentTests.cs" />
<Compile Include="System\IO\PathTests.cs" />
- <Compile Include="System\IO\PathTests_Windows_NetFX.cs" />
<Compile Include="System\IO\PathTests_Windows.cs" />
<Compile Include="System\OperatingSystemTests.cs" />
<Compile Include="System\Runtime\Versioning\VersioningHelperTests.cs" />
<Compile Include="System\Reflection\AssemblyNameProxyTests.cs" />
<Compile Include="System\MarshalByRefObjectTest.cs" />
<Compile Include="TestHelpers.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)'=='netcoreapp'">
- <Compile Include="System\AppDomainTests.netcoreapp.cs" />
- <Compile Include="System\Random.netcoreapp.cs" />
- <Compile Include="System\IO\Path.IsPathFullyQualified.netcoreapp.cs" />
- <Compile Include="System\IO\PathTestsBase.netcoreapp.cs" />
- <Compile Include="System\IO\PathTests_Windows.netcoreapp.cs" />
- <Compile Include="System\IO\PathTests.netcoreapp.cs" />
- <Compile Include="System\IO\PathTests_Unix.cs" />
- <Compile Include="System\IO\PathTests_Join.netcoreapp.cs" />
- <Compile Include="System\Runtime\ProfileOptimization.netcoreapp.cs" />
- <Compile Include="System\Runtime\CompilerServices\SwitchExpressionExceptionTests.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)'!='netstandard'">
<Compile Include="System\BitConverterSpan.cs" />
<Compile Include="System\BitConverter.netcoreapp.cs" />
<Compile Include="System\Convert.netcoreapp.cs" />
<Compile Include="System\StringComparer.netcoreapp.cs" />
<Compile Include="System\UnloadingAndProcessExitTests.netcoreapp.cs" />
<Compile Include="System\IO\Path.IsPathFullyQualified.cs" />
- </ItemGroup>
- <ItemGroup>
<Compile Include="System\BitConverterArray.cs" />
<Compile Include="System\BitConverterBase.cs" />
<Compile Include="System\Environment.UserDomainName.cs" />
<Name>TestApp</Name>
</ProjectReference>
</ItemGroup>
- <ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
</Project>
\ No newline at end of file
public void TargetFrameworkTest()
{
string targetFrameworkName = ".NETCoreApp,Version=v2.1";
- if (PlatformDetection.IsFullFramework)
- {
- targetFrameworkName = ".NETFramework,Version=v4.7.2";
- }
- else if (PlatformDetection.IsInAppContainer)
+ if (PlatformDetection.IsInAppContainer)
{
targetFrameworkName = ".NETCore,Version=v5.0";
}
- else if (PlatformDetection.IsNetNative)
- {
- targetFrameworkName = ".NETCoreApp,Version=v2.0";
- }
RemoteExecutor.Invoke((_targetFrameworkName) => {
Assert.Contains(_targetFrameworkName, AppContext.TargetFrameworkName);
string expected = Assembly.GetEntryAssembly()?.GetName()?.Name;
// GetEntryAssembly may be null (i.e. desktop)
- if (expected == null || PlatformDetection.IsFullFramework)
+ if (expected == null)
expected = Assembly.GetExecutingAssembly().GetName().Name;
Assert.Equal(expected, s);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void CreateDomainNonNetfx()
{
AssertExtensions.Throws<ArgumentNullException>("friendlyName", () => { AppDomain.CreateDomain(null); });
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void CreateDomainNetfx()
- {
- Assert.Throws<ArgumentNullException>(() => { AppDomain.CreateDomain(null); });
- AppDomain.CreateDomain("test");
- }
-
- [Fact]
- [ActiveIssue(21680, TargetFrameworkMonikers.UapAot)]
public void ExecuteAssemblyByName()
{
RemoteExecutor.Invoke(() => {
Assert.Throws<FileNotFoundException>(() => AppDomain.CurrentDomain.ExecuteAssembly("NonExistentFile.exe"));
Func<int> executeAssembly = () => AppDomain.CurrentDomain.ExecuteAssembly(name, new string[2] { "2", "3" }, null, Configuration.Assemblies.AssemblyHashAlgorithm.SHA1);
-
- if (PlatformDetection.IsFullFramework)
- Assert.Equal(10, executeAssembly());
- else
- Assert.Throws<PlatformNotSupportedException>(() => executeAssembly());
+ Assert.Throws<PlatformNotSupportedException>(() => executeAssembly());
Assert.Equal(5, AppDomain.CurrentDomain.ExecuteAssembly(name));
Assert.Equal(10, AppDomain.CurrentDomain.ExecuteAssembly(name, new string[2] { "2", "3" }));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Netfx is more permissive and does not throw")]
public void IsCompatibilitySwitchSet()
{
Assert.Throws<ArgumentNullException>(() => { AppDomain.CurrentDomain.IsCompatibilitySwitchSet(null); });
string actual = AppDomain.CurrentDomain.ToString();
- // NetFx has additional line endings
- if (PlatformDetection.IsFullFramework)
- actual = actual.Trim();
-
string expected = "Name:" + AppDomain.CurrentDomain.FriendlyName + Environment.NewLine + "There are no context policies.";
Assert.Equal(expected, actual);
Assert.Equal(0, AppDomain.CurrentDomain.ReflectionOnlyGetAssemblies().Length);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[Fact]
public void MonitoringIsEnabled()
{
#pragma warning disable 618
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void GetCurrentThreadId()
{
Assert.Equal(AppDomain.GetCurrentThreadId(), Environment.CurrentManagedThreadId);
#pragma warning restore 618
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Does not support Assembly.LoadFile")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void GetAssemblies()
{
RemoteExecutor.Invoke(() => {
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Does not support Assembly.LoadFile")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void AssemblyLoad()
{
RemoteExecutor.Invoke(() => {
}
[Fact]
- [ActiveIssue(21680, TargetFrameworkMonikers.UapAot)]
public void TypeResolve()
{
RemoteExecutor.Invoke(() => {
}
[Fact]
- [ActiveIssue(21680, TargetFrameworkMonikers.UapAot)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "In UWP the resources always exist in the resources.pri file even if the assembly is not loaded")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "In UWP the resources always exist in the resources.pri file even if the assembly is not loaded")]
public void ResourceResolve()
{
RemoteExecutor.Invoke(() => {
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void ExtraPaddingCharacter()
{
VerifyInvalidInput("abcdxyz=" + "=");
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void ExtraPaddingCharacterOnNetFx()
- {
- // This should throw a FormatException because of the extra "=". But due to a bug in NetFx, this
- // gets "successfully" decoded as if it were "abcdyz==".
-
- byte[] actual = Convert.FromBase64String("abcdxyz=" + "=");
- byte[] expected = { 0x69, 0xb7, 0x1d, 0xcb };
- Assert.Equal<byte>(expected, actual);
- }
-
- [Fact]
public static void InvalidCharactersInInput()
{
ushort[] invalidChars = { 30122, 62608, 13917, 19498, 2473, 40845, 35988, 2281, 51246, 36372 };
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void FromString_NetFramework()
- {
- string[] overflowValues = { Double.MaxValue.ToString(), Double.MinValue.ToString() };
- VerifyFromStringThrows<OverflowException>(Convert.ToDouble, Convert.ToDouble, overflowValues);
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void FromString_NotNetFramework()
{
string[] overflowValues = { Double.MaxValue.ToString(), Double.MinValue.ToString() };
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void FromString_NetFramework()
- {
- string[] overflowValues = { Double.MinValue.ToString(), Double.MaxValue.ToString() };
- VerifyFromStringThrows<OverflowException>(Convert.ToSingle, Convert.ToSingle, overflowValues);
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void FromString_NotNetFramework()
{
string[] overflowValues = { Double.MinValue.ToString(), Double.MaxValue.ToString() };
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void FromBoxedObject_NotNetFramework()
{
object[] testValues =
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void FromBoxedObject_NetFramework()
- {
- object[] testValues =
- {
- // Double
- -12.236465923406483,
-
- // Single
- -1.7753e-83f,
- -12.2364659234064826243f,
- };
-
- string[] expectedValues =
- {
- // Double
- "-12.2364659234065",
-
- // Single
- "0",
- "-12.23647",
- };
-
- for (int i = 0; i < testValues.Length; i++)
- {
- Assert.Equal(expectedValues[i], Convert.ToString(testValues[i], NumberFormatInfo.InvariantInfo));
- }
- }
-
- [Fact]
public static void FromObject()
{
Assert.Equal("System.Tests.ConvertToStringTests", Convert.ToString(new ConvertToStringTests()));
[InlineData(1)] // setting ExitCode and exiting Main
[InlineData(2)] // setting ExitCode both from Main and from an Unloading event handler.
[InlineData(3)] // using Exit(exitCode)
- [ActiveIssue("https://github.com/dotnet/corefx/issues/21415", TargetFrameworkMonikers.UapNotUapAot)]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20387 - ILC test pipeline does not accommodate tests in child processes built into custom assemblies.", TargetFrameworkMonikers.UapAot)]
+ [ActiveIssue("https://github.com/dotnet/corefx/issues/21415", TargetFrameworkMonikers.Uap)]
public static void ExitCode_VoidMainAppReturnsSetValue(int mode)
{
int expectedExitCode = 123;
const string AppName = "VoidMainWithExitCodeApp.exe";
var psi = new ProcessStartInfo();
- if (PlatformDetection.IsFullFramework || PlatformDetection.IsNetNative)
- {
- psi.FileName = AppName;
- psi.Arguments = $"{expectedExitCode} {mode}";
- }
- else
- {
- psi.FileName = RemoteExecutor.HostRunner;
- psi.Arguments = $"{AppName} {expectedExitCode} {mode}";
- }
+ psi.FileName = RemoteExecutor.HostRunner;
+ psi.Arguments = $"{AppName} {expectedExitCode} {mode}";
using (Process p = Process.Start(psi))
{
[Theory]
[InlineData(null)]
[MemberData(nameof(EnvironmentTests.EnvironmentVariableTargets), MemberType = typeof(EnvironmentTests))]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/23003", TargetFrameworkMonikers.NetFramework)]
public void GetEnumerator_LinqOverDictionaryEntries_Success(EnvironmentVariableTarget? target)
{
IDictionary envVars = target != null ?
[MemberData(nameof(EnvironmentTests.EnvironmentVariableTargets), MemberType = typeof(EnvironmentTests))]
public void EnumerateEnvironmentVariables(EnvironmentVariableTarget target)
{
- bool lookForSetValue = (target == EnvironmentVariableTarget.Process) ||
- // On the Project N corelib, it doesn't attempt to set machine/user environment variables;
- // it just returns silently. So don't try.
- (PlatformDetection.IsWindowsAndElevated && !PlatformDetection.IsNetNative);
-
-
+ bool lookForSetValue = (target == EnvironmentVariableTarget.Process) || PlatformDetection.IsWindowsAndElevated;
string key = $"EnumerateEnvironmentVariables ({target})";
string value = Path.GetRandomFileName();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework does not have the fix to allow arbitrary length environment variables.")]
public void AllowAnyVariableLengths()
{
// longer than 32767
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework does not have the fix to allow arbitrary length environment variables.")]
public void AllowAnyVariableValueLengths()
{
string var = "Test_SetEnvironmentVariable_AllowAnyVariableValueLengths";
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework does not have the fix to allow arbitrary length environment variables.")]
public void EnvironmentVariableTooLarge_Throws()
{
RemoteExecutor.Invoke(() =>
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework does not have the fix to allow arbitrary length environment variables.")]
public void EnvironmentVariableValueTooLarge_Throws()
{
RemoteExecutor.Invoke(() =>
static string s_stackTrace;
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "UapAot does not support nice stack traces. It's for people who like performance.")]
public void StackTraceTest()
{
//arrange
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "On Desktop, Environment.StackTrace contains internal frames")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "UapAot does not support nice stack traces. It's for people who like performance.")]
public void StackTraceDoesNotStartWithInternalFrame()
{
string stackTrace = Environment.StackTrace;
}
[Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // fail fast crashes the process
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does not have dotnet/coreclr#16622")]
[ActiveIssue("29869", TargetFrameworkMonikers.Uap)]
[Fact]
public void FailFast_ExceptionStackTrace_ArgumentException()
}
[Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // fail fast crashes the process
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does not have dotnet/coreclr#16622")]
[ActiveIssue("29869", TargetFrameworkMonikers.Uap)]
[Fact]
public void FailFast_ExceptionStackTrace_StackOverflowException()
}
[Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // fail fast crashes the process
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does not have dotnet/coreclr#16622")]
[ActiveIssue("29869", TargetFrameworkMonikers.Uap)]
[Fact]
public void FailFast_ExceptionStackTrace_InnerException()
[InlineData(Environment.SpecialFolder.SystemX86)]
[InlineData(Environment.SpecialFolder.Windows)]
[PlatformSpecific(TestPlatforms.Windows)] // Tests OS-specific environment
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap | TargetFrameworkMonikers.UapAot)] // Don't run on UAP
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // Don't run on UAP
public unsafe void GetFolderPath_Windows(Environment.SpecialFolder folder)
{
string knownFolder = Environment.GetFolderPath(folder);
[Theory]
[MemberData(nameof(Combine_Basic_TestData))]
[MemberData(nameof(Combine_CommonCases_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "New Wildcards support added on Core hasn't ported to NETFX. https://github.com/dotnet/corefx/pull/8669")]
public static void Combine(string[] paths)
{
string expected = string.Empty;
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void ContainsInvalidCharWithoutRooted()
- {
- CommonCasesException<ArgumentException>("ab\0cd");
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void ContainsInvalidCharWithoutRooted_Core()
{
Assert.Equal("ab\0cd", Path.Combine("ab\0cd"));
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific invalid paths
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void ContainsInvalidCharWithoutRooted_Windows()
- {
- //any path contains invalid character without rooted after (AE)
- CommonCasesException<ArgumentException>("ab|cd");
- CommonCasesException<ArgumentException>("ab\bcd");
- CommonCasesException<ArgumentException>("ab\0cd");
- CommonCasesException<ArgumentException>("ab\tcd");
- }
-
- [Fact]
- [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific invalid paths
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void ContainsInvalidCharWithoutRooted_Windows_Core()
{
Assert.Equal("ab|cd", Path.Combine("ab|cd"));
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void ContainsInvalidCharWithRooted()
- {
- //any path contains invalid character with rooted after (AE)
- CommonCasesException<ArgumentException>("ab\0cd", s_separator + "abc");
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void ContainsInvalidCharWithRooted_Core()
{
Assert.Equal(s_separator + "abc", Path.Combine("ab\0cd", s_separator + "abc"));
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific invalid paths
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void ContainsInvalidCharWithRooted_Windows()
- {
- //any path contains invalid character with rooted after (AE)
- CommonCasesException<ArgumentException>("ab|cd", s_separator + "abc");
- CommonCasesException<ArgumentException>("ab\bcd", s_separator + "abc");
- CommonCasesException<ArgumentException>("ab\tcd", s_separator + "abc");
- }
-
- [Fact]
- [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific invalid paths
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void ContainsInvalidCharWithRooted_Windows_core()
{
Assert.Equal(s_separator + "abc", Path.Combine("ab|cd", s_separator + "abc"));
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Xunit;
-
-namespace System.IO.Tests
-{
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public class PathTests_Windows_NetFX : PathTestsBase
- {
- [Theory,
- MemberData(nameof(TestData_EmbeddedNull)),
- MemberData(nameof(TestData_EmptyString)),
- MemberData(nameof(TestData_ControlChars))]
- public void GetDirectoryName_ArgumentExceptions(string path)
- {
- // In NetFX we normalize and check invalid path chars
- AssertExtensions.Throws<ArgumentException>("path", null, () => Path.GetDirectoryName(path));
- }
-
- [Theory,
- MemberData(nameof(TestData_ControlChars)),
- MemberData(nameof(TestData_EmbeddedNull))]
- public void IsPathRooted_ArgumentExceptions(string path)
- {
- // In NetFX we check invalid path chars
- AssertExtensions.Throws<ArgumentException>("path", null, () => Path.IsPathRooted(path));
- }
-
- [Theory,
- MemberData(nameof(TestData_Spaces)),
- MemberData(nameof(TestData_UnicodeWhiteSpace)),
- MemberData(nameof(TestData_EmptyString))]
- public void IsPathRooted_NegativeCases(string path)
- {
- Assert.False(Path.IsPathRooted(path));
- }
-
- [Theory,
- MemberData(nameof(TestData_InvalidDriveLetters)),
- MemberData(nameof(TestData_ValidDriveLetters))]
- public void IsPathRooted(string path)
- {
- Assert.True(Path.IsPathRooted(path));
- }
-
- [Theory,
- InlineData(@" C:\dir\baz", @"C:\dir"),
- InlineData(@" C:\dir\baz", @"C:\dir")]
- public void GetDirectoryName_SkipSpaces(string path, string expected)
- {
- // In very specific cases we would trim leading spaces
- Assert.Equal(expected, Path.GetDirectoryName(path));
- }
-
- [Fact]
- public void GetPathRoot_EmptyThrows_Desktop()
- {
- AssertExtensions.Throws<ArgumentException>("path", null, () => Path.GetPathRoot(string.Empty));
- }
-
- [Fact]
- public void GetInvalidPathChars()
- {
- Assert.All(Path.GetInvalidPathChars(), c =>
- {
- string bad = c.ToString();
- AssertExtensions.Throws<ArgumentException>("path", null, () => Path.ChangeExtension(bad, "ok"));
- AssertExtensions.Throws<ArgumentException>("path", null, () => Path.Combine(bad, "ok"));
- AssertExtensions.Throws<ArgumentException>("path", null, () => Path.Combine("ok", "ok", bad));
- AssertExtensions.Throws<ArgumentException>("path", null, () => Path.Combine("ok", "ok", bad, "ok"));
- AssertExtensions.Throws<ArgumentException>("path", null, () => Path.Combine(bad, bad, bad, bad, bad));
- AssertExtensions.Throws<ArgumentException>("path", null, () => Path.GetDirectoryName(bad));
- AssertExtensions.Throws<ArgumentException>("path", null, () => Path.GetExtension(bad));
- AssertExtensions.Throws<ArgumentException>("path", null, () => Path.GetFileName(bad));
- AssertExtensions.Throws<ArgumentException>("path", null, () => Path.GetFileNameWithoutExtension(bad));
- AssertExtensions.Throws<ArgumentException>(c == 124 ? null : "path", null, () => Path.GetFullPath(bad));
- AssertExtensions.Throws<ArgumentException>("path", null, () => Path.GetPathRoot(bad));
- AssertExtensions.Throws<ArgumentException>("path", null, () => Path.IsPathRooted(bad));
- });
- }
-
- [Theory, MemberData(nameof(TestData_NonDriveColonPaths))]
- public void GetFullPath_NotSupportedColons(string path)
- {
- // Throws via our invalid colon filtering (as part of FileIOPermissions)
- AssertExtensions.ThrowsAny<NotSupportedException, ArgumentException>(() => Path.GetFullPath(path));
- }
-
- [Theory,
- MemberData(nameof(TestData_Wildcards)),
- MemberData(nameof(TestData_ExtendedWildcards))]
- public void GetFullPath_Wildcards(char wildcard)
- {
- AssertExtensions.Throws<ArgumentException>("path", null, () => Path.GetFullPath("test" + wildcard + "ing"));
- }
-
- [Theory, MemberData(nameof(TestData_InvalidUnc))]
- public void GetFullPath_UNC_Invalid(string invalidPath)
- {
- AssertExtensions.Throws<ArgumentException>(null, () => Path.GetFullPath(invalidPath));
- }
- }
-}
public class MarshalByRefObjectTest : MarshalByRefObject
{
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void MarshalByRefObjectTests()
{
var obj = new MarshalByRefObjectTest();
[InlineData( double.NegativeInfinity, double.PositiveInfinity, -0.78539816339744831, CrossPlatformMachineEpsilon)] // expected: -(pi / 4)
[InlineData( double.PositiveInfinity, double.NegativeInfinity, 2.3561944901923449, CrossPlatformMachineEpsilon * 10)] // expected: (3 * pi / 4)
[InlineData( double.PositiveInfinity, double.PositiveInfinity, 0.78539816339744831, CrossPlatformMachineEpsilon)] // expected: (pi / 4)
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Atan2_IEEE(double y, double x, double expectedResult, double allowedVariance)
{
AssertEqual(expectedResult, Math.Atan2(y, x), allowedVariance);
}
- [Theory]
- [InlineData( double.NegativeInfinity, double.NegativeInfinity, double.NaN, 0.0)]
- [InlineData( double.NegativeInfinity, double.PositiveInfinity, double.NaN, 0.0)]
- [InlineData( double.PositiveInfinity, double.NegativeInfinity, double.NaN, 0.0)]
- [InlineData( double.PositiveInfinity, double.PositiveInfinity, double.NaN, 0.0)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Atan2_IEEE_Legacy(double y, double x, double expectedResult, double allowedVariance)
- {
- AssertEqual(expectedResult, Math.Atan2(y, x), allowedVariance);
- }
-
[Fact]
public static void Ceiling_Decimal()
{
[InlineData(-0.63661977236758134, -0.0, 0.0)] // value: -(2 / pi)
[InlineData(-0.43429448190325183, -0.0, 0.0)] // value: -(log10(e))
[InlineData(-0.31830988618379067, -0.0, 0.0)] // value: -(1 / pi)
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Ceiling_Double_IEEE(double value, double expectedResult, double allowedVariance)
{
AssertEqual(expectedResult, Math.Ceiling(value), allowedVariance);
[Theory]
[InlineData(-0.0, -0.0, 0.0)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Floor_Double_IEEE(double value, double expectedResult, double allowedVariance)
{
AssertEqual(expectedResult, Math.Floor(value), allowedVariance);
Assert.Equal(decimal.MaxValue, Math.Max(decimal.MinValue, decimal.MaxValue));
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Max_Double_NetFramework()
- {
- Assert.Equal(3.0, Math.Max(3.0, -2.0));
- Assert.Equal(double.MaxValue, Math.Max(double.MinValue, double.MaxValue));
- Assert.Equal(double.PositiveInfinity, Math.Max(double.NegativeInfinity, double.PositiveInfinity));
- Assert.Equal(double.NaN, Math.Max(double.PositiveInfinity, double.NaN));
- Assert.Equal(double.NaN, Math.Max(double.NaN, double.NaN));
- }
-
[Theory]
[InlineData(double.NegativeInfinity, double.PositiveInfinity, double.PositiveInfinity)]
[InlineData(double.MinValue, double.MaxValue, double.MaxValue)]
[InlineData(2.0, -3.0, 2.0)]
[InlineData(3.0, -2.0, 3.0)]
[InlineData(double.PositiveInfinity, double.NaN, double.NaN)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Max_Double_NotNetFramework(double x, double y, double expectedResult)
{
AssertEqual(expectedResult, Math.Max(x, y), 0.0);
Assert.Equal(sbyte.MaxValue, Math.Max(sbyte.MinValue, sbyte.MaxValue));
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Max_Single_NetFramework()
- {
- Assert.Equal(3.0f, Math.Max(3.0f, -2.0f));
- Assert.Equal(float.MaxValue, Math.Max(float.MinValue, float.MaxValue));
- Assert.Equal(float.PositiveInfinity, Math.Max(float.NegativeInfinity, float.PositiveInfinity));
- Assert.Equal(float.NaN, Math.Max(float.PositiveInfinity, float.NaN));
- Assert.Equal(float.NaN, Math.Max(float.NaN, float.NaN));
- }
-
[Theory]
[InlineData(float.NegativeInfinity, float.PositiveInfinity, float.PositiveInfinity)]
[InlineData(float.MinValue, float.MaxValue, float.MaxValue)]
[InlineData(2.0f, -3.0f, 2.0f)]
[InlineData(3.0f, -2.0f, 3.0f)]
[InlineData(float.PositiveInfinity, float.NaN, float.NaN)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Max_Single_NotNetFramework(float x, float y, float expectedResult)
{
AssertEqual(expectedResult, Math.Max(x, y), 0.0f);
Assert.Equal(decimal.MinValue, Math.Min(decimal.MinValue, decimal.MaxValue));
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Min_Double_NetFramework()
- {
- Assert.Equal(-2.0, Math.Min(3.0, -2.0));
- Assert.Equal(double.MinValue, Math.Min(double.MinValue, double.MaxValue));
- Assert.Equal(double.NegativeInfinity, Math.Min(double.NegativeInfinity, double.PositiveInfinity));
- Assert.Equal(double.NaN, Math.Min(double.NegativeInfinity, double.NaN));
- Assert.Equal(double.NaN, Math.Min(double.NaN, double.NaN));
- }
-
[Theory]
[InlineData(double.NegativeInfinity, double.PositiveInfinity, double.NegativeInfinity)]
[InlineData(double.MinValue, double.MaxValue, double.MinValue)]
[InlineData(2.0, -3.0, -3.0)]
[InlineData(3.0, -2.0, -2.0)]
[InlineData(double.PositiveInfinity, double.NaN, double.NaN)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Min_Double_NotNetFramework(double x, double y, double expectedResult)
{
AssertEqual(expectedResult, Math.Min(x, y), 0.0);
Assert.Equal(sbyte.MinValue, Math.Min(sbyte.MinValue, sbyte.MaxValue));
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Min_Single_NetFramework()
- {
- Assert.Equal(-2.0f, Math.Min(3.0f, -2.0f));
- Assert.Equal(float.MinValue, Math.Min(float.MinValue, float.MaxValue));
- Assert.Equal(float.NegativeInfinity, Math.Min(float.NegativeInfinity, float.PositiveInfinity));
- Assert.Equal(float.NaN, Math.Min(float.NegativeInfinity, float.NaN));
- Assert.Equal(float.NaN, Math.Min(float.NaN, float.NaN));
- }
-
[Theory]
[InlineData(float.NegativeInfinity, float.PositiveInfinity, float.NegativeInfinity)]
[InlineData(float.MinValue, float.MaxValue, float.MinValue)]
[InlineData(2.0f, -3.0f, -3.0f)]
[InlineData(3.0f, -2.0f, -2.0f)]
[InlineData(float.PositiveInfinity, float.NaN, float.NaN)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Min_Single_NotNetFramework(float x, float y, float expectedResult)
{
AssertEqual(expectedResult, Math.Min(x, y), 0.0f);
[InlineData( double.NaN, -0.0, 1.0, CrossPlatformMachineEpsilon * 10)]
[InlineData( double.NaN, 0.0, 1.0, CrossPlatformMachineEpsilon * 10)]
[InlineData( 1.0, double.NaN, 1.0, CrossPlatformMachineEpsilon * 10)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Pow_IEEE(float x, float y, float expectedResult, float allowedVariance)
{
AssertEqual(expectedResult, Math.Pow(x, y), allowedVariance);
}
- [Theory]
- [InlineData(-1.0, double.NegativeInfinity, double.NaN, 0.0)]
- [InlineData(-1.0, double.PositiveInfinity, double.NaN, 0.0)]
- [InlineData( double.NaN, -0.0, double.NaN, 0.0)]
- [InlineData( double.NaN, 0.0, double.NaN, 0.0)]
- [InlineData( 1.0, double.NaN, double.NaN, 0.0)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Pow_IEEE_Legacy(float x, float y, float expectedResult, float allowedVariance)
- {
- AssertEqual(expectedResult, Math.Pow(x, y), allowedVariance);
- }
-
[Fact]
public static void Round_Decimal()
{
[Theory]
[InlineData(-1.5707963267948966, -16331239353195370.0, 0.0)] // value: -(pi / 2)
[InlineData( 1.5707963267948966, 16331239353195370.0, 0.0)] // value: (pi / 2)
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Tan_PiOver2(double value, double expectedResult, double allowedVariance)
{
AssertEqual(expectedResult, Math.Tan(value), allowedVariance);
}
[Theory]
- [InlineData(-1.5707963267948966, -16331778728383844.0, 0.0)] // value: -(pi / 2)
- [InlineData( 1.5707963267948966, 16331778728383844.0, 0.0)] // value: (pi / 2)
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Tan_PiOver2_Legacy(double value, double expectedResult, double allowedVariance)
- {
- AssertEqual(expectedResult, Math.Tan(value), allowedVariance);
- }
-
- [Theory]
[InlineData( double.NegativeInfinity, -1.0, CrossPlatformMachineEpsilon * 10)]
[InlineData(-3.1415926535897932, -0.99627207622074994, CrossPlatformMachineEpsilon)] // value: -(pi)
[InlineData(-2.7182818284590452, -0.99132891580059984, CrossPlatformMachineEpsilon)] // value: -(e)
[InlineData( float.NegativeInfinity, float.PositiveInfinity, -0.785398163f, CrossPlatformMachineEpsilon)] // expected: -(pi / 4)
[InlineData( float.PositiveInfinity, float.NegativeInfinity, 2.35619449f, CrossPlatformMachineEpsilon * 10)] // expected: (3 * pi / 4
[InlineData( float.PositiveInfinity, float.PositiveInfinity, 0.785398163f, CrossPlatformMachineEpsilon)] // expected: (pi / 4)
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Atan2_IEEE(float y, float x, float expectedResult, float allowedVariance)
{
AssertEqual(expectedResult, MathF.Atan2(y, x), allowedVariance);
}
[Theory]
- [InlineData( float.NegativeInfinity, float.NegativeInfinity, float.NaN, 0.0f)]
- [InlineData( float.NegativeInfinity, float.PositiveInfinity, float.NaN, 0.0f)]
- [InlineData( float.PositiveInfinity, float.NegativeInfinity, float.NaN, 0.0f)]
- [InlineData( float.PositiveInfinity, float.PositiveInfinity, float.NaN, 0.0f)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Atan2_IEEE_Legacy(float y, float x, float expectedResult, float allowedVariance)
- {
- AssertEqual(expectedResult, MathF.Atan2(y, x), allowedVariance);
- }
-
- [Theory]
[InlineData( float.NegativeInfinity, float.NaN, 0.0f)]
[InlineData(-3.14159265f, float.NaN, 0.0f)] // value: -(pi)
[InlineData(-2.71828183f, float.NaN, 0.0f)] // value: -(e)
[InlineData( float.NaN, -0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)]
[InlineData( float.NaN, 0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)]
[InlineData( 1.0f, float.NaN, 1.0f, CrossPlatformMachineEpsilon * 10)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Pow_IEEE(float x, float y, float expectedResult, float allowedVariance)
{
AssertEqual(expectedResult, MathF.Pow(x, y), allowedVariance);
}
- [Theory]
- [InlineData(-1.0f, float.NegativeInfinity, float.NaN, 0.0f)]
- [InlineData(-1.0f, float.PositiveInfinity, float.NaN, 0.0f)]
- [InlineData( float.NaN,-0.0f, float.NaN, 0.0f)]
- [InlineData( float.NaN, 0.0f, float.NaN, 0.0f)]
- [InlineData( 1.0f, float.NaN, float.NaN, 0.0f)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Pow_IEEE_Legacy(float x, float y, float expectedResult, float allowedVariance)
- {
- AssertEqual(expectedResult, MathF.Pow(x, y), allowedVariance);
- }
-
public static IEnumerable<object[]> Round_Digits_TestData
{
get
public static class AssemblyNameProxyTests
{
[Fact]
- [ActiveIssue("https://github.com/dotnet/corert/issues/3253 - AssemblyName.GetAssemblyName(string file) not supported on UapAot", TargetFrameworkMonikers.UapAot)]
public static void GetAssemblyName_AssemblyNameProxy()
{
AssemblyNameProxy anp = new AssemblyNameProxy();
public static class VersioningHelperTests
{
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "r3 suffix is hardcoded in .NET Core and return code is not documented")]
public static void MakeVersionSafeNameTest()
{
string str1 = VersioningHelper.MakeVersionSafeName("TestFile", ResourceScope.Process, ResourceScope.AppDomain);
-#if uapaot
- Assert.NotNull(str1);
-#else
Assert.Equal($"TestFile_r3_ad{AppDomain.CurrentDomain.Id}", str1);
-#endif
}
}
}
}
[Fact]
- [ActiveIssue(27098, TargetFrameworkMonikers.NetFramework)]
public static void TestOrdinal_EmbeddedNull_ReturnsDifferentHashCodes()
{
StringComparer sc = StringComparer.Ordinal;
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{9C77C3CA-7067-4D45-BDFE-CC62AB5C1ED5}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Unix;
- netstandard-Windows_NT;
+ netcoreapp-Windows_NT;
netcoreapp-Unix;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
Console.WriteLine($"### FRAMEWORK: Version={Environment.Version} Description={RuntimeInformation.FrameworkDescription.Trim()}");
- if (!PlatformDetection.IsNetNative)
- {
- string binariesLocation = Path.GetDirectoryName(typeof(object).Assembly.Location);
- string binariesLocationFormat = PlatformDetection.IsInAppContainer ? "Unknown" : new DriveInfo(binariesLocation).DriveFormat;
- Console.WriteLine($"### BINARIES: {binariesLocation} (drive format {binariesLocationFormat})");
- }
+ string binariesLocation = Path.GetDirectoryName(typeof(object).Assembly.Location);
+ string binariesLocationFormat = PlatformDetection.IsInAppContainer ? "Unknown" : new DriveInfo(binariesLocation).DriveFormat;
+ Console.WriteLine($"### BINARIES: {binariesLocation} (drive format {binariesLocationFormat})");
string tempPathLocation = Path.GetTempPath();
string tempPathLocationFormat = PlatformDetection.IsInAppContainer ? "Unknown" : new DriveInfo(tempPathLocation).DriveFormat;
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.UapAot)]
- public void VerifyRuntimeNameOnNetNative()
- {
- Assert.True(RuntimeInformation.FrameworkDescription.StartsWith(".NET Native"), RuntimeInformation.FrameworkDescription);
- Assert.Same(RuntimeInformation.FrameworkDescription, RuntimeInformation.FrameworkDescription);
- }
-
- [Fact]
public void VerifyOSDescription()
{
Assert.NotNull(RuntimeInformation.OSDescription);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[PlatformSpecific(TestPlatforms.Windows)]
public void VerifyWindowsDescriptionDoesNotContainTrailingWhitespace()
{
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{9B4D1DA9-AA4C-428F-9F66-D45C924025A5}</ProjectGuid>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CheckArchitectureTests.cs" />
<Compile Include="CheckPlatformTests.cs" />
- <Compile Include="CheckPlatformTests.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="CheckPlatformTests.netcoreapp.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
<Compile Include="DescriptionNameTests.cs" />
<Compile Include="$(CommonPath)\Interop\Linux\cgroups\Interop.cgroups.cs">
<Link>Common\Interop\Linux\Interop.cgroups.cs</Link>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uapaot-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp;
uap-Windows_NT;
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{27F624C8-06E3-455D-B5D1-C0FEB343EFAA}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "No reliable way to check if a type is WinRT in AOT")]
public void GetActivationFactory_NotExportedType_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>("type", () => WindowsRuntimeMarshal.GetActivationFactory(typeof(int)));
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
netcoreapp-Windows_NT;
netcoreapp-Unix;
- netfx-Windows_NT;
uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<ProjectGuid>{A824F4CD-935B-4496-A1B2-C3664936DA7B}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Runtime\InteropServices\UnknownWrapperTests.cs" />
<Compile Include="System\Runtime\InteropServices\UnmanagedFunctionPointerAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\VariantWrapperTests.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
<Compile Include="System\Runtime\CompilerServices\IDispatchConstantAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\AutomationProxyAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\ImportedFromTypeLibAttributeTests.cs" />
[InlineData(null, 1)]
[InlineData(new int[] { 1 }, 5)]
[InlineData(new int[] { 2 }, -1)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/corefx/issues/34699")]
public void Ctor_InvalidOffset_ThrowsIndexOutOfRangeException(object array, int offset)
{
Assert.Throws<IndexOutOfRangeException>(() => new ArrayWithOffset(array, offset));
{
#pragma warning disable 0618 // ComEventsHelper is marked as Obsolete.
public class ComEventsHelperTests
- {
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.UapAot, "Throws PlatformNotSupportedException in UapAot")]
- public void Combine_UapAot_PlatformNotSupportedException()
- {
- Assert.Throws<PlatformNotSupportedException>(() => ComEventsHelper.Combine(null, Guid.Empty, 1, null));
- }
-
+ {
[Fact]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void Combine_Unix_ThrowsPlatformNotSupportedException()
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Throws PlatformNotSupportedException in UapAot")]
public void Combine_NullRcw_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>(null, () => ComEventsHelper.Combine(null, Guid.Empty, 1, null));
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Throws PlatformNotSupportedException in UapAot")]
public void Combine_NotComObject_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>("obj", () => ComEventsHelper.Combine(1, Guid.Empty, 1, null));
}
- [SkipOnTargetFramework(~TargetFrameworkMonikers.UapAot, "Throws PlatformNotSupportedException in UapAot")]
- public void Remove_UapAot_ThrowsPlatformNotSupportedException()
- {
- Assert.Throws<PlatformNotSupportedException>(() => ComEventsHelper.Remove(null, Guid.Empty, 1, null));
- }
-
[Fact]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void Remove_Unix_ThrowPlatformNotSupportedException()
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Throws PlatformNotSupportedException in UapAot")]
public void Remove_NullRcw_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>(null, () => ComEventsHelper.Remove(null, Guid.Empty, 1, null));
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "ComEventsHelper.Combine is not supported in .NET Core.")]
public void Remove_NotComObject_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>("obj", () => ComEventsHelper.Remove(1, Guid.Empty, 1, null));
[Theory]
[InlineData("")]
[InlineData(0)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Marshal.GetIDispatchForObject is not supported in .NET Core.")]
public void Ctor_NonNull_ThrowsPlatformNotSupportedException(object value)
{
Assert.Throws<PlatformNotSupportedException>(() => new DispatchWrapper(value));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot,"Reflects on private member handleCount")]
public static void Add_Overflows_ThrowsInvalidOperationException()
{
HandleCollector collector = new HandleCollector("CountOverflow", int.MaxValue);
[InlineData(-1)]
[InlineData(0)]
[InlineData(2)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "This has been removed from the ref in .NET Core and from the source in the .NET Framework.")]
public void Ctor_ImplTypeShort(short implType)
{
Type type = typeof(HandleCollector).Assembly.GetType(TypeName);
namespace System.Runtime.InteropServices.Tests
{
public partial class CreateWrapperOfTypeTests
- {
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.CreateWrapperOfType is not supported on .NET Core.")]
- public void CreateWrapperOfType_NonGenericHasNoWrapper_ReturnsExpected()
- {
- var comObject = new ComImportObject();
- object wrapper = Marshal.CreateWrapperOfType(comObject, typeof(WrapperComImportObject));
- Assert.Same(wrapper, Marshal.GetComObjectData(comObject, typeof(WrapperComImportObject)));
- }
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.CreateWrapperOfType is not supported on .NET Core.")]
- public void CreateWrapperOfType_NonGenericHasNoWrapperWithInterfaces_ReturnsExpected()
- {
- var comObject = new ComImportObject();
- object wrapper = Marshal.CreateWrapperOfType(comObject, typeof(HasNonCOMInterfaces));
- Assert.Same(wrapper, Marshal.GetComObjectData(comObject, typeof(HasNonCOMInterfaces)));
- }
-
- [ComImport]
- [Guid("927971f5-0939-11d1-8be1-00c04fd8d503")]
- public class HasNonCOMInterfaces : NonGenericInterface, GenericInterface<string> { }
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.CreateWrapperOfType is not supported on .NET Core.")]
- public void CreateWrapperOfType_GenericHasNoWrapper_ReturnsExpected()
- {
- var comObject = new ComImportObject();
- object wrapper = Marshal.CreateWrapperOfType<ComImportObject, HasNonCOMInterfaces>(comObject);
- Assert.Same(wrapper, Marshal.GetComObjectData(comObject, typeof(HasNonCOMInterfaces)));
- }
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.CreateWrapperOfType is not supported on .NET Core.")]
- public void CreateWrapperOfType_GenericHasNoWrapperWithInterfaces_ReturnsExpected()
- {
- var comObject = new ComImportObject();
- object wrapper = Marshal.CreateWrapperOfType<ComImportObject, HasNonCOMInterfaces>(comObject);
- Assert.Same(wrapper, Marshal.GetComObjectData(comObject, typeof(HasNonCOMInterfaces)));
- }
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.CreateWrapperOfType is not supported on .NET Core.")]
- public void CreateWrapperOfType_AlreadyHasWrapper_ReturnsExpected()
- {
- var comObject = new ComImportObject();
- Marshal.SetComObjectData(comObject, typeof(WrapperComImportObject), "data");
-
- Assert.Same("data", Marshal.CreateWrapperOfType(comObject, typeof(WrapperComImportObject)));
- }
-
- [ComImport]
- [Guid("927971f5-0939-11d1-8be1-00c04fd8d503")]
- public class WrapperComImportObject { }
-
+ {
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
[SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void CreateWrapperOfType_SameType_ReturnsSameInstance()
AssertExtensions.Throws<ArgumentException>("o", () => Marshal.CreateWrapperOfType(10, typeof(ComImportObject)));
AssertExtensions.Throws<ArgumentException>("o", () => Marshal.CreateWrapperOfType<int, ComImportObject>(10));
}
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.CreateWrapperOfType is not supported on .NET Core.")]
- public void CreateWrapperOfType_AlreadyHasWrapperOfBadType_ThrowsInvalidCastException()
- {
- var comObject = new ComImportObject();
- Marshal.SetComObjectData(comObject, typeof(WrapperComImportObject), "data");
-
- Assert.Throws<InvalidCastException>(() => Marshal.CreateWrapperOfType<ComImportObject, WrapperComImportObject>(comObject));
- }
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.CreateWrapperOfType is not supported on .NET Core.")]
- public void CreateWrapperOfType_CantAssignInterfaces_ThrowsInvalidCastException()
- {
- var comObject = new ComImportObject();
- Assert.Throws<InvalidCastException>(() => Marshal.CreateWrapperOfType(comObject, typeof(HasCOMInterfaces)));
- }
-
- public class HasCOMInterfaces : ComImportObject, IComImportObject { }
}
}
yield return new object[] { typeof(GenericClass<>).GetTypeInfo().GenericTypeParameters[0] };
-#if !netstandard // TODO: Enable for netstandard2.1
AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.Run);
ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module");
TypeBuilder typeBuilder = moduleBuilder.DefineType("Type");
yield return new object[] { typeBuilder };
-#endif
}
[Theory]
{
yield return new object[] { typeof(int) };
yield return new object[] { typeof(int).MakePointerType() };
- // Crashes with .NET Framework.
- if (!PlatformDetection.IsFullFramework)
- {
- yield return new object[] { typeof(int).MakeByRefType() };
- }
+ yield return new object[] { typeof(int).MakeByRefType() };
yield return new object[] { typeof(string) };
yield return new object[] { typeof(string[]) };
yield return new object[] { typeof(GenericInterface<string>) };
yield return new object[] { typeof(GenericClass<>) };
- // Crashes with .NET Framework.
- if (!PlatformDetection.IsFullFramework)
- {
- yield return new object[] { typeof(GenericClass<>).GetTypeInfo().GenericTypeParameters[0] };
- }
+ yield return new object[] { typeof(GenericClass<>).GetTypeInfo().GenericTypeParameters[0] };
yield return new object[] { typeof(ClassWithGuidAttribute) };
-#if !netstandard // TODO: Enable for netstandard2.1
AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect);
ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module");
TypeBuilder typeBuilder = moduleBuilder.DefineType("Type");
Type collectibleType = typeBuilder.CreateType();
yield return new object[] { collectibleType };
-#endif
}
[Theory]
{
if (type.HasElementType)
{
- // [ActiveIssue(30940, ~TargetFrameworkMonikers.NetFramework)]
if (PlatformDetection.IsNetCore)
{
Assert.Equal(Guid.Empty, type.GUID);
yield return new object[] { typeof(GenericClass<>) };
yield return new object[] { typeof(GenericClass<>).GetTypeInfo().GenericTypeParameters[0] };
-#if !netstandard // TODO: Enable for netstandard2.1
AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect);
ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module");
TypeBuilder typeBuilder = moduleBuilder.DefineType("Type");
Type collectibleType = typeBuilder.CreateType();
yield return new object[] { collectibleType };
-#endif
- }
-
- [Theory]
- [ActiveIssue(30927, ~TargetFrameworkMonikers.NetFramework)]
- [MemberData(nameof(GenerateProgIdForType_Invalid_TestData))]
- public void GenerateProgIdForType_InvalidType_ThrowsArgumentException(Type type)
- {
- AssertExtensions.Throws<ArgumentException>("type", () => Marshal.GenerateProgIdForType(type));
- }
-
- [Fact]
- [ActiveIssue(30927, ~TargetFrameworkMonikers.NetFramework)]
- public void GenerateProgIdForType_NotRuntimeType_ThrowsNotSupportedException()
- {
- AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.Run);
- ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module");
- TypeBuilder typeBuilder = moduleBuilder.DefineType("Type");
- Assert.Throws<NotSupportedException>(() => Marshal.GenerateProgIdForType(typeBuilder));
}
}
}
yield return new object[] { typeof(NonComVisibleStruct) };
yield return new object[] { typeof(NonComVisibleInterface) };
-#if !netstandard // TODO: Enable for netstandard2.1
AssemblyBuilder collectibleAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect);
ModuleBuilder collectibleModuleBuilder = collectibleAssemblyBuilder.DefineDynamicModule("Module");
TypeBuilder collectibleTypeBuilder = collectibleModuleBuilder.DefineType("Type", TypeAttributes.Interface | TypeAttributes.Abstract);
Type collectibleType = collectibleTypeBuilder.CreateType();
yield return new object[] { collectibleType };
-#endif
}
[Theory]
VerifyDelegate(functionDelegate, targetMethod);
}
-#if !netstandard // TODO: Enable for netstandard2.1
[Fact]
public void GetDelegateForFunctionPointer_CollectibleType_ReturnsExpected()
{
GC.KeepAlive(d);
VerifyDelegate(functionDelegate, targetMethod);
}
-#endif
[Fact]
public void GetDelegateForFunctionPointer_Generic_ReturnsExpected()
namespace System.Runtime.InteropServices.Tests
{
public partial class GetEndComSlotTests
- {
- [Theory]
- [InlineData(typeof(int), -1)]
- [InlineData(typeof(string), -1)]
- [InlineData(typeof(NonGenericClass), -1)]
- [InlineData(typeof(NonGenericStruct), -1)]
- [InlineData(typeof(NonGenericInterface), 6)]
- [InlineData(typeof(int*), -1)]
- [PlatformSpecific(TestPlatforms.Windows)]
- [ActiveIssue(31068, ~TargetFrameworkMonikers.NetFramework)]
- public void GetEndComSlot_ValidType_ReturnsExpected(Type type, int expected)
- {
- Assert.Equal(expected, Marshal.GetEndComSlot(type));
- }
-
+ {
[Fact]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void GetEndComSlot_Unix_ThrowsPlatformNotSupportedException()
yield return new object[] { typeof(int[][]) };
yield return new object[] { typeof(int[,]) };
-#if !netstandard // TODO: Enable for netstandard2.1
- AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect);
+ AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect);
ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module");
TypeBuilder typeBuilder = moduleBuilder.DefineType("Type");
Type collectibleType = typeBuilder.CreateType();
yield return new object[] { collectibleType };
-#endif
}
[Theory]
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void GetHINSTANCE_NonRuntimeModule_Returns_IntPtrMinusOne()
{
Assert.Equal((IntPtr)(-1), Marshal.GetHINSTANCE(new NonRuntimeModule()));
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void GetHINSTANCE_NonRuntimeModule_ThrowsArgumentNullException_NetFramework()
- {
- Assert.Throws<ArgumentNullException>(() => Marshal.GetHINSTANCE(new NonRuntimeModule()));
- }
-
private class NonRuntimeModule : Module
{
public NonRuntimeModule()
yield return new object[] { new AutoDispatchComObjectEmpty() };
yield return new object[] { new AutoDualComObjectEmpty() };
}
-
- [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
- [MemberData(nameof(GetIUnknownForObject_ComObject_TestData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.GetIDispatchForObject is not implemented in .NET Core.")]
- public void GetIDispatchForObject_ComObject_ReturnsExpected(object o)
- {
- GetIDispatchForObject_ValidObject_Roundtrips(o);
- }
}
}
{
public partial class GetIDispatchForObjectTests
{
- public static IEnumerable<object[]> GetIDispatchForObject_Valid_TestData()
- {
- yield return new object[] { new NonGenericClass() };
- yield return new object[] { new NonGenericStruct() };
- }
-
- [Theory]
- [MemberData(nameof(GetIDispatchForObject_Valid_TestData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.GetIDispatchForObject is not implemented in .NET Core.")]
- public void GetIDispatchForObject_ValidObject_Roundtrips(object o)
- {
- IntPtr ptr = Marshal.GetIDispatchForObject(o);
- try
- {
- Assert.NotEqual(IntPtr.Zero, ptr);
- }
- finally
- {
- Marshal.Release(ptr);
- }
- }
-
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Marshal.GetIDispatchForObject is not implemented in .NET Core.")]
public void GetIDispatchForObject_NetCore_ThrowsPlatformNotSupportedException()
{
Assert.Throws<PlatformNotSupportedException>(() => Marshal.GetIDispatchForObject(null));
}
-
- public static IEnumerable<object[]> GetIDispatchForObject_Invalid_TestData()
- {
- yield return new object[] { new GenericClass<string>() };
- yield return new object[] { new GenericStruct<string>() };
- }
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.GetIDispatchForObject is not implemented in .NET Core.")]
- public void GetIDispatchForObject_NullObject_ThrowsArgumentNullException()
- {
- AssertExtensions.Throws<ArgumentNullException>("o", () => Marshal.GetIDispatchForObject(null));
- }
-
- [Theory]
- [MemberData(nameof(GetIDispatchForObject_Invalid_TestData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.GetIDispatchForObject is not implemented in .NET Core.")]
- public void GetIDispatchForObject_InvalidObject_ThrowsInvalidCastException(object o)
- {
- Assert.Throws<InvalidCastException>(() => Marshal.GetIDispatchForObject(o));
- }
}
}
yield return new object[] { d, VarEnum.VT_DISPATCH, (IntPtr)(-1) };
}
- [Theory]
- [MemberData(nameof(GetNativeVariantForObject_RoundtrippingPrimitives_TestData))]
- [PlatformSpecific(TestPlatforms.Windows)]
- [ActiveIssue(31077, ~TargetFrameworkMonikers.NetFramework)]
- public void GetNativeVariantForObject_RoundtrippingPrimitives_Success(object primitive, VarEnum expectedVarType, IntPtr expectedValue)
+ private void GetNativeVariantForObject_RoundtrippingPrimitives_Success(object primitive, VarEnum expectedVarType, IntPtr expectedValue)
{
GetNativeVariantForObject_ValidObject_Success(primitive, expectedVarType, expectedValue, primitive);
}
[Theory]
[MemberData(nameof(GetNativeVariantForObject_NonRoundtrippingPrimitives_TestData))]
[PlatformSpecific(TestPlatforms.Windows)]
- [ActiveIssue(31077, ~TargetFrameworkMonikers.NetFramework)]
+ [ActiveIssue(31077)]
public void GetNativeVariantForObject_ValidObject_Success(object primitive, VarEnum expectedVarType, IntPtr expectedValue, object expectedRoundtripValue)
{
var v = new Variant();
yield return new object[] { new Color[] { Color.FromArgb(10) } };
}
- [Theory]
- [MemberData(nameof(GetNativeVariant_NotInteropCompatible_TestData))]
- [PlatformSpecific(TestPlatforms.Windows)]
- [ActiveIssue(31077, ~TargetFrameworkMonikers.NetFramework)]
- public void GetNativeVariant_NotInteropCompatible_ThrowsArgumentException(object obj)
- {
- var v = new Variant();
- IntPtr pNative = Marshal.AllocHGlobal(Marshal.SizeOf(v));
- try
- {
- AssertExtensions.Throws<ArgumentException>(null, () => Marshal.GetNativeVariantForObject(obj, pNative));
- AssertExtensions.Throws<ArgumentException>(null, () => Marshal.GetNativeVariantForObject<object>(obj, pNative));
- }
- finally
- {
- Marshal.FreeHGlobal(pNative);
- }
- }
-
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
public void GetNativeVariant_InvalidArray_ThrowsSafeArrayTypeMismatchException()
};
var obj = new object();
-#if !netstandard // Marshal.GetIDispatchForObject is not in netstandard2.0
if (!PlatformDetection.IsNetCore)
{
IntPtr dispatch = Marshal.GetIDispatchForObject(obj);
{
Assert.Throws<PlatformNotSupportedException>(() => Marshal.GetIDispatchForObject(obj));
}
-#endif
// VT_ERROR => int.
yield return new object[]
namespace System.Runtime.InteropServices.Tests
{
public partial class GetStartComSlotTests
- {
- [Theory]
- [InlineData(typeof(int), -1)]
- [InlineData(typeof(string), -1)]
- [InlineData(typeof(NonGenericClass), -1)]
- [InlineData(typeof(NonGenericStruct), -1)]
- [InlineData(typeof(NonGenericInterface), 7)]
- [InlineData(typeof(int*), -1)]
- [PlatformSpecific(TestPlatforms.Windows)]
- [ActiveIssue(31068, ~TargetFrameworkMonikers.NetFramework)]
- public void GetStartComSlot_ValidType_ReturnsExpected(Type type, int expected)
- {
- Assert.Equal(expected, Marshal.GetStartComSlot(type));
- }
-
+ {
[Fact]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void GetStartComSlot_Unix_ThrowsPlatformNotSupportedException()
yield return new object[] { typeof(int[][]) };
yield return new object[] { typeof(int[,]) };
-#if !netstandard // TODO: Enable for netstandard2.1
AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect);
ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module");
TypeBuilder typeBuilder = moduleBuilder.DefineType("Type");
Type collectibleType = typeBuilder.CreateType();
yield return new object[] { collectibleType };
-#endif
}
[Theory]
yield return new object[] { typeof(GenericClass<>) };
-#if !netstandard // TODO: Enable for netstandard2.1
AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.Run);
ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module");
TypeBuilder typeBuilder = moduleBuilder.DefineType("Type");
yield return new object[] { typeBuilder };
-#endif
}
[Theory]
yield return new object[] { new object(), typeof(int).MakePointerType() };
-#if !netstandard // TODO: Enable for netstandard2.1
AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect);
ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module");
TypeBuilder typeBuilder = moduleBuilder.DefineType("Type");
Type collectibleType = typeBuilder.CreateType();
yield return new object[] { new object(), collectibleType };
-#endif
}
[Theory]
yield return new object[] { new KeyValuePair<string, int>("key", 10) };
-#if !netstandard // TODO: Enable for netstandard2.1
AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect);
ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module");
TypeBuilder typeBuilder = moduleBuilder.DefineType("Type");
Type collectibleComImportObject = comImportTypeBuilder.CreateType();
yield return new object[] { collectibleComImportObject };
-#endif
}
[Theory]
// anything if the ptr is less than 64K.
Assert.Null(Marshal.PtrToStringUTF8((IntPtr)1));
}
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void PtrToStringUTF8_ZeroPointer_ThrowsArgumentNullException()
- {
- AssertExtensions.Throws<ArgumentNullException>("ptr", () => Marshal.PtrToStringUTF8(IntPtr.Zero, 123));
- }
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void PtrToStringUTF8_NegativeLength_ThrowsArgumentExeption()
- {
- AssertExtensions.Throws<ArgumentException>("byteLen", null, () => Marshal.PtrToStringUTF8(new IntPtr(123), -77));
- }
}
}
AssertExtensions.Throws<ArgumentException>("structureType", () => Marshal.PtrToStructure((IntPtr)1, structureType));
}
-#if !netstandard // TODO: Enable for netstandard2.1
[Fact]
public void PtrToStructure_NonRuntimeType_ThrowsArgumentException()
{
TypeBuilder typeBuilder = moduleBuilder.DefineType("Type");
AssertExtensions.Throws<ArgumentException>("structureType", "type", () => Marshal.PtrToStructure((IntPtr)1, (Type)typeBuilder));
}
-#endif
public static IEnumerable<object[]> PtrToStructure_NonBlittableType_TestData()
{
yield return new object[] { new object(), IID_IINSPECTABLE };
yield return new object[] { 10, IID_IUNKNOWN };
- // [ActiveIssue(31079, ~TargetFrameworkMonikers.NetFramework)]
if (!PlatformDetection.IsNetCore)
{
yield return new object[] { 10, IID_IDISPATCH };
yield return new object[] { 10, IID_IINSPECTABLE };
yield return new object[] { "string", IID_IUNKNOWN };
- // [ActiveIssue(31079, ~TargetFrameworkMonikers.NetFramework)]
if (!PlatformDetection.IsNetCore)
{
yield return new object[] { "string", IID_IDISPATCH };
yield return new object[] { "string", IID_IINSPECTABLE };
yield return new object[] { new NonGenericClass(), IID_IUNKNOWN };
- // [ActiveIssue(31079, ~TargetFrameworkMonikers.NetFramework)]
if (!PlatformDetection.IsNetCore)
{
yield return new object[] { new NonGenericClass(), IID_IDISPATCH };
yield return new object[] { new GenericClass<string>(), IID_IINSPECTABLE };
yield return new object[] { new NonGenericStruct(), IID_IUNKNOWN };
- // [ActiveIssue(31079, ~TargetFrameworkMonikers.NetFramework)]
if (!PlatformDetection.IsNetCore)
{
yield return new object[] { new NonGenericStruct(), IID_IDISPATCH };
yield return new object[] { new GenericStruct<string>(), IID_IINSPECTABLE };
yield return new object[] { Int32Enum.Value1, IID_IUNKNOWN };
- // [ActiveIssue(31079, ~TargetFrameworkMonikers.NetFramework)]
if (!PlatformDetection.IsNetCore)
{
yield return new object[] { Int32Enum.Value1, IID_IDISPATCH };
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")]
public void ReadByte_NullObject_ThrowsAccessViolationException()
{
Assert.Throws<AccessViolationException>(() => Marshal.ReadByte(null, 2));
}
-#if !netstandard // TODO: Enable for netstandard2.1
[Fact]
public void ReadByte_NotReadable_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>(null, () => Marshal.ReadByte(collectibleObject, 0));
}
-#endif
[Fact]
public void WriteByte_ZeroPointer_ThrowsException()
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")]
public void WriteByte_NullObject_ThrowsAccessViolationException()
{
Assert.Throws<AccessViolationException>(() => Marshal.WriteByte(null, 2, 0));
}
-#if !netstandard // TODO: Enable for netstandard2.1
[Fact]
public void WriteByte_NotReadable_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>(null, () => Marshal.WriteByte(collectibleObject, 0, 0));
}
-#endif
public struct BlittableStruct
{
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")]
public void ReadInt16_NullObject_ThrowsAccessViolationException()
{
Assert.Throws<AccessViolationException>(() => Marshal.ReadInt16(null, 2));
}
-#if !netstandard // TODO: Enable for netstandard2.1
[Fact]
public void ReadInt16_NotReadable_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>(null, () => Marshal.ReadInt16(collectibleObject, 0));
}
-#endif
[Fact]
public void WriteInt16_ZeroPointer_ThrowsException()
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")]
public void WriteInt16_NullObject_ThrowsAccessViolationException()
{
Assert.Throws<AccessViolationException>(() => Marshal.WriteInt16(null, 2, 0));
}
-#if !netstandard // TODO: Enable for netstandard2.1
[Fact]
public void WriteInt16_NotReadable_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>(null, () => Marshal.WriteInt16(collectibleObject, 0, 0));
}
-#endif
public struct BlittableStruct
{
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")]
public void ReadInt32_NullObject_ThrowsAccessViolationException()
{
Assert.Throws<AccessViolationException>(() => Marshal.ReadInt32(null, 2));
}
-#if !netstandard // TODO: Enable for netstandard2.1
[Fact]
public void ReadInt32_NotReadable_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>(null, () => Marshal.ReadInt32(collectibleObject, 0));
}
-#endif
[Fact]
public void WriteInt32_ZeroPointer_ThrowsException()
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")]
public void WriteInt32_NullObject_ThrowsAccessViolationException()
{
Assert.Throws<AccessViolationException>(() => Marshal.WriteInt32(null, 2, 0));
}
-#if !netstandard // TODO: Enable for netstandard2.1
[Fact]
public void WriteInt32_NotReadable_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>(null, () => Marshal.WriteInt32(collectibleObject, 0, 0));
}
-#endif
public struct BlittableStruct
{
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")]
public void ReadInt64_NullObject_ThrowsAccessViolationException()
{
Assert.Throws<AccessViolationException>(() => Marshal.ReadInt64(null, 2));
}
-#if !netstandard // TODO: Enable for netstandard2.1
[Fact]
public void ReadInt64_NotReadable_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>(null, () => Marshal.ReadInt64(collectibleObject, 0));
}
-#endif
[Fact]
public void WriteInt64_ZeroPointer_ThrowsException()
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")]
public void WriteInt64_NullObject_ThrowsAccessViolationException()
{
Assert.Throws<AccessViolationException>(() => Marshal.WriteInt64(null, 2, 0));
}
-#if !netstandard // TODO: Enable for netstandard2.1
[Fact]
public void WriteInt64_NotReadable_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>(null, () => Marshal.WriteInt64(collectibleObject, 0, 0));
}
-#endif
public struct BlittableStruct
{
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")]
public void ReadIntPtr_NullObject_ThrowsAccessViolationException()
{
Assert.Throws<AccessViolationException>(() => Marshal.ReadIntPtr(null, 2));
}
-#if !netstandard // TODO: Enable for netstandard2.1
[Fact]
public void ReadIntPtr_NotReadable_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>(null, () => Marshal.ReadIntPtr(collectibleObject, 0));
}
-#endif
[Fact]
public void WriteIntPtr_ZeroPointer_ThrowsException()
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")]
public void WriteIntPtr_NullObject_ThrowsAccessViolationException()
{
Assert.Throws<AccessViolationException>(() => Marshal.WriteIntPtr(null, 2, (IntPtr)0));
}
-#if !netstandard // TODO: Enable for netstandard2.1
[Fact]
public void WriteIntPtr_NotReadable_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>(null, () => Marshal.WriteIntPtr(collectibleObject, 0, IntPtr.Zero));
}
-#endif
public struct BlittableStruct
{
yield return new object[] { typeof(GenericClass<>).GetTypeInfo().GenericTypeParameters[0], null };
-#if !netstandard // TODO: Enable for netstandard2.1
AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.Run);
ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module");
TypeBuilder typeBuilder = moduleBuilder.DefineType("Type");
yield return new object[] { typeBuilder, "t" };
-#endif
yield return new object[] { typeof(TestStructWithFxdLPSTRSAFld), null };
}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public unsafe void StructureToPtr_StructWithBlittableFixedBuffer_In_NonBlittable_Success()
{
var str = default(NonBlittableContainingBuffer);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public unsafe void StructureToPtr_NonBlittableStruct_WithBlittableFixedBuffer_Success()
{
NonBlittableWithBlittableBuffer x = new NonBlittableWithBlittableBuffer();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public unsafe void StructureToPtr_OpaqueStruct_In_NonBlittableStructure_Success()
{
NonBlittableWithOpaque x = new NonBlittableWithOpaque();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "SystemConfigurationFile is not supported on .NET Core.")]
public void SystemConfigurationFile_Get_ThrowsPlatformNotSupportedException()
{
Assert.Throws<PlatformNotSupportedException>(() => RuntimeEnvironment.SystemConfigurationFile);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "GetRuntimeInterfaceAsObject is not supported on .NET Core.")]
public void GetRuntimeInterfaceAsObject_Invoke_ThrowsPlatformNotSupportedException()
{
Assert.Throws<PlatformNotSupportedException>(() => RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid.Empty, Guid.Empty));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "GetRuntimeInterfaceAsIntPtr is not supported on .NET Core.")]
public void GetRuntimeInterfaceAsIntPtr_Invoke_ThrowsPlatformNotSupportedException()
{
Assert.Throws<PlatformNotSupportedException>(() => RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr(Guid.Empty, Guid.Empty));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "FromGlobalAccessCache always returns true on .NET Core.")]
public void FromGlobalAccessCache_nNvoke_ReturnsFalse()
{
Assert.False(RuntimeEnvironment.FromGlobalAccessCache(typeof(RuntimeEnvironmentTests).Assembly));
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void Initialize_NumBytesTimesSizeOfEachElement_NetFramework_ThrowsOverflowException()
- {
- var buffer = new SubBuffer(true);
- Assert.Throws<OverflowException>(() => buffer.Initialize(uint.MaxValue, uint.MaxValue));
- Assert.Throws<OverflowException>(() => buffer.Initialize<int>(uint.MaxValue));
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void Initialize_NumBytesTimesSizeOfEachElement_ThrowsArgumentOutOfRangeExceptionIfNot64Bit()
{
var buffer = new SubBuffer(true);
private const string TypeName = "System.Runtime.InteropServices.SetWin32ContextInIDispatchAttribute";
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "This has been removed from the ref in .NET Core and from the source in the .NET Framework.")]
public void Ctor_Default_ExistsInSrc()
{
Type type = typeof(HandleCollector).Assembly.GetType(TypeName);
namespace System.Runtime.Loader.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "AssemblyLoadContext not supported on .NET Native")]
public partial class AssemblyLoadContextTest
{
private const string TestAssembly = "System.Runtime.Loader.Test.Assembly";
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "AssemblyLoadContext not supported on .NET Native")]
public class DefaultLoadContextTests
{
private const string TestAssemblyName = "System.Runtime.Loader.Noop.Assembly";
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "AssemblyLoadContext not supported on .NET Native")]
public class RefEmitLoadContextTests
{
public static string s_loadFromPath = null;
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] // Desktop misses Exception.ParamName fixed in .NETCore
- public static void IComparable_Invalid_net46()
- {
- IComparable_Invalid(null);
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void IComparable_Invalid_netcore()
{
IComparable_Invalid("obj");
private static int s_seed = 0;
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void RunIsEvenTests()
{
Random random = new Random(s_seed);
[Fact]
[OuterLoop]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void RunDoubleExplicitCastFromLargeBigIntegerTests()
{
DoubleExplicitCastFromLargeBigIntegerTests(0, 4, 32, 3);
[Fact]
[OuterLoop]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void RunLargeValueLogTests()
{
LargeValueLogTests(0, 4, 64, 3);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void ModPow1Large2SmallInt_Threshold()
{
// Again, with lower threshold
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void ModPow2Large1SmallInt_Threshold()
{
// Again, with lower threshold
[InlineData("736513799451968530811005754031332418210960966881742655756522735504778110620671049112529346250333710388060811959329786494662578020803", "2461175085563866950903873687720858523536520498137697316698237108626602445202960480677695918813575265778826908481129155012799", "-4722693720735888562993277045098354134891725536023070176847814685098361292027040929352405620815883795027263132404351040", "4351573186631261607388198896754285562669240685903971199359912143458682154189588696264319780329366022294935204028039787")]
[InlineData("1596188639947986471148999794547338", "685242191738212089917782567856594513073397739443", "41848166029740752457613562518205823134173790454761036532025758411484449588176128053901271638836032557551179866133091058357374964041641117585422447497779410336188602585660372002644517668041207657383104649333118253", "39246949850380693159338034407642149926180988060650630387722725303281343126585456713282439764667310808891687831648451269002447916277601468727040185218264602698691553232132525542650964722093335105211816394635493987")]
[InlineData("-1506852741293695463963822334869441845197951776565891060639754936248401744065969556756496718308248025911048010080232290368562210204958094544173209793990218122", "64905085725614938357105826012272472070910693443851911667721848542473785070747281964799379996923261457185847459711", "2740467233603031668807697475486217767705051", "-1905434239471820365929630558127219204166613")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void ModPow3LargeInt(string value, string exponent, string modulus, string expected)
{
BigInteger valueInt = BigInteger.Parse(value);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void RunMultiply_TwoLargeBigIntegers_Threshold()
{
// Again, with lower threshold
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void RunOverflow()
{
var bytes = new byte[1000];
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void SqrtMinusOne()
{
Assert.Equal(Complex.Sqrt(-1.0), Complex.ImaginaryOne);
[Theory]
[MemberData(nameof(Abs_Advanced_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Abs_Advanced(double real, double imaginary, double expected)
{
var complex = new Complex(real, imaginary);
}
[Theory, MemberData(nameof(ACos_Advanced_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void ACos_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary)
{
var complex = new Complex(real, imaginary);
}
}
- [Theory, MemberData(nameof(ACos_Legacy_TestData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void ACos_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary)
- {
- var complex = new Complex(real, imaginary);
- Complex result = Complex.Acos(complex);
- VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary);
- }
-
public static IEnumerable<object[]> Add_TestData()
{
yield return new object[] { 0, 0, RandomPositiveDouble(), RandomPositiveDouble() }; // 0 + x = x
}
[Theory, MemberData(nameof(ASin_Advanced_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void ASin_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary)
{
var complex = new Complex(real, imaginary);
}
}
- [Theory, MemberData(nameof(ASin_Legacy_TestData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void ASin_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary)
- {
- var complex = new Complex(real, imaginary);
- Complex result = Complex.Asin(complex);
- VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary);
- }
-
[Theory]
[MemberData(nameof(Primitives_2_TestData))]
[MemberData(nameof(SmallRandom_2_TestData))]
[Theory]
[MemberData(nameof(Cos_Advanced_TestData_Shared))]
[MemberData(nameof(Cos_Advanced_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Cos_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary)
{
var complex = new Complex(real, imaginary);
}
[Theory]
- [MemberData(nameof(Cos_Advanced_TestData_Shared))]
- [MemberData(nameof(Cos_Legacy_TestData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Cos_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary)
- {
- var complex = new Complex(real, imaginary);
- Complex result = Complex.Cos(complex);
- VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary);
- }
-
-
- [Theory]
[MemberData(nameof(Primitives_2_TestData))]
[MemberData(nameof(SmallRandom_2_TestData))]
public static void Cosh_Basic(double real, double imaginary)
[Theory]
[MemberData(nameof(Cosh_Advanced_TestData_Shared))]
[MemberData(nameof(Cosh_Advanced_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Cosh_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary)
{
var complex = new Complex(real, imaginary);
yield return new object[] { double.MinValue, double.MinValue, double.NegativeInfinity, double.PositiveInfinity };
}
- [Theory]
- [MemberData(nameof(Cosh_Advanced_TestData_Shared))]
- [MemberData(nameof(Cosh_Legacy_TestData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Cosh_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary)
- {
- var complex = new Complex(real, imaginary);
- Complex result = Complex.Cosh(complex);
- VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary);
- }
-
public static IEnumerable<object[]> Divide_TestData()
{
yield return new object[] { 0, 0, 10, 50 }; // 0 / x = 0
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Equals_netcore()
{
// Invalid values
[MemberData(nameof(Exp_TestData))]
[MemberData(nameof(Primitives_2_TestData))]
[MemberData(nameof(SmallRandom_2_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Exp(double real, double imaginary)
{
Complex expected;
VerifyRealImaginaryProperties(result, expected.Real, expected.Imaginary);
}
- [Theory]
- [MemberData(nameof(Exp_TestData))]
- [MemberData(nameof(Primitives_2_TestData))]
- [MemberData(nameof(SmallRandom_2_TestData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Exp_Legacy(double real, double imaginary)
- {
- // This test validates legacy .NET Framework behavior.
- // The behavior of Math.Cos(double.MaxValue) is different and thus affects the expected results here.
-
- Complex expected;
- // Special case the complex {double.MaxValue, double.MaxValue)
- if (real == double.MaxValue && imaginary == double.MaxValue)
- {
- expected = new Complex(Math.Cos(double.MaxValue) * double.PositiveInfinity, double.PositiveInfinity);
- }
- else
- {
- // Verify with e(x+y) = e(x)*e(y) if xy == yx
- var realComplex = new Complex(real, 0);
- var imaginaryComplex = new Complex(0, imaginary);
-
- Complex ri = realComplex * imaginaryComplex;
- Complex ir = imaginaryComplex * realComplex;
- if (!ri.Equals(ir))
- {
- return;
- }
-
- Complex realExponential = Complex.Exp(realComplex);
- Complex imaginaryExpontential = Complex.Exp(imaginaryComplex);
- expected = realExponential * imaginaryExpontential;
- }
-
- var complex = new Complex(real, imaginary);
- Complex result = Complex.Exp(complex);
- VerifyRealImaginaryProperties(result, expected.Real, expected.Imaginary);
- }
-
[Fact]
public static void Exp_MaxReal()
{
[Theory]
[MemberData(nameof(FromPolarCoordinates_TestData))]
[MemberData(nameof(Invalid_2_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void FromPolarCoordinates(double magnitude, double phase)
{
Complex complex = Complex.FromPolarCoordinates(magnitude, phase);
VerifyMagnitudePhaseProperties(complex, magnitude, phase);
}
- [Theory]
- [MemberData(nameof(FromPolarCoordinates_TestData))]
- [MemberData(nameof(Invalid_2_TestData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void FromPolarCoordinates_Legacy(double magnitude, double phase)
- {
- Complex complex = Complex.FromPolarCoordinates(magnitude, phase);
-
- // double.IsNaN(magnitude) is checked in the verification method.
- if (double.IsNaN(phase) || double.IsInfinity(phase))
- {
- magnitude = double.NaN;
- phase = double.NaN;
- }
- // Special check in Complex.Abs method
- else if (double.IsInfinity(magnitude))
- {
- magnitude = double.PositiveInfinity;
- phase = double.NaN;
- }
-
- VerifyMagnitudePhaseProperties(complex, magnitude, phase);
-
- complex = new Complex(complex.Real, complex.Imaginary);
- VerifyMagnitudePhaseProperties(complex, magnitude, phase);
- }
-
[Fact]
public static IEnumerable<object[]> Log_TestData()
{
[Theory]
[MemberData(nameof(Sin_Advanced_TestData_Shared))]
[MemberData(nameof(Sin_Advanced_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Sin_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary)
{
var complex = new Complex(real, imaginary);
}
[Theory]
- [MemberData(nameof(Sin_Advanced_TestData_Shared))]
- [MemberData(nameof(Sin_Legacy_TestData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Sin_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary)
- {
- var complex = new Complex(real, imaginary);
- Complex result = Complex.Sin(complex);
- VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary);
- }
-
- [Theory]
[MemberData(nameof(Primitives_2_TestData))]
[MemberData(nameof(SmallRandom_2_TestData))]
public static void Sinh_Basic(double real, double imaginary)
[Theory]
[MemberData(nameof(Sinh_Advanced_TestData_Shared))]
[MemberData(nameof(Sinh_Advanced_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Sinh_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary)
{
var complex = new Complex(real, imaginary);
yield return new object[] { double.MinValue, double.MinValue, double.PositiveInfinity, double.NegativeInfinity };
}
- [Theory]
- [MemberData(nameof(Sinh_Advanced_TestData_Shared))]
- [MemberData(nameof(Sinh_Legacy_TestData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Sinh_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary)
- {
- var complex = new Complex(real, imaginary);
- Complex result = Complex.Sinh(complex);
- VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary);
- }
-
-
public static IEnumerable<object[]> Subtract_TestData()
{
yield return new object[] { RandomPositiveDouble(), RandomPositiveDouble(), 0, 0 }; // x - 0 = x
[Theory]
[MemberData(nameof(Sqrt_AdvancedTestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Sqrt_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary)
{
var complex = new Complex(real, imaginary);
}
[Theory, MemberData(nameof(Tan_Advanced_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Tan_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary)
{
var complex = new Complex(real, imaginary);
VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary);
}
- [Theory, MemberData(nameof(Tan_Legacy_TestData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Tan_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary)
- {
- var complex = new Complex(real, imaginary);
- Complex result = Complex.Tan(complex);
- VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary);
- }
-
[Theory]
[MemberData(nameof(Primitives_2_TestData))]
[MemberData(nameof(SmallRandom_2_TestData))]
}
[Theory, MemberData(nameof(Tanh_Advanced_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Tanh_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary)
{
var complex = new Complex(real, imaginary);
VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary);
}
- [Theory, MemberData(nameof(Tanh_Legacy_TestData))]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Tanh_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary)
- {
- var complex = new Complex(real, imaginary);
- Complex result = Complex.Tanh(complex);
- VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary);
- }
-
[Theory]
[MemberData(nameof(Boundaries_2_TestData))]
[MemberData(nameof(Primitives_2_TestData))]
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<ProjectGuid>{28AE24F8-BEF4-4358-B612-ADD9D587C8E1}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="BigInteger\absolutevalue.cs" />
var checkoutException2 = new CheckoutException("message", 0);
yield return new object[] { PopulateException(checkoutException2), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAElTeXN0ZW0sIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAuU3lzdGVtLkNvbXBvbmVudE1vZGVsLkRlc2lnbi5DaGVja291dEV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1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x461) } };
- // Assembly load errors with shims in uapaot configuration. Issue #24916
- if (!PlatformDetection.IsNetNative)
- {
- // System.Configuration
+ // System.Configuration
- var configurationErrorsException = new ConfigurationErrorsException("message", exception, "path.md", 1);
- // ConfigurationErrorsException sets its HResult itself therefore we pass setHResult as false.
- yield return new object[] { PopulateException(configurationErrorsException, setHResult: false), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uQ29uZmlndXJhdGlvbiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAADFTeXN0ZW0uQ29uZmlndXJhdGlvbi5Db25maWd1cmF0aW9uRXJyb3JzRXhjZXB0aW9uEQAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMIZmlsZW5hbWUEbGluZQ1maXJzdEZpbGVuYW1lCWZpcnN0TGluZQVjb3VudAEBAwMBAQEAAQABBwIAAQAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIICAgCAAAABgMAAAAxU3lzdGVtLkNvbmZpZ3VyYXRpb24uQ29uZmlndXJhdGlvbkVycm9yc0V4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAoCGROABgoAAAAXRXhjZXB0a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BWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDAAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDQAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDwAAAAkQAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAwAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhUAAAAGc2VjcmV0CAEBCRYAAAABDwAAAAUAAAAJFwAAAAIAAAACAAAAARAAAAAGAAAACQ0AAAAGGQAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFgAAAAwAAAAICAEAAAAGGgAAAANvbmUKARcAAAAMAAAACRUAAAAIAQEJHAAAAAEcAAAADAAAAAgIAQAAAAkaAAAACgs=", TargetFrameworkMoniker.netfx461) } };
+ var configurationErrorsException = new ConfigurationErrorsException("message", exception, "path.md", 1);
+ // ConfigurationErrorsException sets its HResult itself therefore we pass setHResult as false.
+ yield return new object[] { PopulateException(configur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YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDQAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDwAAAAkQAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAwAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhUAAAAGc2VjcmV0CAEBCRYAAAABDwAAAAUAAAAJFwAAAAIAAAACAAAAARAAAAAGAAAACQ0AAAAGGQAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFgAAAAwAAAAICAEAAAAGGgAAAANvbmUKARcAAAAMAAAACRUAAAAIAQEJHAAAAAEcAAAADAAAAAgIAQAAAAkaAAAACgs=", TargetFrameworkMoniker.netfx461) } };
#pragma warning disable CS0618 // Type or member is obsolete
- var configurationException = new ConfigurationException("message", exception, "path.md", 1);
+ var configurationException = new ConfigurationException("message", exception, "path.md", 1);
#pragma warning restore CS0618 // Type or member is obsolete
- // ConfigurationException sets its HResult itself therefore we pass setHResult as false.
- yield return new object[] { PopulateException(configurationException, setHResult: false), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAElTeXN0ZW0sIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVy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FN5c3RlbS5FeGNlcHRpb24JBAAAAAkPAAAACRAAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoEDAAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFQAAAAZzZWNyZXQIAQEJFgAAAAEPAAAABQAAAAkXAAAAAgAAAAIAAAABEAAAAAYAAAAJDQAAAAYZAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEWAAAADAAAAAgIAQAAAAYaAAAAA29uZQoBFwAAAAwAAAAJFQAAAAgBAQkcAAAAARwAAAAMAAAACAgBAAAACRoAAAAKCw==", TargetFrameworkMoniker.netfx461) } };
+ // ConfigurationException sets its HResult itself therefore we pass setHResult as false.
+ yield return new object[] { PopulateException(configurationException, setHResult: false), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAElTeXN0ZW0sIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAArU3lzdGVtLkNvbmZpZ3VyYXRpb24uQ29uZmlndXJhdGlvbkV4Y2VwdGlvbg4AAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzCGZpbGVuYW1lBGxpbmUBAQMDAQEBAAEAAQcBAClTeXN0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XNzYWdlCgoKCgoAAAAACgAVE4AKCgEWAAAADAAAAAgIAQAAAAYaAAAAA29uZQoBFwAAAAwAAAAJFQAAAAgBAQkcAAAAARwAAAAMAAAACAgBAAAACRoAAAAKCw==", TargetFrameworkMoniker.netfx461) } };
- var providerException = new ProviderException("message", exception);
- yield return new object[] { PopulateException(providerException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uQ29uZmlndXJhdGlvbiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAC9TeXN0ZW0uQ29uZmlndXJhdGlvbi5Qcm92aWRlci5Qcm92aWRlckV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAAvU3lzdGVtLkNvbmZpZ3VyYXRpb24uUHJvdmlkZXIuUHJvdmlkZXJFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlv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UcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYMAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkOAAAACQ8AAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netfx461) } };
+ var providerException = new ProviderException("message", exception);
+ yield return new object[] { PopulateException(providerException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uQ29uZmlndXJhdGlvbiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAC9TeXN0ZW0uQ29uZmlndXJhdGlvbi5Qcm92aWRlci5Qcm92aWRlckV4Y2VwdGlvbgwAAAAJQ2xhc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GVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netfx461) } };
- // System.Runtime.Serialization
- var invalidDataContractException = new InvalidDataContractException("message", exception);
- yield return new object[] { PopulateException(invalidDataContractException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAF9TeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAOVN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uSW52YWxpZERhdGFDb250cmFjdEV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAA5U3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5JbnZhbGlkRGF0YUNvbnRyYWN0RXhjZXB0aW9uBgQAAAAHbWV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TGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCwAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDAAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netfx461) } };
+ // System.Runtime.Serialization
+ var invalidDataContractException = new InvalidDataContractException("message", exception);
+ yield return new object[] { PopulateException(invalidDataContractException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAF9TeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAOVN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uSW52YWxpZERhdGFDb250cmFjdEV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAA5U3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5JbnZhbGlkRGF0YUNvbnRyYWN0RXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2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dIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDAAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netfx461) } };
- // System.Transactions
- var transactionAbortedException = new TransactionAbortedException("message", exception);
- yield return new object[] { PopulateException(transactionAbortedException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAL1N5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25BYm9ydGVkRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1v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YUAAAABnNlY3JldAgBAQkVAAAAAQ4AAAAFAAAACRYAAAACAAAAAgAAAAEPAAAABgAAAAkMAAAABhgAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARUAAAALAAAACAgBAAAABhkAAAADb25lCgEWAAAACwAAAAkUAAAACAEBCRsAAAABGwAAAAsAAAAICAEAAAAJGQAAAAoL", TargetFrameworkMoniker.netfx461) } };
+ // System.Transactions
+ var transactionAbortedException = new TransactionAbortedException("message", exception);
+ yield return new object[] { PopulateException(transactionAbortedException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAL1N5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25BYm9ydGVkRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgIAAAAGAwAAAC9TeXN0ZW0uVHJhbnNhY3Rpb25zLlRyYW5zYWN0aW9uQWJvcnRlZEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb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aW9uYXJ5Tm9kZQgICQsAAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgwAAAAQU3lzdGVtLkV4Y2VwdGlvbgkEAAAACQ4AAAAJDwAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQLAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYUAAAABnNlY3JldAgBAQkVAAAAAQ4AAAAFAAAACRYAAAACAAAAAgAAAAEPAAAABgAAAAkMAAAABhgAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARUAAAALAAAACAgBAAAABhkAAAADb25lCgEWAAAACwAAAAkUAAAACAEBCRsAAAABGwAAAAsAAAAICAEAAAAJGQAAAAoL", TargetFrameworkMoniker.netfx461) } };
- var transactionException = new TransactionException("message", exception);
- yield return new object[] { PopulateException(transactionException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwg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ERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netfx461) } };
+ var transactionException = new TransactionException("message", exception);
+ yield return new object[] { PopulateException(transactionException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAKFN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCAgAAAAYDAAAAKFN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25FeGNlcHRpb24GBAAAAAdtZ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lcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkLAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYMAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkOAAAACQ8AAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netfx461) } };
- var transactionInDoubtException = new TransactionInDoubtException("message", exception);
- yield return new object[] { PopulateException(transactionInDoubtException), new TypeSerializableValue[] { new TypeSerializableValue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lcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgwAAAAQU3lzdGVtLkV4Y2VwdGlvbgkEAAAACQ4AAAAJDwAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQLAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYUAAAABnNlY3JldAgBAQkVAAAAAQ4AAAAFAAAACRYAAAACAAAAAgAAAAEPAAAABgAAAAkMAAAABhgAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARUAAAALAAAACAgBAAAABhkAAAADb25lCgEWAAAACwAAAAkUAAAACAEBCRsAAAABGwAAAAsAAAAICAEAAAAJGQAAAAoL", TargetFrameworkMoniker.netfx461) } };
+ var transactionInDoubtException = new TransactionInDoubtException("message", exception);
+ yield return new object[] { PopulateException(transactionInDoubtException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAL1N5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25JbkRvdWJ0RXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1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IG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARUAAAALAAAACAgBAAAABhkAAAADb25lCgEWAAAACwAAAAkUAAAACAEBCRsAAAABGwAAAAsAAAAICAEAAAAJGQAAAAoL", TargetFrameworkMoniker.netfx461) } };
- var transactionManagerCommunicationException = new TransactionManagerCommunicationException("message", exception);
- yield return new object[] { PopulateException(transactionManagerCommunicationException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAPFN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25NYW5hZ2VyQ29tbXVuaWNhdGlvbkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAA8U3lzdGVtLlRyYW5zYWN0aW9ucy5UcmFuc2FjdGlvbk1hbmFnZXJDb21tdW5pY2F0aW9uRXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCgAAABdFeGNlcHRpb25fQ2xhc3Nf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GVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDAAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netfx461) } };
+ var transactionManagerCommunicationException = new TransactionManagerCommunicationException("message", exception);
+ yield return new object[] { PopulateException(transactionManagerCommunicationException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZ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uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netfx461) } };
- var transactionPromotionException = new TransactionPromotionException("message", exception);
- yield return new object[] { PopulateException(transactionPromotionException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAMVN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25Qcm9tb3Rpb25FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnR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sAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netfx461) } };
+ var transactionPromotionException = new TransactionPromotionException("message", exception);
+ yield return new object[] { PopulateException(transactionPromotionException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAMVN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25Qcm9tb3Rpb25FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCAgAAAAYDAAAAMVN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25Qcm9tb3Rpb25FeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U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EFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYMAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkOAAAACQ8AAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netfx461) } };
- // System.Xml
- var xPathException = new XPathException("message", exception);
- yield return new object[] { PopulateException(xPathException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAH1N5c3RlbS5YbWwuWFBhdGguWFBhdGhFeGNlcHRpb24PAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5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x1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhgAAAAGc2VjcmV0CAEBCRkAAAABEQAAAAUAAAAJGgAAAAIAAAACAAAAARIAAAAGAAAACQ8AAAAGHAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBGQAAAA4AAAAICAEAAAAGHQAAAANvbmUKARoAAAAOAAAACRgAAAAIAQEJHwAAAAEfAAAADgAAAAgIAQAAAAkdAAAACgs=", TargetFrameworkMoniker.netfx461) } };
+ // System.Xml
+ var xPathException = new XPathException("message", exception);
+ yield return new object[] { PopulateException(xPathException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAH1N5c3RlbS5YbWwuWFBhdGguWFBhdGhFeGNlcHRpb24PAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwd2ZXJzaW9uAQEDAwEBAQABAAEHAQYBKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAAfU3lzdGVtLlhtbC5YUGF0aC5YUGF0aEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrV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AAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkOAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYPAAAAEFN5c3RlbS5FeGNlcHRpb24GEAAAAAdtZXNzYWdlCREAAAAJEgAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAAChEMAAAAAQAAAAkQAAAABA4AAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhgAAAAGc2VjcmV0CAEBCRkAAAABEQAAAAUAAAAJGgAAAAIAAAACAAAAARIAAAAGAAAACQ8AAAAGHAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBGQAAAA4AAAAICAEAAAAGHQAAAANvbmUKARoAAAAOAAAACRgAAAAIAQEJHwAAAAEfAAAADgAAAAgIAQAAAAkdAAAACgs=", TargetFrameworkMoniker.netfx461) } };
- var xmlException = new XmlException("message", exception, 1, 1);
- yield return new object[] { PopulateException(xmlException),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GlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoRDAAAAAEAAAAJEAAAAAQOAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYYAAAABnNlY3JldAgBAQkZAAAAAREAAAAFAAAACRoAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhwAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARkAAAAOAAAACAgBAAAABh0AAAADb25lCgEaAAAADgAAAAkYAAAACAEBCR8AAAABHwAAAA4AAAAICAEAAAAJHQAAAAoL", TargetFrameworkMoniker.netfx461) } };
+ var xmlException = new XmlException("message", exception, 1, 1);
+ yield return new object[] { PopulateException(xmlException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAF1N5c3RlbS5YbWwuWG1sRXhjZXB0aW9uEgAAAAlDbGFz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FyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoRDAAAAAEAAAAJEAAAAAQOAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYYAAAABnNlY3JldAgBAQkZAAAAAREAAAAFAAAACRoAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhwAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARkAAAAOAAAACAgBAAAABh0AAAADb25lCgEaAAAADgAAAAkYAAAACAEBCR8AAAABHwAAAA4AAAAICAEAAAAJHQAAAAoL", TargetFrameworkMoniker.netfx461) } };
- var xmlSchemaException = new XmlSchemaException("message", exception, 1, 1);
- yield return new object[] { PopulateException(xmlSchemaException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAJFN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYUV4Y2VwdGlvbhIAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XY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sZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYYAAAABnNlY3JldAgBAQkZAAAAAREAAAAFAAAACRoAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhwAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARkAAAAOAAAACAgBAAAABh0AAAADb25lCgEaAAAADgAAAAkYAAAACAEBCR8AAAABHwAAAA4AAAAICAEAAAAJHQAAAAoL", TargetFrameworkMoniker.netfx461) } };
+ var xmlSchemaException = new XmlSchemaException("message", exception, 1, 1);
+ yield return new object[] { PopulateException(xmlSchemaException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAJFN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYUV4Y2VwdGlvbhIAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzA3JlcwRhcmdzCXNvdXJjZVVyaQpsaW5lTnVtYmVyDGxpbmVQb3NpdGlvbgd2ZXJzaW9uAQEDAwEBAQABAAEHAQYCAAABKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeG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lY3JldAgBAQkZAAAAAREAAAAFAAAACRoAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhwAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARkAAAAOAAAACAgBAAAABh0AAAADb25lCgEaAAAADgAAAAkYAAAACAEBCR8AAAABHwAAAA4AAAAICAEAAAAJHQAAAAoL", TargetFrameworkMoniker.netfx461) } };
- var xmlSchemaInferenceException = new XmlSchemaInferenceException("message", exception, 1, 1);
- yield return new object[] { PopulateException(xmlSchemaInferenceException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAALVN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYUluZmVyZW5jZUV4Y2VwdGlvbhIAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzA3JlcwRhcmdzCXNvdXJjZVVyaQpsaW5lTnVtYmVyDGxpbmVQb3NpdGlvbgd2ZXJzaW9uAQEDAwEBAQABAAEHAQYCAAABKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIICAIAAAAGAwAAAC1TeXN0ZW0uWG1sLlNjaGVtYS5YbWxTY2hlbWFJbmZlcmVuY2VFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc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AoKARkAAAAOAAAACAgBAAAABh0AAAADb25lCgEaAAAADgAAAAkYAAAACAEBCR8AAAABHwAAAA4AAAAICAEAAAAJHQAAAAoL", TargetFrameworkMoniker.netfx461) } };
+ var xmlSchemaInferenceException = new XmlSchemaInferenceException("message", exception, 1, 1);
+ yield return new object[] { PopulateException(xmlSchemaInferenceException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAALVN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYUluZmVyZW5jZUV4Y2VwdGlvbhIAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzA3JlcwRhcmdzCXNvdXJjZVVyaQpsaW5lTnVtYmVyDGxpbmVQb3NpdGlvbgd2ZXJzaW9uAQEDAwEBAQABAAEHAQYCAAABKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIICAIAAAAGAwAAAC1TeXN0ZW0uWG1sLlNjaGVtYS5YbWxTY2hlbWFJbmZlcmVuY2VFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlv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SchemaValidationException = new XmlSchemaValidationException("message", exception, 1, 1);
- yield return new object[] { PopulateException(xmlSchemaValidationException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAALlN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYVZhbGlkYXRpb25FeGNlcHRpb24SAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwlzb3VyY2VVcmkKbGluZU51bWJlcgxsaW5lUG9zaXRpb24HdmVyc2lvbgEBAwMBAQEAAQABBwEGAgAAASlTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCCAgCAAAABgMAAAAuU3lzdGVtLlhtbC5TY2hlbWEuWG1sU2NoZW1hVmFsaWRhdGlvbkV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBgsAAAADezB9CQwAAAAKAQAAAAEAAAAGDQAAAAMyLjAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbA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vZGUICAkOAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYPAAAAEFN5c3RlbS5FeGNlcHRpb24GEAAAAAdtZXNzYWdlCREAAAAJEgAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAAChEMAAAAAQAAAAkQAAAABA4AAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhgAAAAGc2VjcmV0CAEBCRkAAAABEQAAAAUAAAAJGgAAAAIAAAACAAAAARIAAAAGAAAACQ8AAAAGHAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBGQAAAA4AAAAICAEAAAAGHQAAAANvbmUKARoAAAAOAAAACRgAAAAIAQEJHwAAAAEfAAAADgAAAAgIAQAAAAkdAAAACgs=", TargetFrameworkMoniker.netfx461) } };
+ var xmlSchemaValidationException = new XmlSchemaValidationException("message", exception, 1, 1);
+ yield return new object[] { PopulateException(xmlSchemaValidationException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9u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ZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYPAAAAEFN5c3RlbS5FeGNlcHRpb24GEAAAAAdtZXNzYWdlCREAAAAJEgAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAAChEMAAAAAQAAAAkQAAAABA4AAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhgAAAAGc2VjcmV0CAEBCRkAAAABEQAAAAUAAAAJGgAAAAIAAAACAAAAARIAAAAGAAAACQ8AAAAGHAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBGQAAAA4AAAAICAEAAAAGHQAAAANvbmUKARoAAAAOAAAACRgAAAAIAQEJHwAAAAEfAAAADgAAAAgIAQAAAAkdAAAACgs=", TargetFrameworkMoniker.netfx461) } };
- var xsltCompileException = new XsltCompileException(exception, "///file", 1, 1);
- yield return new object[] { PopulateException(xsltCompileException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAI1N5c3RlbS5YbWwuWHNsLlhzbHRDb21waWxlRXhjZXB0aW9uEgAAAAlDbGFzc05hbWUHTWV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EFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoEDgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFwAAAAZzZWNyZXQIAQEJGAAAAAERAAAABQAAAAkZAAAAAgAAAAIAAAABEgAAAAYAAAAJDwAAAAYbAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEYAAAADgAAAAgIAQAAAAYcAAAAA29uZQoBGQAAAA4AAAAJFwAAAAgBAQkeAAAAAR4AAAAOAAAACAgBAAAACRwAAAAKCw==", TargetFrameworkMoniker.netfx461) } };
+ var xsltCompileException = new XsltCompileException(exception, "///file", 1, 1);
+ yield return new object[] { PopulateException(xsltCompileException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAI1N5c3RlbS5YbWwuWHNsLlhzbHRDb21waWxlRXhjZXB0aW9uEgAAAAlD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lvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoEDgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFwAAAAZzZWNyZXQIAQEJGAAAAAERAAAABQAAAAkZAAAAAgAAAAIAAAABEgAAAAYAAAAJDwAAAAYbAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEYAAAADgAAAAgIAQAAAAYcAAAAA29uZQoBGQAAAA4AAAAJFwAAAAgBAQkeAAAAAR4AAAAOAAAACAgBAAAACRwAAAAKCw==", TargetFrameworkMoniker.netfx461) } };
- var xsltException = new XsltException("message", exception);
- yield return new object[] { PopulateException(xsltException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAHFN5c3RlbS5YbWwuWHNsLlhzbHRFeGNlcHRpb24SAAAACUNsYXNzTmFtZQdNZ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QcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBA0AAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhYAAAAGc2VjcmV0CAEBCRcAAAABEAAAAAUAAAAJGAAAAAIAAAACAAAAAREAAAAGAAAACQ4AAAAGGgAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFwAAAA0AAAAICAEAAAAGGwAAAANvbmUKARgAAAANAAAACRYAAAAIAQEJHQAAAAEdAAAADQAAAAgIAQAAAAkbAAAACgs=", TargetFrameworkMoniker.netfx461) } };
- }
+ var xsltException = new XsltException("message", exception);
+ yield return new object[] { PopulateException(xsltException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAHFN5c3RlbS5YbWwuWHNsLlhzbHRFeGNlcHRpb24SAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwlzb3VyY2VVcmkKbGluZU51bWJlcgxsaW5lUG9zaXRpb24HdmVyc2lvbgEBAwMBAQEAAQABBwECAgAAASlTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnR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leGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFwAAAA0AAAAICAEAAAAGGwAAAANvbmUKARgAAAANAAAACRYAAAAIAQEJHQAAAAEdAAAADQAAAAgIAQAAAAkbAAAACgs=", TargetFrameworkMoniker.netfx461) } };
// Assembly load error with shims in uap/uapaot configuration. Issue #24916
if (!PlatformDetection.IsUap)
yield return new object[] { EqualityComparer<double?>.Default, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTnVsbGFibGVFcXVhbGl0eUNvbXBhcmVyYDFbW1N5c3RlbS5Eb3VibGUsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAAAAAAs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTnVsbGFibGVFcXVhbGl0eUNvbXBhcmVyYDFbW1N5c3RlbS5Eb3VibGUsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAAAAAAs=", TargetFrameworkMoniker.netfx461) } };
// Equality comparers which can roundtrip
- object byteEqualityComparer;
-
- // NET Native doesn't create ByteEqualityComparer with EqualityComparer.Default, so create it through reflection
- if (PlatformDetection.IsNetNative)
- {
- Type byteEqualityComparerType = Type.GetType("System.Collections.Generic.ByteEqualityComparer", true);
- byteEqualityComparer = Activator.CreateInstance(byteEqualityComparerType);
- }
- else
- {
- byteEqualityComparer = EqualityComparer<byte>.Default;
- }
-
- yield return new object[] { byteEqualityComparer, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAC9TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5CeXRlRXF1YWxpdHlDb21wYXJlcgAAAAAL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAC9TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5CeXRlRXF1YWxpdHlDb21wYXJlcgAAAAAL", TargetFrameworkMoniker.netfx461) } };
+ yield return new object[] { EqualityComparer<byte>.Default, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAC9TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5CeXRlRXF1YWxpdHlDb21wYXJlcgAAAAAL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAC9TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5CeXRlRXF1YWxpdHlDb21wYXJlcgAAAAAL", TargetFrameworkMoniker.netfx461) } };
yield return new object[] { EqualityComparer<Int32Enum>.Default, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAN4BU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuRW51bUVxdWFsaXR5Q29tcGFyZXJgMVtbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkludDMyRW51bSwgU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLCBWZXJzaW9uPTQuMC4zLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49OWQ3N2NjN2FkMzliNjhlYl1dAAAAAAs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAN4BU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuRW51bUVxdWFsaXR5Q29tcGFyZXJgMVtbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkludDMyRW51bSwgU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLCBWZXJzaW9uPTQuMC4zLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49OWQ3N2NjN2FkMzliNjhlYl1dAAAAAAs=", TargetFrameworkMoniker.netfx461) } };
// Other core serializable types
yield return new object[] { new Collection<Tuple<int, Graph<int>>>(), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAO4DU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLkNvbGxlY3Rpb25gMVtbU3lzdGVtLlR1cGxlYDJbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkdyYXBoYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIFN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cywgVmVyc2lvbj00LjAuMy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTlkNzdjYzdhZDM5YjY4ZWJdXSwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0BAAAABW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MVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXSwgU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLCBWZXJzaW9uPTQuMC4zLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49OWQ3N2NjN2FkMzliNjhlYl1dCw==", TargetFrameworkMoniker.netfx461) } };
yield return new object[] { new Collection<Tuple<int, Graph<int>>>(new Tuple<int, Graph<int>>[] { Tuple.Create(1, new Graph<int>()), Tuple.Create(5, new Graph<int>()) }), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAO4DU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLkNvbGxlY3Rpb25gMVtbU3lzdGVtLlR1cGxlYDJbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkdyYXBoYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIFN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cywgVmVyc2lvbj00LjAuMy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTlkNzdjYzdhZDM5YjY4ZWJdXSwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3V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XJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMuR3JhcGhgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQIAAAAFVmFsdWUFTGlua3MABAiUAVN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cy5HcmFwaGAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dW10FAAAABQAAAAAAAAAKAQcAAAAGAAAAAAAAAAoL", TargetFrameworkMoniker.netfx461) } };
- // NET Native bug 445667 causes a crash in reflecting over multidimensional arrays
- if (!PlatformDetection.IsNetNative)
- {
- yield return new object[] { new object[] { new int[,] { { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 10 }, { 11, 12, 13, 14, 15 } } }, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgIAAAADAAAABQAAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAACw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgIAAAADAAAABQAAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAACw==", TargetFrameworkMoniker.netfx461) } };
- yield return new object[] { new object[] { new int[,,] { { { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 10 }, { 11, 12, 13, 14, 15 } } } }, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgMAAAABAAAAAwAAAAUAAAAACAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAAs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgMAAAABAAAAAwAAAAUAAAAACAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAAs=", TargetFrameworkMoniker.netfx461) } };
- yield return new object[] { new object[] { new int[,,,] { { { { 1 } } } } }, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgQAAAABAAAAAQAAAAEAAAABAAAAAAgBAAAACw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgQAAAABAAAAAQAAAAEAAAABAAAAAAgBAAAACw==", TargetFrameworkMoniker.netfx461) } };
- }
+ yield return new object[] { new object[] { new int[,] { { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 10 }, { 11, 12, 13, 14, 15 } } }, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgIAAAADAAAABQAAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAACw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgIAAAADAAAABQAAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAACw==", TargetFrameworkMoniker.netfx461) } };
+ yield return new object[] { new object[] { new int[,,] { { { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 10 }, { 11, 12, 13, 14, 15 } } } }, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgMAAAABAAAAAwAAAAUAAAAACAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAAs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgMAAAABAAAAAwAAAAUAAAAACAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAAs=", TargetFrameworkMoniker.netfx461) } };
+ yield return new object[] { new object[] { new int[,,,] { { { { 1 } } } } }, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgQAAAABAAAAAQAAAAEAAAABAAAAAAgBAAAACw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgQAAAABAAAAAQAAAAEAAAABAAAAAAgBAAAACw==", TargetFrameworkMoniker.netfx461) } };
yield return new object[] { new ArraySegment<int>(new int[] { 1, 2, 3, 4, 5 }), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAHJTeXN0ZW0uQXJyYXlTZWdtZW50YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0DAAAABl9hcnJheQdfb2Zmc2V0Bl9jb3VudAcAAAgICAkCAAAAAAAAAAUAAAAPAgAAAAUAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAHJTeXN0ZW0uQXJyYXlTZWdtZW50YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0DAAAABl9hcnJheQdfb2Zmc2V0Bl9jb3VudAcAAAgICAkCAAAAAAAAAAUAAAAPAgAAAAUAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAL", TargetFrameworkMoniker.netfx461) } };
yield return new object[] { new ArraySegment<int>(new int[] { 1, 2, 3, 4, 5 }, 1, 2), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAHJTeXN0ZW0uQXJyYXlTZWdtZW50YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0DAAAABl9hcnJheQdfb2Zmc2V0Bl9jb3VudAcAAAgICAkCAAAAAQAAAAIAAAAPAgAAAAUAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAHJTeXN0ZW0uQXJyYXlTZWdtZW50YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0DAAAABl9hcnJheQdfb2Zmc2V0Bl9jb3VudAcAAAgICAkCAAAAAQAAAAIAAAAPAgAAAAUAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAL", TargetFrameworkMoniker.netfx461) } };
yield return new object[] { Array.CreateInstance(typeof(uint), new[] { 5 }, new[] { 1 }), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAHAQAAAAMBAAAABQAAAAEAAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAACw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAHAQAAAAMBAAAABQAAAAEAAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAACw==", TargetFrameworkMoniker.netfx461) } };
}
- // NET Native bug 445667 causes a crash in reflecting over multidimensional arrays
- if (!PlatformDetection.IsNetNative)
- {
- yield return new object[] { Array.CreateInstance(typeof(int), new[] { 0, 0, 0 }, new[] { 0, 0, 0 }), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAHAQAAAAIDAAAAAAAAAAAAAAAAAAAAAAgL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAHAQAAAAIDAAAAAAAAAAAAAAAAAAAAAAgL", TargetFrameworkMoniker.netfx461) } };
- }
+ yield return new object[] { Array.CreateInstance(typeof(int), new[] { 0, 0, 0 }, new[] { 0, 0, 0 }), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAHAQAAAAIDAAAAAAAAAAAAAAAAAAAAAAgL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAHAQAAAAIDAAAAAAAAAAAAAAAAAAAAAAgL", TargetFrameworkMoniker.netfx461) } };
if (PlatformDetection.IsNonZeroLowerBoundArraySupported)
{
var arr = Array.CreateInstance(typeof(string), new[] { 1, 2 }, new[] { 3, 4 });
exception.Data.Add("secret", true);
exception.Data.Add(1, "one");
- // Exceptions are reflection blocked in uapaot
- if (!PlatformDetection.IsNetNative)
+ typeof(Exception)
+ .GetField("_stackTraceString", BindingFlags.Instance | BindingFlags.NonPublic)
+ .SetValue(exception, "StackTrace string...");
+ if (setHResult)
{
typeof(Exception)
- .GetField("_stackTraceString", BindingFlags.Instance | BindingFlags.NonPublic)
- .SetValue(exception, "StackTrace string...");
- if (setHResult)
- {
- typeof(Exception)
- .GetField("_HResult", BindingFlags.Instance | BindingFlags.NonPublic)
- .SetValue(exception, 1000);
- }
- typeof(Exception)
- .GetField("_remoteStackTraceString", BindingFlags.Instance | BindingFlags.NonPublic)
- .SetValue(exception, "Remote StackTrace string...");
+ .GetField("_HResult", BindingFlags.Instance | BindingFlags.NonPublic)
+ .SetValue(exception, 1000);
}
+ typeof(Exception)
+ .GetField("_remoteStackTraceString", BindingFlags.Instance | BindingFlags.NonPublic)
+ .SetValue(exception, "Remote StackTrace string...");
return exception;
}
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework fails when serializing arrays with non-zero lower bounds")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "UAPAOT does not support non-zero lower bounds")]
public void Roundtrip_ArrayContainingArrayAtNonZeroLowerBound()
{
BinaryFormatterHelpers.Clone(Array.CreateInstance(typeof(uint[]), new[] { 5 }, new[] { 1 }));
<PropertyGroup>
<!-- Needs netfx configuration per bug (dotnet/corefx #17575) so tests are actively running in desktop -->
<BuildConfigurations>
- netstandard;
+ uap;
netfx;
netcoreapp;
</BuildConfigurations>
CheckEquals(@this.InnerException, other.InnerException, isSamePlatform);
}
- if (!PlatformDetection.IsFullFramework && !PlatformDetection.IsNetNative)
+ if (!PlatformDetection.IsFullFramework)
{
// Different by design for those exceptions
if (!((@this is NetworkInformationException || @this is SocketException) && !isSamePlatform))
}
}
- if (!PlatformDetection.IsNetNative)
+ // Different by design for those exceptions
+ if (!((@this is NetworkInformationException || @this is SocketException) && !isSamePlatform))
{
- // Different by design for those exceptions
- if (!((@this is NetworkInformationException || @this is SocketException) && !isSamePlatform))
- {
- Assert.Equal(@this.HResult, other.HResult);
- }
+ Assert.Equal(@this.HResult, other.HResult);
}
}
<SkipIncludeNewtonsoftJson>true</SkipIncludeNewtonsoftJson>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="BinaryFormatterTestData.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
- uapaot;
+ netcoreapp;
+ uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
static DataContractJsonSerializerTests()
{
- if (!PlatformDetection.IsFullFramework)
- {
- MethodInfo method = typeof(DataContractSerializer).GetMethod(SerializationOptionSetterName, BindingFlags.NonPublic | BindingFlags.Static);
- Assert.True(method != null, $"No method named {SerializationOptionSetterName}");
- method.Invoke(null, new object[] { 1 });
- }
+ MethodInfo method = typeof(DataContractSerializer).GetMethod(SerializationOptionSetterName, BindingFlags.NonPublic | BindingFlags.Static);
+ Assert.True(method != null, $"No method named {SerializationOptionSetterName}");
+ method.Invoke(null, new object[] { 1 });
}
#endif
[Fact]
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void DCJS_FloatAsRoot_NetFramework()
- {
- Assert.StrictEqual(SerializeAndDeserialize<float>(float.MinValue, "-3.40282347E+38"), float.MinValue);
- Assert.StrictEqual(SerializeAndDeserialize<float>(float.MaxValue, "3.40282347E+38"), float.MaxValue);
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void DCJS_FloatAsRoot_NotNetFramework()
{
Assert.StrictEqual(SerializeAndDeserialize<float>(float.MinValue, "-3.4028235E+38"), float.MinValue);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Implemented in 4.7. and Xunit runner currently targets 4.6.1.")]
public static void DCJS_StringAsRoot()
{
foreach (string value in new string[] { "abc", " a b ", null, "", " ", "Hello World! 漢 ñ" })
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
- uapaot;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<DefineConstants>$(DefineConstants);ReflectionOnly</DefineConstants>
<ProjectGuid>{C99A835E-46F3-4C05-AD34-7DD84FB7466B}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release;uapaot-Debug;uapaot-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Runtime\Serialization\Utils.cs" />
<Compile Include="$(TestSourceFolder)..\..\..\System.Runtime.Serialization.Xml\tests\SerializationTypes.cs" />
<Compile Include="$(TestSourceFolder)..\..\..\System.Runtime.Serialization.Xml\tests\SerializationTypes.RuntimeOnly.cs" />
- <Compile Include="$(TestSourceFolder)..\DataContractJsonSerializer.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'uapaot'">
<Compile Include="$(TestSourceFolder)..\DataContractJsonSerializer.CoreCLR.cs" />
<Compile Include="$(TestSourceFolder)..\..\..\System.Runtime.Serialization.Xml\tests\SerializationTypes.CoreCLR.cs" />
+ <Compile Include="$(TestSourceFolder)..\DataContractJsonSerializer.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)'=='uapaot'">
+ <ItemGroup>
<EmbeddedResource Include="$(MsBuildThisFileDirectory)Resources\$(AssemblyName).rd.xml" />
</ItemGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{173F6978-B961-4D1C-84E4-06468772D019}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release;uapaot-Debug;uapaot-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'uapaot'">
+ <ItemGroup>
+ <Compile Include="$(TestSourceFolder)DataContractJsonSerializer.cs" />
<Compile Include="$(TestSourceFolder)DataContractJsonSerializer.CoreCLR.cs" />
<Compile Include="$(TestSourceFolder)..\..\System.Runtime.Serialization.Xml\tests\SerializationTypes.CoreCLR.cs" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="$(CommonTestPath)\System\Runtime\Serialization\Utils.cs" />
<Compile Include="$(TestSourceFolder)..\..\System.Runtime.Serialization.Xml\tests\SerializationTypes.cs" />
<Compile Include="$(TestSourceFolder)..\..\System.Runtime.Serialization.Xml\tests\SerializationTypes.RuntimeOnly.cs" />
- <Compile Include="$(TestSourceFolder)DataContractJsonSerializer.cs" />
+ <Compile Include="$(CommonTestPath)\System\Runtime\Serialization\Utils.cs" />
</ItemGroup>
</Project>
\ No newline at end of file
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{43341081-27A8-4CFB-8B89-C63CE457EAC2}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Runtime\Serialization\CollectionDataContractAttributeTests.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
uap;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<ProjectGuid>{D3AD82FC-051D-4121-8E48-B13CE8024776}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(TestSourceFolder)CanonicalizationTestHelper.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
- uapaot;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
static DataContractSerializerTests()
{
- if (!PlatformDetection.IsFullFramework)
- {
- MethodInfo method = typeof(DataContractSerializer).GetMethod(SerializationOptionSetterName, BindingFlags.NonPublic | BindingFlags.Static);
- Assert.True(method != null, $"No method named {SerializationOptionSetterName}");
- method.Invoke(null, new object[] { 1 });
- }
+ MethodInfo method = typeof(DataContractSerializer).GetMethod(SerializationOptionSetterName, BindingFlags.NonPublic | BindingFlags.Static);
+ Assert.True(method != null, $"No method named {SerializationOptionSetterName}");
+ method.Invoke(null, new object[] { 1 });
}
#endif
[Fact]
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void DCS_FloatAsRoot_NetFramework()
- {
- Assert.StrictEqual(DataContractSerializerHelper.SerializeAndDeserialize<float>(float.MinValue, @"<float xmlns=""http://schemas.microsoft.com/2003/10/Serialization/"">-3.40282347E+38</float>"), float.MinValue);
- Assert.StrictEqual(DataContractSerializerHelper.SerializeAndDeserialize<float>(float.MaxValue, @"<float xmlns=""http://schemas.microsoft.com/2003/10/Serialization/"">3.40282347E+38</float>"), float.MaxValue);
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void DCS_FloatAsRoot_NotNetFramework()
{
Assert.StrictEqual(DataContractSerializerHelper.SerializeAndDeserialize<float>(float.MinValue, @"<float xmlns=""http://schemas.microsoft.com/2003/10/Serialization/"">-3.4028235E+38</float>"), float.MinValue);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework has an implementation and does not throw InvalidOperationException")]
public static void XsdDataContractExporterTest()
{
XsdDataContractExporter exporter = new XsdDataContractExporter();
SerializationTestTypes.ComparisonHelper.CompareRecursively(value, actual);
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void DCS_BasicRoundTripResolvePrimitiveTypes_NetFramework()
- {
- string baseline = @"<ObjectContainer xmlns=""http://schemas.datacontract.org/2004/07/SerializationTestTypes"" xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""><_data i:type=""a:PrimitiveContainer_foo"" xmlns:a=""http://www.default.com""><a i:type=""a:Boolean_foo"">false</a><array1><anyType xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""/><anyType xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""/><anyType xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""/></array1><b i:type=""a:Byte_foo"">255</b><c i:type=""a:Byte_foo"">0</c><d i:type=""a:Char_foo"">65535</d><e i:type=""a:Decimal_foo"">79228162514264337593543950335</e><f i:type=""a:Decimal_foo"">-1</f><f5 i:type=""a:DateTime_foo"">9999-12-31T23:59:59.9999999</f5><g i:type=""a:Decimal_foo"">-79228162514264337593543950335</g><guidData i:type=""a:Guid_foo"">4bc848b1-a541-40bf-8aa9-dd6ccb6d0e56</guidData><h i:type=""a:Decimal_foo"">1</h><i i:type=""a:Decimal_foo"">0</i><j i:type=""a:Decimal_foo"">0</j><k i:type=""a:Double_foo"">0</k><l i:type=""a:Double_foo"">4.94065645841247E-324</l><lDTO xmlns:b=""http://schemas.datacontract.org/2004/07/System""/><m i:type=""a:Double_foo"">1.7976931348623157E+308</m><n i:type=""a:Double_foo"">-1.7976931348623157E+308</n><nDTO i:type=""a:DateTimeOffset_foo""><DateTime xmlns=""http://schemas.datacontract.org/2004/07/System"">9999-12-31T23:59:59.9999999Z</DateTime><OffsetMinutes xmlns=""http://schemas.datacontract.org/2004/07/System"">0</OffsetMinutes></nDTO><o i:type=""a:Double_foo"">NaN</o><obj/><p i:type=""a:Double_foo"">-INF</p><q i:type=""a:Double_foo"">INF</q><r i:type=""a:Single_foo"">0</r><s i:type=""a:Single_foo"">1.401298E-45</s><strData i:nil=""true""/><t i:type=""a:Single_foo"">-3.40282347E+38</t><timeSpan i:type=""a:TimeSpan_foo"">P10675199DT2H48M5.4775807S</timeSpan><u i:type=""a:Single_foo"">3.40282347E+38</u><uri>http://www.microsoft.com/</uri><v i:type=""a:Single_foo"">NaN</v><w i:type=""a:Single_foo"">-INF</w><x i:type=""a:Single_foo"">INF</x><xmlQualifiedName i:type=""a:XmlQualifiedName_foo"" xmlns:b=""http://www.microsoft.com"">b:WCF</xmlQualifiedName><y i:type=""a:Int32_foo"">0</y><z i:type=""a:Int32_foo"">2147483647</z><z1 i:type=""a:Int32_foo"">-2147483648</z1><z2 i:type=""a:Int64_foo"">0</z2><z3 i:type=""a:Int64_foo"">9223372036854775807</z3><z4 i:type=""a:Int64_foo"">-9223372036854775808</z4><z5/><z6 i:type=""a:SByte_foo"">0</z6><z7 i:type=""a:SByte_foo"">127</z7><z8 i:type=""a:SByte_foo"">-128</z8><z9 i:type=""a:Int16_foo"">0</z9><z91 i:type=""a:Int16_foo"">32767</z91><z92 i:type=""a:Int16_foo"">-32768</z92><z93 i:type=""a:String_foo"">abc</z93><z94 i:type=""a:UInt16_foo"">0</z94><z95 i:type=""a:UInt16_foo"">65535</z95><z96 i:type=""a:UInt16_foo"">0</z96><z97 i:type=""a:UInt32_foo"">0</z97><z98 i:type=""a:UInt32_foo"">4294967295</z98><z99 i:type=""a:UInt32_foo"">0</z99><z990 i:type=""a:UInt64_foo"">0</z990><z991 i:type=""a:UInt64_foo"">18446744073709551615</z991><z992 i:type=""a:UInt64_foo"">0</z992><z993>AQIDBA==</z993></_data><_data2 i:type=""a:PrimitiveContainer_foo"" xmlns:a=""http://www.default.com""><a i:type=""a:Boolean_foo"">false</a><array1><anyType xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""/><anyType xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""/><anyType xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""/></array1><b i:type=""a:Byte_foo"">255</b><c i:type=""a:Byte_foo"">0</c><d i:type=""a:Char_foo"">65535</d><e i:type=""a:Decimal_foo"">79228162514264337593543950335</e><f i:type=""a:Decimal_foo"">-1</f><f5 i:type=""a:DateTime_foo"">9999-12-31T23:59:59.9999999</f5><g i:type=""a:Decimal_foo"">-79228162514264337593543950335</g><guidData i:type=""a:Guid_foo"">4bc848b1-a541-40bf-8aa9-dd6ccb6d0e56</guidData><h i:type=""a:Decimal_foo"">1</h><i i:type=""a:Decimal_foo"">0</i><j i:type=""a:Decimal_foo"">0</j><k i:type=""a:Double_foo"">0</k><l i:type=""a:Double_foo"">4.94065645841247E-324</l><lDTO xmlns:b=""http://schemas.datacontract.org/2004/07/System""/><m i:type=""a:Double_foo"">1.7976931348623157E+308</m><n i:type=""a:Double_foo"">-1.7976931348623157E+308</n><nDTO i:type=""a:DateTimeOffset_foo""><DateTime xmlns=""http://schemas.datacontract.org/2004/07/System"">9999-12-31T23:59:59.9999999Z</DateTime><OffsetMinutes xmlns=""http://schemas.datacontract.org/2004/07/System"">0</OffsetMinutes></nDTO><o i:type=""a:Double_foo"">NaN</o><obj/><p i:type=""a:Double_foo"">-INF</p><q i:type=""a:Double_foo"">INF</q><r i:type=""a:Single_foo"">0</r><s i:type=""a:Single_foo"">1.401298E-45</s><strData i:nil=""true""/><t i:type=""a:Single_foo"">-3.40282347E+38</t><timeSpan i:type=""a:TimeSpan_foo"">P10675199DT2H48M5.4775807S</timeSpan><u i:type=""a:Single_foo"">3.40282347E+38</u><uri>http://www.microsoft.com/</uri><v i:type=""a:Single_foo"">NaN</v><w i:type=""a:Single_foo"">-INF</w><x i:type=""a:Single_foo"">INF</x><xmlQualifiedName i:type=""a:XmlQualifiedName_foo"" xmlns:b=""http://www.microsoft.com"">b:WCF</xmlQualifiedName><y i:type=""a:Int32_foo"">0</y><z i:type=""a:Int32_foo"">2147483647</z><z1 i:type=""a:Int32_foo"">-2147483648</z1><z2 i:type=""a:Int64_foo"">0</z2><z3 i:type=""a:Int64_foo"">9223372036854775807</z3><z4 i:type=""a:Int64_foo"">-9223372036854775808</z4><z5/><z6 i:type=""a:SByte_foo"">0</z6><z7 i:type=""a:SByte_foo"">127</z7><z8 i:type=""a:SByte_foo"">-128</z8><z9 i:type=""a:Int16_foo"">0</z9><z91 i:type=""a:Int16_foo"">32767</z91><z92 i:type=""a:Int16_foo"">-32768</z92><z93 i:type=""a:String_foo"">abc</z93><z94 i:type=""a:UInt16_foo"">0</z94><z95 i:type=""a:UInt16_foo"">65535</z95><z96 i:type=""a:UInt16_foo"">0</z96><z97 i:type=""a:UInt32_foo"">0</z97><z98 i:type=""a:UInt32_foo"">4294967295</z98><z99 i:type=""a:UInt32_foo"">0</z99><z990 i:type=""a:UInt64_foo"">0</z990><z991 i:type=""a:UInt64_foo"">18446744073709551615</z991><z992 i:type=""a:UInt64_foo"">0</z992><z993>AQIDBA==</z993></_data2></ObjectContainer>";
- DCS_BasicRoundTripResolvePrimitiveTypes(baseline);
- }
-
/// <summary>
/// Roundtrips a Datacontract type which contains Primitive types assigned to member of type object.
/// Resolver is plugged in and resolves the primitive types. Verify resolver called during ser and deser
/// </summary>
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void DCS_BasicRoundTripResolvePrimitiveTypes_NotNetFramework()
{
string baseline = @"<ObjectContainer xmlns=""http://schemas.datacontract.org/2004/07/SerializationTestTypes"" xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""><_data i:type=""a:PrimitiveContainer_foo"" xmlns:a=""http://www.default.com""><a i:type=""a:Boolean_foo"">false</a><array1><anyType xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""/><anyType xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""/><anyType xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""/></array1><b i:type=""a:Byte_foo"">255</b><c i:type=""a:Byte_foo"">0</c><d i:type=""a:Char_foo"">65535</d><e i:type=""a:Decimal_foo"">79228162514264337593543950335</e><f i:type=""a:Decimal_foo"">-1</f><f5 i:type=""a:DateTime_foo"">9999-12-31T23:59:59.9999999</f5><g i:type=""a:Decimal_foo"">-79228162514264337593543950335</g><guidData i:type=""a:Guid_foo"">4bc848b1-a541-40bf-8aa9-dd6ccb6d0e56</guidData><h i:type=""a:Decimal_foo"">1</h><i i:type=""a:Decimal_foo"">0</i><j i:type=""a:Decimal_foo"">0</j><k i:type=""a:Double_foo"">0</k><l i:type=""a:Double_foo"">5E-324</l><lDTO xmlns:b=""http://schemas.datacontract.org/2004/07/System""/><m i:type=""a:Double_foo"">1.7976931348623157E+308</m><n i:type=""a:Double_foo"">-1.7976931348623157E+308</n><nDTO i:type=""a:DateTimeOffset_foo""><DateTime xmlns=""http://schemas.datacontract.org/2004/07/System"">9999-12-31T23:59:59.9999999Z</DateTime><OffsetMinutes xmlns=""http://schemas.datacontract.org/2004/07/System"">0</OffsetMinutes></nDTO><o i:type=""a:Double_foo"">NaN</o><obj/><p i:type=""a:Double_foo"">-INF</p><q i:type=""a:Double_foo"">INF</q><r i:type=""a:Single_foo"">0</r><s i:type=""a:Single_foo"">1E-45</s><strData i:nil=""true""/><t i:type=""a:Single_foo"">-3.4028235E+38</t><timeSpan i:type=""a:TimeSpan_foo"">P10675199DT2H48M5.4775807S</timeSpan><u i:type=""a:Single_foo"">3.4028235E+38</u><uri>http://www.microsoft.com/</uri><v i:type=""a:Single_foo"">NaN</v><w i:type=""a:Single_foo"">-INF</w><x i:type=""a:Single_foo"">INF</x><xmlQualifiedName i:type=""a:XmlQualifiedName_foo"" xmlns:b=""http://www.microsoft.com"">b:WCF</xmlQualifiedName><y i:type=""a:Int32_foo"">0</y><z i:type=""a:Int32_foo"">2147483647</z><z1 i:type=""a:Int32_foo"">-2147483648</z1><z2 i:type=""a:Int64_foo"">0</z2><z3 i:type=""a:Int64_foo"">9223372036854775807</z3><z4 i:type=""a:Int64_foo"">-9223372036854775808</z4><z5/><z6 i:type=""a:SByte_foo"">0</z6><z7 i:type=""a:SByte_foo"">127</z7><z8 i:type=""a:SByte_foo"">-128</z8><z9 i:type=""a:Int16_foo"">0</z9><z91 i:type=""a:Int16_foo"">32767</z91><z92 i:type=""a:Int16_foo"">-32768</z92><z93 i:type=""a:String_foo"">abc</z93><z94 i:type=""a:UInt16_foo"">0</z94><z95 i:type=""a:UInt16_foo"">65535</z95><z96 i:type=""a:UInt16_foo"">0</z96><z97 i:type=""a:UInt32_foo"">0</z97><z98 i:type=""a:UInt32_foo"">4294967295</z98><z99 i:type=""a:UInt32_foo"">0</z99><z990 i:type=""a:UInt64_foo"">0</z990><z991 i:type=""a:UInt64_foo"">18446744073709551615</z991><z992 i:type=""a:UInt64_foo"">0</z992><z993>AQIDBA==</z993></_data><_data2 i:type=""a:PrimitiveContainer_foo"" xmlns:a=""http://www.default.com""><a i:type=""a:Boolean_foo"">false</a><array1><anyType xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""/><anyType xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""/><anyType xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""/></array1><b i:type=""a:Byte_foo"">255</b><c i:type=""a:Byte_foo"">0</c><d i:type=""a:Char_foo"">65535</d><e i:type=""a:Decimal_foo"">79228162514264337593543950335</e><f i:type=""a:Decimal_foo"">-1</f><f5 i:type=""a:DateTime_foo"">9999-12-31T23:59:59.9999999</f5><g i:type=""a:Decimal_foo"">-79228162514264337593543950335</g><guidData i:type=""a:Guid_foo"">4bc848b1-a541-40bf-8aa9-dd6ccb6d0e56</guidData><h i:type=""a:Decimal_foo"">1</h><i i:type=""a:Decimal_foo"">0</i><j i:type=""a:Decimal_foo"">0</j><k i:type=""a:Double_foo"">0</k><l i:type=""a:Double_foo"">5E-324</l><lDTO xmlns:b=""http://schemas.datacontract.org/2004/07/System""/><m i:type=""a:Double_foo"">1.7976931348623157E+308</m><n i:type=""a:Double_foo"">-1.7976931348623157E+308</n><nDTO i:type=""a:DateTimeOffset_foo""><DateTime xmlns=""http://schemas.datacontract.org/2004/07/System"">9999-12-31T23:59:59.9999999Z</DateTime><OffsetMinutes xmlns=""http://schemas.datacontract.org/2004/07/System"">0</OffsetMinutes></nDTO><o i:type=""a:Double_foo"">NaN</o><obj/><p i:type=""a:Double_foo"">-INF</p><q i:type=""a:Double_foo"">INF</q><r i:type=""a:Single_foo"">0</r><s i:type=""a:Single_foo"">1E-45</s><strData i:nil=""true""/><t i:type=""a:Single_foo"">-3.4028235E+38</t><timeSpan i:type=""a:TimeSpan_foo"">P10675199DT2H48M5.4775807S</timeSpan><u i:type=""a:Single_foo"">3.4028235E+38</u><uri>http://www.microsoft.com/</uri><v i:type=""a:Single_foo"">NaN</v><w i:type=""a:Single_foo"">-INF</w><x i:type=""a:Single_foo"">INF</x><xmlQualifiedName i:type=""a:XmlQualifiedName_foo"" xmlns:b=""http://www.microsoft.com"">b:WCF</xmlQualifiedName><y i:type=""a:Int32_foo"">0</y><z i:type=""a:Int32_foo"">2147483647</z><z1 i:type=""a:Int32_foo"">-2147483648</z1><z2 i:type=""a:Int64_foo"">0</z2><z3 i:type=""a:Int64_foo"">9223372036854775807</z3><z4 i:type=""a:Int64_foo"">-9223372036854775808</z4><z5/><z6 i:type=""a:SByte_foo"">0</z6><z7 i:type=""a:SByte_foo"">127</z7><z8 i:type=""a:SByte_foo"">-128</z8><z9 i:type=""a:Int16_foo"">0</z9><z91 i:type=""a:Int16_foo"">32767</z91><z92 i:type=""a:Int16_foo"">-32768</z92><z93 i:type=""a:String_foo"">abc</z93><z94 i:type=""a:UInt16_foo"">0</z94><z95 i:type=""a:UInt16_foo"">65535</z95><z96 i:type=""a:UInt16_foo"">0</z96><z97 i:type=""a:UInt32_foo"">0</z97><z98 i:type=""a:UInt32_foo"">4294967295</z98><z99 i:type=""a:UInt32_foo"">0</z99><z990 i:type=""a:UInt64_foo"">0</z990><z991 i:type=""a:UInt64_foo"">18446744073709551615</z991><z992 i:type=""a:UInt64_foo"">0</z992><z993>AQIDBA==</z993></_data2></ObjectContainer>";
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void DCS_BasicPerSerializerRoundTripAndCompare_EnumStruct_NetFramework()
- {
- TestObjectInObjectContainerWithSimpleResolver(new SerializationTestTypes.AllTypes(), "<ObjectContainer xmlns=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\"><_data i:type=\"a:SerializationTestTypes.AllTypes***\" xmlns:a=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.AllTypes***\"><a>false</a><array1><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/></array1><b>255</b><c>0</c><d>65535</d><e>79228162514264337593543950335</e><enumArrayData><MyEnum1>red</MyEnum1></enumArrayData><enumBase1 i:type=\"b:SerializationTestTypes.MyEnum1***\" xmlns:b=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.MyEnum1***\">red</enumBase1><f>-1</f><f5>0001-01-01T00:00:00</f5><g>-79228162514264337593543950335</g><guidData>5642b5d2-87c3-a724-2390-997062f3f7a2</guidData><h>1</h><i>0</i><j>0</j><k>0</k><l>4.94065645841247E-324</l><lDTO xmlns:b=\"http://schemas.datacontract.org/2004/07/System\"/><m>1.7976931348623157E+308</m><n>-1.7976931348623157E+308</n><nDTO xmlns:b=\"http://schemas.datacontract.org/2004/07/System\"><b:DateTime>9999-12-31T23:59:59.9999999Z</b:DateTime><b:OffsetMinutes>0</b:OffsetMinutes></nDTO><o>NaN</o><obj/><p>-INF</p><q>INF</q><r>0</r><s>1.401298E-45</s><strData i:nil=\"true\"/><t>-3.40282347E+38</t><timeSpan i:type=\"b:duration\" xmlns:b=\"http://schemas.microsoft.com/2003/10/Serialization/\">P10675199DT2H48M5.4775807S</timeSpan><u>3.40282347E+38</u><uri>http://www.microsoft.com/</uri><v>NaN</v><valType i:type=\"PublicDCStruct\"><Data>Data</Data></valType><w>-INF</w><x>INF</x><q:xmlQualifiedName xmlns:q=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes\" xmlns:b=\"http://www.microsoft.com\">b:WCF</q:xmlQualifiedName><y>0</y><z>2147483647</z><z1>-2147483648</z1><z2>0</z2><z3>9223372036854775807</z3><z4>-9223372036854775808</z4><z5/><z6>0</z6><z7>127</z7><z8>-128</z8><z9>0</z9><z91>32767</z91><z92>-32768</z92><z93>abc</z93><z94>0</z94><z95>65535</z95><z96>0</z96><z97>0</z97><z98>4294967295</z98><z99>0</z99><z990>0</z990><z991>18446744073709551615</z991><z992>0</z992></_data><_data2 i:type=\"a:SerializationTestTypes.AllTypes***\" xmlns:a=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.AllTypes***\"><a>false</a><array1><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/></array1><b>255</b><c>0</c><d>65535</d><e>79228162514264337593543950335</e><enumArrayData><MyEnum1>red</MyEnum1></enumArrayData><enumBase1 i:type=\"b:SerializationTestTypes.MyEnum1***\" xmlns:b=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.MyEnum1***\">red</enumBase1><f>-1</f><f5>0001-01-01T00:00:00</f5><g>-79228162514264337593543950335</g><guidData>5642b5d2-87c3-a724-2390-997062f3f7a2</guidData><h>1</h><i>0</i><j>0</j><k>0</k><l>4.94065645841247E-324</l><lDTO xmlns:b=\"http://schemas.datacontract.org/2004/07/System\"/><m>1.7976931348623157E+308</m><n>-1.7976931348623157E+308</n><nDTO xmlns:b=\"http://schemas.datacontract.org/2004/07/System\"><b:DateTime>9999-12-31T23:59:59.9999999Z</b:DateTime><b:OffsetMinutes>0</b:OffsetMinutes></nDTO><o>NaN</o><obj/><p>-INF</p><q>INF</q><r>0</r><s>1.401298E-45</s><strData i:nil=\"true\"/><t>-3.40282347E+38</t><timeSpan i:type=\"b:duration\" xmlns:b=\"http://schemas.microsoft.com/2003/10/Serialization/\">P10675199DT2H48M5.4775807S</timeSpan><u>3.40282347E+38</u><uri>http://www.microsoft.com/</uri><v>NaN</v><valType i:type=\"PublicDCStruct\"><Data>Data</Data></valType><w>-INF</w><x>INF</x><q:xmlQualifiedName xmlns:q=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes\" xmlns:b=\"http://www.microsoft.com\">b:WCF</q:xmlQualifiedName><y>0</y><z>2147483647</z><z1>-2147483648</z1><z2>0</z2><z3>9223372036854775807</z3><z4>-9223372036854775808</z4><z5/><z6>0</z6><z7>127</z7><z8>-128</z8><z9>0</z9><z91>32767</z91><z92>-32768</z92><z93>abc</z93><z94>0</z94><z95>65535</z95><z96>0</z96><z97>0</z97><z98>4294967295</z98><z99>0</z99><z990>0</z990><z991>18446744073709551615</z991><z992>0</z992></_data2></ObjectContainer>");
-
- TestObjectInObjectContainerWithSimpleResolver(new SerializationTestTypes.AllTypes2(), "<ObjectContainer xmlns=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\"><_data i:type=\"a:SerializationTestTypes.AllTypes2***\" xmlns:a=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.AllTypes2***\"><a>false</a><array1><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/></array1><b>255</b><c>0</c><d>65535</d><e>79228162514264337593543950335</e><enumArrayData><MyEnum1>red</MyEnum1></enumArrayData><enumBase1 i:type=\"b:SerializationTestTypes.MyEnum1***\" xmlns:b=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.MyEnum1***\">red</enumBase1><f>-1</f><f5>0001-01-01T00:00:00</f5><g>-79228162514264337593543950335</g><guidData>cac76333-577f-7e1f-0389-789b0d97f395</guidData><h>1</h><i>0</i><j>0</j><k>0</k><l>4.94065645841247E-324</l><m>1.7976931348623157E+308</m><n>-1.7976931348623157E+308</n><nDTO xmlns:b=\"http://schemas.datacontract.org/2004/07/System\"><b:DateTime>9999-12-31T23:59:59.9999999Z</b:DateTime><b:OffsetMinutes>0</b:OffsetMinutes></nDTO><o>NaN</o><obj/><p>-INF</p><q>INF</q><r>0</r><s>1.401298E-45</s><strData i:nil=\"true\"/><t>-3.40282347E+38</t><timeSpan>P10675199DT2H48M5.4775807S</timeSpan><u>3.40282347E+38</u><uri>http://www.microsoft.com/</uri><v>NaN</v><valType i:type=\"PublicDCStruct\"><Data>Data</Data></valType><w>-INF</w><x>INF</x><q:xmlQualifiedName xmlns:q=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes\" xmlns:b=\"http://www.microsoft.com\">b:WCF</q:xmlQualifiedName><y>0</y><z>2147483647</z><z1>-2147483648</z1><z2>0</z2><z3>9223372036854775807</z3><z4>-9223372036854775808</z4><z5/><z6>0</z6><z7>127</z7><z8>-128</z8><z9>0</z9><z91>32767</z91><z92>-32768</z92><z93>abc</z93><z94>0</z94><z95>65535</z95><z96>0</z96><z97>0</z97><z98>4294967295</z98><z99>0</z99><z990>0</z990><z991>18446744073709551615</z991><z992>0</z992></_data><_data2 i:type=\"a:SerializationTestTypes.AllTypes2***\" xmlns:a=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.AllTypes2***\"><a>false</a><array1><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/></array1><b>255</b><c>0</c><d>65535</d><e>79228162514264337593543950335</e><enumArrayData><MyEnum1>red</MyEnum1></enumArrayData><enumBase1 i:type=\"b:SerializationTestTypes.MyEnum1***\" xmlns:b=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.MyEnum1***\">red</enumBase1><f>-1</f><f5>0001-01-01T00:00:00</f5><g>-79228162514264337593543950335</g><guidData>cac76333-577f-7e1f-0389-789b0d97f395</guidData><h>1</h><i>0</i><j>0</j><k>0</k><l>4.94065645841247E-324</l><m>1.7976931348623157E+308</m><n>-1.7976931348623157E+308</n><nDTO xmlns:b=\"http://schemas.datacontract.org/2004/07/System\"><b:DateTime>9999-12-31T23:59:59.9999999Z</b:DateTime><b:OffsetMinutes>0</b:OffsetMinutes></nDTO><o>NaN</o><obj/><p>-INF</p><q>INF</q><r>0</r><s>1.401298E-45</s><strData i:nil=\"true\"/><t>-3.40282347E+38</t><timeSpan>P10675199DT2H48M5.4775807S</timeSpan><u>3.40282347E+38</u><uri>http://www.microsoft.com/</uri><v>NaN</v><valType i:type=\"PublicDCStruct\"><Data>Data</Data></valType><w>-INF</w><x>INF</x><q:xmlQualifiedName xmlns:q=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes\" xmlns:b=\"http://www.microsoft.com\">b:WCF</q:xmlQualifiedName><y>0</y><z>2147483647</z><z1>-2147483648</z1><z2>0</z2><z3>9223372036854775807</z3><z4>-9223372036854775808</z4><z5/><z6>0</z6><z7>127</z7><z8>-128</z8><z9>0</z9><z91>32767</z91><z92>-32768</z92><z93>abc</z93><z94>0</z94><z95>65535</z95><z96>0</z96><z97>0</z97><z98>4294967295</z98><z99>0</z99><z990>0</z990><z991>18446744073709551615</z991><z992>0</z992></_data2></ObjectContainer>");
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void DCS_BasicPerSerializerRoundTripAndCompare_EnumStruct_NotNetFramework()
{
TestObjectInObjectContainerWithSimpleResolver(new SerializationTestTypes.AllTypes(), "<ObjectContainer xmlns=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\"><_data i:type=\"a:SerializationTestTypes.AllTypes***\" xmlns:a=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.AllTypes***\"><a>false</a><array1><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/></array1><b>255</b><c>0</c><d>65535</d><e>79228162514264337593543950335</e><enumArrayData><MyEnum1>red</MyEnum1></enumArrayData><enumBase1 i:type=\"b:SerializationTestTypes.MyEnum1***\" xmlns:b=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.MyEnum1***\">red</enumBase1><f>-1</f><f5>0001-01-01T00:00:00</f5><g>-79228162514264337593543950335</g><guidData>5642b5d2-87c3-a724-2390-997062f3f7a2</guidData><h>1</h><i>0</i><j>0</j><k>0</k><l>5E-324</l><lDTO xmlns:b=\"http://schemas.datacontract.org/2004/07/System\"/><m>1.7976931348623157E+308</m><n>-1.7976931348623157E+308</n><nDTO xmlns:b=\"http://schemas.datacontract.org/2004/07/System\"><b:DateTime>9999-12-31T23:59:59.9999999Z</b:DateTime><b:OffsetMinutes>0</b:OffsetMinutes></nDTO><o>NaN</o><obj/><p>-INF</p><q>INF</q><r>0</r><s>1E-45</s><strData i:nil=\"true\"/><t>-3.4028235E+38</t><timeSpan i:type=\"b:duration\" xmlns:b=\"http://schemas.microsoft.com/2003/10/Serialization/\">P10675199DT2H48M5.4775807S</timeSpan><u>3.4028235E+38</u><uri>http://www.microsoft.com/</uri><v>NaN</v><valType i:type=\"PublicDCStruct\"><Data>Data</Data></valType><w>-INF</w><x>INF</x><q:xmlQualifiedName xmlns:q=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes\" xmlns:b=\"http://www.microsoft.com\">b:WCF</q:xmlQualifiedName><y>0</y><z>2147483647</z><z1>-2147483648</z1><z2>0</z2><z3>9223372036854775807</z3><z4>-9223372036854775808</z4><z5/><z6>0</z6><z7>127</z7><z8>-128</z8><z9>0</z9><z91>32767</z91><z92>-32768</z92><z93>abc</z93><z94>0</z94><z95>65535</z95><z96>0</z96><z97>0</z97><z98>4294967295</z98><z99>0</z99><z990>0</z990><z991>18446744073709551615</z991><z992>0</z992></_data><_data2 i:type=\"a:SerializationTestTypes.AllTypes***\" xmlns:a=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.AllTypes***\"><a>false</a><array1><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/><anyType xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"/></array1><b>255</b><c>0</c><d>65535</d><e>79228162514264337593543950335</e><enumArrayData><MyEnum1>red</MyEnum1></enumArrayData><enumBase1 i:type=\"b:SerializationTestTypes.MyEnum1***\" xmlns:b=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.MyEnum1***\">red</enumBase1><f>-1</f><f5>0001-01-01T00:00:00</f5><g>-79228162514264337593543950335</g><guidData>5642b5d2-87c3-a724-2390-997062f3f7a2</guidData><h>1</h><i>0</i><j>0</j><k>0</k><l>5E-324</l><lDTO xmlns:b=\"http://schemas.datacontract.org/2004/07/System\"/><m>1.7976931348623157E+308</m><n>-1.7976931348623157E+308</n><nDTO xmlns:b=\"http://schemas.datacontract.org/2004/07/System\"><b:DateTime>9999-12-31T23:59:59.9999999Z</b:DateTime><b:OffsetMinutes>0</b:OffsetMinutes></nDTO><o>NaN</o><obj/><p>-INF</p><q>INF</q><r>0</r><s>1E-45</s><strData i:nil=\"true\"/><t>-3.4028235E+38</t><timeSpan i:type=\"b:duration\" xmlns:b=\"http://schemas.microsoft.com/2003/10/Serialization/\">P10675199DT2H48M5.4775807S</timeSpan><u>3.4028235E+38</u><uri>http://www.microsoft.com/</uri><v>NaN</v><valType i:type=\"PublicDCStruct\"><Data>Data</Data></valType><w>-INF</w><x>INF</x><q:xmlQualifiedName xmlns:q=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes\" xmlns:b=\"http://www.microsoft.com\">b:WCF</q:xmlQualifiedName><y>0</y><z>2147483647</z><z1>-2147483648</z1><z2>0</z2><z3>9223372036854775807</z3><z4>-9223372036854775808</z4><z5/><z6>0</z6><z7>127</z7><z8>-128</z8><z9>0</z9><z91>32767</z91><z92>-32768</z92><z93>abc</z93><z94>0</z94><z95>65535</z95><z96>0</z96><z97>0</z97><z98>4294967295</z98><z99>0</z99><z990>0</z990><z991>18446744073709551615</z991><z992>0</z992></_data2></ObjectContainer>");
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework throws InvalidDataContractException.")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "dotnet-corefx #22974")]
public static void DCS_TypeWithCollectionAndDateTimeOffset_ListIsNull()
{
// Adding offsetMinutes so the DateTime component in serialized strings are time-zone independent
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
- uapaot;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<DefineConstants>$(DefineConstants);ReflectionOnly</DefineConstants>
<ProjectGuid>{38889701-0af4-48b3-999c-e99d639c61b6}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release;uapaot-Debug;uapaot-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Runtime\Serialization\Utils.cs" />
<Compile Include="$(TestSourceFolder)..\MyResolver.cs" />
<Compile Include="$(TestSourceFolder)..\XmlDictionaryReaderTests.cs" />
<Compile Include="$(TestSourceFolder)..\XmlDictionaryWriterTest.cs" />
+ <Compile Include="$(TestSourceFolder)..\SerializationTypes.CoreCLR.cs" />
+ <Compile Include="$(TestSourceFolder)..\DataContractSerializer.CoreCLR.cs" />
<Compile Include="$(CommonTestPath)\System\IO\TempFile.cs">
<Link>Common\System\IO\TempFile.cs</Link>
</Compile>
<Link>SerializationTestTypes\SelfRefAndCycles.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'uapaot'">
- <Compile Include="$(TestSourceFolder)..\SerializationTypes.CoreCLR.cs" />
- <Compile Include="$(TestSourceFolder)..\DataContractSerializer.CoreCLR.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)'=='uapaot'">
+ <ItemGroup>
<EmbeddedResource Include="$(MsBuildThisFileDirectory)Resources\$(AssemblyName).rd.xml" />
</ItemGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{30CAB353-089E-4294-B23B-F2DD1D945654}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release;uapaot-Debug;uapaot-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(TestSourceFolder)DataContractSerializerStressTests.cs" />
<Compile Include="$(TestSourceFolder)SerializationTestTypes\DCRSampleType.cs" />
<Compile Include="$(TestSourceFolder)SerializationTestTypes\DCRTypeLibrary.cs" />
<Compile Include="$(TestSourceFolder)SerializationTestTypes\Primitives.cs" />
+ <Compile Include="$(TestSourceFolder)SerializationTypes.CoreCLR.cs" />
+ <Compile Include="$(TestSourceFolder)DataContractSerializer.CoreCLR.cs" />
<Compile Include="$(CommonTestPath)\System\IO\TempFile.cs">
<Link>Common\System\IO\TempFile.cs</Link>
</Compile>
<Compile Include="SerializationTestTypes\SampleTypes.cs" />
<Compile Include="SerializationTestTypes\SelfRefAndCycles.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'uapaot'">
- <Compile Include="$(TestSourceFolder)SerializationTypes.CoreCLR.cs" />
- <Compile Include="$(TestSourceFolder)DataContractSerializer.CoreCLR.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)'=='uapaot'">
+ <ItemGroup>
<EmbeddedResource Include="$(MsBuildThisFileDirectory)Resources\$(AssemblyName).rd.xml" />
</ItemGroup>
</Project>
\ No newline at end of file
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Async APIs are available on NetCore only")]
public static void XmlBaseWriter_FlushAsync()
{
string actual = null;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Async APIs are available on NetCore only")]
public static void XmlBaseWriter_WriteStartEndElementAsync()
{
string actual;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Async APIs are available on NetCore only")]
public static void XmlBaseWriter_CheckAsync_ThrowInvalidOperationException()
{
int byteSize = 1024;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "is implemented on full framework")]
public static void CreateMtomReaderWriter_Throw_PNSE()
{
using (var stream = new MemoryStream())
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "is implemented on full framework")]
public static void FragmentTest()
{
string rwTypeStr = "Text";
namespace System.IO
{
- [ActiveIssue("https://github.com/dotnet/corefx/issues/18940", TargetFrameworkMonikers.UapAot)]
public class CreateSafeFileHandleTests
{
[Fact]
[Theory]
[InlineData(-1)]
[InlineData(double.NegativeInfinity)]
- [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)]
public void Ctor_NegativeWidth_ThrowsArgumentOutOfRangeException(double width)
{
AssertExtensions.Throws<ArgumentOutOfRangeException>("width", () => new Rect(1, 1, width, 1));
[Theory]
[InlineData(-1)]
[InlineData(double.NegativeInfinity)]
- [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)]
public void Ctor_NegativeHeight_ThrowsArgumentOutOfRangeException(double height)
{
AssertExtensions.Throws<ArgumentOutOfRangeException>("height", () => new Rect(1, 1, 1, height));
[Theory]
[InlineData(-1)]
[InlineData(double.NegativeInfinity)]
- [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)]
public void Width_SetNegative_ThrowsArgumentOutOfRangeException(double width)
{
var rect = new Rect();
[Theory]
[InlineData(-1)]
[InlineData(double.NegativeInfinity)]
- [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)]
public void Height_SetNegative_ThrowsArgumentOutOfRangeException(double height)
{
var rect = new Rect();
[Theory]
[InlineData(-1)]
[InlineData(double.NegativeInfinity)]
- [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)]
public void Ctor_NegativeWidth_ThrowsArgumentOutOfRangeException(double width)
{
AssertExtensions.Throws<ArgumentOutOfRangeException>("width", () => new Size(width, 1));
[Theory]
[InlineData(-1)]
[InlineData(double.NegativeInfinity)]
- [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)]
public void Ctor_NegativeHeight_ThrowsArgumentOutOfRangeException(double height)
{
AssertExtensions.Throws<ArgumentOutOfRangeException>("height", () => new Size(1, height));
[Theory]
[InlineData(-1)]
[InlineData(double.NegativeInfinity)]
- [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)]
public void Width_SetNegative_ThrowsArgumentOutOfRangeException(double width)
{
var size = new Size();
[Theory]
[InlineData(-1)]
[InlineData(double.NegativeInfinity)]
- [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)]
public void Height_SetNegative_ThrowsArgumentOutOfRangeException(double height)
{
var size = new Size();
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- netstandard;
- netfx;
uap;
- uapaot;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<NoWarn>1718</NoWarn>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release;uapaot-Debug;uapaot-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\EnumTypes.cs">
<ItemGroup Condition=" '$(TargetsUnix)' == 'true'">
<Compile Include="System\ExitCodeTests.Unix.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netfx' And '$(TargetGroup)' != 'netstandard'">
+ <ItemGroup>
<Compile Include="System\Collections\ObjectModel\CollectionTests.netcoreapp.cs" />
<Compile Include="System\HashCodeTests.netcoreapp.cs" />
<Compile Include="Helpers.netcoreapp.cs" />
<Compile Include="System\ComponentModel\DefaultValueAttributeTests.netcoreapp.cs" />
<Compile Include="System\Reflection\BindingFlagsDoNotWrap.netcoreapp.cs" />
<Compile Include="System\Reflection\InvokeRefReturn.netcoreapp.cs" />
- <Compile Include="System\Reflection\IsCollectibleTests.cs" Condition="'$(TargetGroup)' != 'uapaot'" />
+ <Compile Include="System\Reflection\IsCollectibleTests.cs" />
<!-- missing method 'AssemblyLoadContext..ctor(bool) -->
<Compile Include="System\Reflection\MethodBaseTests.netcoreapp.cs" />
<Compile Include="System\Reflection\SignatureTypes.netcoreapp.cs" />
<ItemGroup Condition="'$(TargetGroup)' != 'netcoreapp'">
<Compile Include="System\StringSplitExtensions.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netfx' Or '$(TargetGroup)' == 'netstandard'">
- <Compile Include="$(CommonTestPath)\Tests\System\SpanExtensions.netstandard.cs">
- <Link>System\SpanExtensions.netstandard.cs</Link>
- </Compile>
- </ItemGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Collections\IEnumerable.Generic.Serialization.Tests.cs">
<Link>Common\System\Collections\IEnumerable.Generic.Serialization.Tests.cs</Link>
<ItemGroup>
<EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
</ItemGroup>
- <ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
</Project>
\ No newline at end of file
Assert.Throws<AmbiguousMatchException>(() => Activator.CreateInstance(typeof(Choice1), new object[] { null }));
}
-#if netcoreapp || uapaot
+#if netcoreapp
[Fact]
public void CreateInstance_NotRuntimeType_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>("type", () => Activator.CreateInstance(nonRuntimeType, new object[0]));
}
}
-#endif // netcoreapp || uapaot
+#endif // netcoreapp
public static IEnumerable<object[]> CreateInstance_ContainsGenericParameters_TestData()
{
[Fact]
public void CreateInstance_Span_ThrowsNotSupportedException()
{
- // Move to test data for CreateInstance_BoxedByRefType_ThrowsNotSupportedException
- // if .NET Framework recognizes Span<T> as an intrinsic.
- if (PlatformDetection.IsFullFramework)
- {
- Assert.NotNull(Activator.CreateInstance(typeof(Span<int>)));
- }
- else
- {
- CreateInstance_BoxedByRefType_ThrowsNotSupportedException(typeof(Span<int>));
- }
+ CreateInstance_BoxedByRefType_ThrowsNotSupportedException(typeof(Span<int>));
}
[Fact]
Assert.ThrowsAny<MissingMemberException>(() => Activator.CreateInstance(typeof(IInterfaceType)));
}
- [Theory]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Activation Attributes are not supported in .NET Core.")]
- [InlineData(typeof(MarshalByRefObject))]
- [InlineData(typeof(SubMarshalByRefObject))]
- public void CreateInstance_MarshalByRefObjectNetFramework_ThrowsNotSupportedException(Type type)
- {
- Assert.Throws<NotSupportedException>(() => Activator.CreateInstance(type, null, new object[] { 1 } ));
- Assert.Throws<NotSupportedException>(() => Activator.CreateInstance(type, null, new object[] { 1, 2 } ));
- }
-
public class SubMarshalByRefObject : MarshalByRefObject
{
}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void TestingActivationAttributes()
{
Assert.Throws<PlatformNotSupportedException>(() => Activator.CreateInstance(typeof(ClassWithIsTestedAttribute), null, new object[] { new object() }));
Assert.Throws<ArgumentException>("type", () => Activator.CreateInstance(typeBuilder));
Assert.Throws<NotSupportedException>(() => Activator.CreateInstance(typeBuilder, new object[0]));
}
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "AssemblyBuilderAccess.ReflectionOnly is not supported in .NET Core")]
- public void CreateInstance_ReflectionOnlyType_ThrowsInvalidOperationException()
- {
- AssemblyName assemblyName = new AssemblyName("Assembly");
- AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(assemblyName, (AssemblyBuilderAccess)6);
- ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module");
- TypeBuilder typeBuilder = moduleBuilder.DefineType("Type", TypeAttributes.Public);
-
- Assert.Throws<InvalidOperationException>(() => Activator.CreateInstance(typeBuilder.CreateType()));
- }
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "AssemblyBuilderAccess.Save is not supported in .NET Core")]
- public void CreateInstance_DynamicTypeWithoutRunAccess_ThrowsNotSupportedException()
- {
- AssemblyName assemblyName = new AssemblyName("Assembly");
- AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(assemblyName, (AssemblyBuilderAccess)2);
- ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module");
- TypeBuilder typeBuilder = moduleBuilder.DefineType("Type", TypeAttributes.Public);
-
- Assert.Throws<NotSupportedException>(() => Activator.CreateInstance(typeBuilder.CreateType()));
- }
}
}
namespace System.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "varargs calling convention not supported on .NET Native")]
public static class ArgIteratorTests
{
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsArgIteratorSupported))]
yield return new object[] { new Int32Enum[] { (Int32Enum)1, (Int32Enum)2, (Int32Enum)3 }, 1, new Int32Enum[] { (Int32Enum)1, (Int32Enum)2, (Int32Enum)3, (Int32Enum)4, (Int32Enum)5 }, 2, 2, new Int32Enum[] { (Int32Enum)1, (Int32Enum)2, (Int32Enum)2, (Int32Enum)3, (Int32Enum)5 } };
yield return new object[] { new Int32Enum[] { (Int32Enum)1 }, 0, new int[1], 0, 1, new int[] { 1 } };
- // The full .NET Framework disallows int -> enum conversions
- // See https://github.com/dotnet/corefx/issues/13816.
- if (!PlatformDetection.IsFullFramework)
- {
- yield return new object[] { new int[1] { 2 }, 0, new Int32Enum[1], 0, 1, new Int32Enum[] { (Int32Enum)2 } };
- }
+ yield return new object[] { new int[1] { 2 }, 0, new Int32Enum[1], 0, 1, new Int32Enum[] { (Int32Enum)2 } };
// Misc
yield return new object[] { new int[] { 0x12345678, 0x22334455, 0x778899aa }, 0, new int[3], 0, 3, new int[] { 0x12345678, 0x22334455, 0x778899aa } };
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET framework has a bug and incorrectly allows copying between void* and object")]
public static void Copy_SourceAndDestinationPointers_ThrowsArrayTypeMismatchException()
{
unsafe
[Theory]
[InlineData(0)]
[InlineData(-1)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Non-zero lower-bounded arrays not supported on UapAot")]
public static void Reverse_IndexLessThanLowerBound_ThrowsArgumentOutOfRangeException(int lowerBound)
{
AssertExtensions.Throws<ArgumentOutOfRangeException>("index", () => Array.Reverse(NonZeroLowerBoundArray(new int[0], lowerBound), lowerBound - 1, 0));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Non-zero lower-bounded arrays not supported on UapAot")]
public static void Reverse_IndexLessThanPositiveLowerBound_ThrowsArgumentOutOfRangeException()
{
AssertExtensions.Throws<ArgumentOutOfRangeException>("index", "length", () => Array.Reverse(NonZeroLowerBoundArray(new int[0], 1), 0, 0));
// to fix a bug where an instance of a subclass of an attribute can
// be equal to an instance of the parent class.
// See https://github.com/dotnet/coreclr/pull/6240
- Assert.Equal(PlatformDetection.IsFullFramework, d1.Equals(d2));
- Assert.Equal(PlatformDetection.IsFullFramework, d2.Equals(d3));
+ Assert.Equal(false, d1.Equals(d2));
+ Assert.Equal(false, d2.Equals(d3));
Assert.Equal(d1, d3);
- Assert.Equal(PlatformDetection.IsFullFramework, s1.Equals(s2));
- Assert.Equal(PlatformDetection.IsFullFramework, s2.Equals(s3));
+ Assert.Equal(false, s1.Equals(s2));
+ Assert.Equal(false, s2.Equals(s3));
Assert.Equal(s1, s3);
- Assert.Equal(PlatformDetection.IsFullFramework, f1.Equals(f2));
- Assert.Equal(PlatformDetection.IsFullFramework, f2.Equals(f3));
+ Assert.Equal(false, f1.Equals(f2));
+ Assert.Equal(false, f2.Equals(f3));
Assert.Equal(f1, f3);
Assert.NotEqual(d1, a1);
// to fix a bug where the hash code of a subclass of an attribute can
// be equal to an instance of the parent class.
// See https://github.com/dotnet/coreclr/pull/6240
- Assert.Equal(PlatformDetection.IsFullFramework, s1.GetHashCode().Equals(s2.GetHashCode()));
- Assert.Equal(PlatformDetection.IsFullFramework, s2.GetHashCode().Equals(s3.GetHashCode()));
+ Assert.Equal(false, s1.GetHashCode().Equals(s2.GetHashCode()));
+ Assert.Equal(false, s2.GetHashCode().Equals(s3.GetHashCode()));
Assert.Equal(s1.GetHashCode(), s3.GetHashCode());
- Assert.Equal(PlatformDetection.IsFullFramework, d1.GetHashCode().Equals(d2.GetHashCode()));
- Assert.Equal(PlatformDetection.IsFullFramework, d2.GetHashCode().Equals(d3.GetHashCode()));
+ Assert.Equal(false, d1.GetHashCode().Equals(d2.GetHashCode()));
+ Assert.Equal(false, d2.GetHashCode().Equals(d3.GetHashCode()));
Assert.Equal(d1.GetHashCode(), d3.GetHashCode());
Assert.Equal(f1.GetHashCode(), f2.GetHashCode());
Assert.Equal(f2.GetHashCode(), f3.GetHashCode());
Assert.Equal(f1.GetHashCode(), f3.GetHashCode());
- Assert.Equal(!PlatformDetection.IsFullFramework, d1.GetHashCode().Equals(a1.GetHashCode()));
- Assert.Equal(!PlatformDetection.IsFullFramework, d2.GetHashCode().Equals(a2.GetHashCode()));
- Assert.Equal(!PlatformDetection.IsFullFramework, d3.GetHashCode().Equals(a3.GetHashCode()));
- Assert.Equal(!PlatformDetection.IsFullFramework, d1.GetHashCode().Equals(a3.GetHashCode()));
- Assert.Equal(!PlatformDetection.IsFullFramework, d3.GetHashCode().Equals(a1.GetHashCode()));
+ Assert.Equal(true, d1.GetHashCode().Equals(a1.GetHashCode()));
+ Assert.Equal(true, d2.GetHashCode().Equals(a2.GetHashCode()));
+ Assert.Equal(true, d3.GetHashCode().Equals(a3.GetHashCode()));
+ Assert.Equal(true, d1.GetHashCode().Equals(a3.GetHashCode()));
+ Assert.Equal(true, d3.GetHashCode().Equals(a1.GetHashCode()));
- Assert.Equal(!PlatformDetection.IsFullFramework, d1.GetHashCode().Equals(s1.GetHashCode()));
- Assert.Equal(!PlatformDetection.IsFullFramework, d2.GetHashCode().Equals(s2.GetHashCode()));
- Assert.Equal(!PlatformDetection.IsFullFramework, d3.GetHashCode().Equals(s3.GetHashCode()));
- Assert.Equal(!PlatformDetection.IsFullFramework, d1.GetHashCode().Equals(s3.GetHashCode()));
- Assert.Equal(!PlatformDetection.IsFullFramework, d3.GetHashCode().Equals(s1.GetHashCode()));
+ Assert.Equal(true, d1.GetHashCode().Equals(s1.GetHashCode()));
+ Assert.Equal(true, d2.GetHashCode().Equals(s2.GetHashCode()));
+ Assert.Equal(true, d3.GetHashCode().Equals(s3.GetHashCode()));
+ Assert.Equal(true, d1.GetHashCode().Equals(s3.GetHashCode()));
+ Assert.Equal(true, d3.GetHashCode().Equals(s1.GetHashCode()));
Assert.NotEqual(f1.GetHashCode(), a1.GetHashCode());
Assert.NotEqual(f2.GetHashCode(), a2.GetHashCode());
[Fact]
[StringValue("\uDFFF")]
- [ActiveIssue("TFS 437293 - Invalid Utf8 string in custom attribute argument falls back to wrong value.", TargetFrameworkMonikers.UapAot)]
public static void StringArgument_InvalidCodeUnits_FallbackUsed()
{
MethodInfo thisMethod = typeof(AttributeTests).GetTypeInfo().GetDeclaredMethod("StringArgument_InvalidCodeUnits_FallbackUsed");
{
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "CustomAttributes on Modules not supported in UapAot")]
public static void customAttributeCount()
{
List<CustomAttributeData> customAttributes = typeof(GetCustomAttribute).Module.CustomAttributes.ToList();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "CustomAttributes on Modules not supported in UapAot")]
public static void PositiveTest5()
{
Type clsType = typeof(GetCustomAttribute);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "CustomAttributes on Modules not supported in UapAot")]
public static void PositiveTest6()
{
Type clsType = typeof(GetCustomAttribute);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Exception strings not guaranteed on UapAot.")]
public static void ToStringTest()
{
string message = "this is not the file you're looking for";
[Theory]
[InlineData(typeof(CustomType), true, "", 0)]
[InlineData(typeof(int), false, "42", 42)]
- // On NetFramework will fail because there isn't fallback code, only call to TypeDescriptor.GetConverter
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void Ctor_TypeDescriptorNotFound_ExceptionFallback(Type type, bool returnNull, string stringToConvert, int expectedValue)
{
RemoteExecutor.Invoke((innerType, innerReturnNull, innerStringToConvert, innerExpectedValue) =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET framework has a bug and incorrectly parses this date")]
public static void TryParse_TimeDesignators_NetCore()
{
DateTimeOffset result;
Assert.Equal(0, result.Second);
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "The coreclr fixed a bug where the .NET framework incorrectly parses this date")]
- public static void TryParse_TimeDesignators_Netfx()
- {
- DateTimeOffset result;
- Assert.True(DateTimeOffset.TryParse("4/21 5am", new CultureInfo("en-US"), DateTimeStyles.None, out result));
- Assert.Equal(DateTimeOffset.Now.Month, result.Month);
- Assert.Equal(DateTimeOffset.Now.Day, result.Day);
- Assert.Equal(4, result.Hour);
- Assert.Equal(0, result.Minute);
- Assert.Equal(0, result.Second);
-
- Assert.True(DateTimeOffset.TryParse("4/21 5pm", new CultureInfo("en-US"), DateTimeStyles.None, out result));
- Assert.Equal(DateTimeOffset.Now.Month, result.Month);
- Assert.Equal(DateTimeOffset.Now.Day, result.Day);
- Assert.Equal(16, result.Hour);
- Assert.Equal(0, result.Minute);
- Assert.Equal(0, result.Second);
- }
-
public static IEnumerable<object[]> StandardFormatSpecifiers() =>
DateTimeTests.StandardFormatSpecifiers()
.Where(a => !a[0].Equals("U")); // "U" isn't supported by DateTimeOffset
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET framework has a bug and incorrectly parses this date")]
public static void TryParse_TimeDesignators_NetCore()
{
DateTime result;
Assert.Equal(17, result.Hour);
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "The coreclr fixed a bug where the .NET framework incorrectly parses this date")]
- public static void TryParse_TimeDesignators_Netfx()
- {
- DateTime result;
- Assert.True(DateTime.TryParse("4/21 5am", new CultureInfo("en-US"), DateTimeStyles.None, out result));
- Assert.Equal(DateTime.Now.Month, result.Month);
- Assert.Equal(DateTime.Now.Day, result.Day);
- Assert.Equal(4, result.Hour);
- Assert.Equal(0, result.Minute);
- Assert.Equal(0, result.Second);
-
- Assert.True(DateTime.TryParse("4/21 5pm", new CultureInfo("en-US"), DateTimeStyles.None, out result));
- Assert.Equal(DateTime.Now.Month, result.Month);
- Assert.Equal(DateTime.Now.Day, result.Day);
- Assert.Equal(16, result.Hour);
- Assert.Equal(0, result.Minute);
- Assert.Equal(0, result.Second);
- }
-
public static IEnumerable<object[]> StandardFormatSpecifiers()
{
yield return new object[] { "d" };
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Needs desktop port: https://github.com/dotnet/coreclr/issues/15896")]
// Regression test for https://github.com/dotnet/coreclr/issues/15896
public static void TryParseExact_EmptyAMPMDesignator()
{
"DateTime parsing expected to succeed at the boundary DateTime.MaxValue");
Assert.Equal(DateTime.MaxValue, maxDateTime);
- if (PlatformDetection.IsFullFramework)
- {
- AssertExtensions.Throws<ArgumentOutOfRangeException>("value", () => DateTime.TryParse("9999-12-31T23:59:59.999999999Z", out var dateTime)); // exceeded DateTime.MaxValue
- }
- else
- {
- Assert.False(DateTime.TryParse("9999-12-31T23:59:59.999999999Z", out var dateTime),
- "DateTime parsing expected to throw with any dates greater than DateTime.MaxValue");
- }
+ Assert.False(DateTime.TryParse("9999-12-31T23:59:59.999999999Z", out var dateTime),
+ "DateTime parsing expected to throw with any dates greater than DateTime.MaxValue");
}
public static IEnumerable<object[]> Parse_ValidInput_Succeeds_MemberData()
[Theory]
[MemberData(nameof(Remainder_Valid_TestDataV2))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does not have fixes for https://github.com/dotnet/coreclr/issues/12605")]
public static void RemainderV2(decimal d1, decimal d2, decimal expected)
{
Assert.Equal(expected, d1 % d2);
public static class BigIntegerMod
{
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does not have fixes for https://github.com/dotnet/coreclr/issues/12605")]
public static void Test()
{
decimal[] decimalValues = GetRandomData(out BigDecimal[] bigDecimals);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does not have the fix for this bug")]
public static new void GetHashCode()
{
var dict = new Dictionary<string, (int hash, string value)>();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/coreclr#15196")]
public static void CreateDelegate2_Target_GenericTypeParameter()
{
[InlineData(double.NaN, -double.NaN, true)]
[InlineData(789.0, 789.0f, false)]
[InlineData(789.0, "789", false)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/6237")]
public static void Equals(double d1, object value, bool expected)
{
if (value is double d2)
yield return new object[] { double.NegativeInfinity, "G", invariantFormat, "-Infinity" };
}
- public static IEnumerable<object[]> ToString_TestData_NetFramework()
- {
- foreach (var testData in ToString_TestData())
- {
- yield return testData;
- }
-
- yield return new object[] { double.MinValue, "G", null, "-1.79769313486232E+308" };
- yield return new object[] { double.MaxValue, "G", null, "1.79769313486232E+308" };
-
- yield return new object[] { double.Epsilon, "G", null, "4.94065645841247E-324" };
-
- NumberFormatInfo invariantFormat = NumberFormatInfo.InvariantInfo;
- yield return new object[] { double.Epsilon, "G", invariantFormat, "4.94065645841247E-324" };
- }
-
public static IEnumerable<object[]> ToString_TestData_NotNetFramework()
{
foreach (var testData in ToString_TestData())
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Test_ToString_NetFramework()
- {
- RemoteExecutor.Invoke(() =>
- {
- CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
-
- foreach (var testdata in ToString_TestData_NetFramework())
- {
- ToString((double)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]);
- }
- return RemoteExecutor.SuccessExitCode;
- }).Dispose();
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Test_ToString_NotNetFramework()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Exception.TargetSite always returns null on UapAot.")]
public static void Exception_TargetSite_Jit()
{
bool caught = false;
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.UapAot, "Exception.TargetSite always returns null on UapAot.")]
- public static void Exception_TargetSite_Aot()
- {
- bool caught = false;
-
- try
- {
- throw new Exception();
- }
- catch (Exception ex)
- {
- caught = true;
-
- Assert.Null(ex.TargetSite);
- }
-
- Assert.True(caught);
- }
-
- [Fact]
public static void ThrowStatementDoesNotResetExceptionStackLineSameMethod()
{
(string, string, int) rethrownExceptionStackFrame = (null, null, 0);
{
try
{
- if (!PlatformDetection.IsFullFramework)
- rethrownExceptionStackFrame = GetSourceInformation(1);
+ rethrownExceptionStackFrame = GetSourceInformation(1);
throw new Exception("Boom!");
}
catch
{
- if (PlatformDetection.IsFullFramework)
- rethrownExceptionStackFrame = GetSourceInformation(1);
throw;
}
}
{
try
{
- if (!PlatformDetection.IsFullFramework)
- rethrownExceptionStackFrame = GetSourceInformation(1);
+ rethrownExceptionStackFrame = GetSourceInformation(1);
ThrowException(); Assert.True(false, "Workaround for Linux Release builds (https://github.com/dotnet/corefx/pull/28059#issuecomment-378335456)");
}
catch
{
- if (PlatformDetection.IsFullFramework)
- rethrownExceptionStackFrame = GetSourceInformation(1);
throw;
}
rethrownExceptionStackFrame = (null, null, 0);
public class ExceptionDerivedTests : Exception
{
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Exception_SerializeObjectState()
{
var excp = new ExceptionDerivedTests();
[OuterLoop]
[InlineData(0)]
[InlineData(-1)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Difference in behavior, full framework doesn't throw, fixed in .NET Core")]
public static void TryStartNoGCRegion_TotalSizeOutOfRange(long size)
{
RemoteInvokeOptions options = new RemoteInvokeOptions();
[InlineData(0)] // invalid because lohSize ==
[InlineData(-1)] // invalid because lohSize < 0
[InlineData(1152921504606846976)] // invalid because lohSize > totalSize
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Difference in behavior, full framework doesn't throw, fixed in .NET Core")]
public static void TryStartNoGCRegion_LOHSizeInvalid(long size)
{
RemoteInvokeOptions options = new RemoteInvokeOptions();
}
[Theory]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "The coreclr fixed a bug where Guid.TryParse throws a format or overflow exception (https://github.com/dotnet/corefx/issues/6316)")]
- [MemberData(nameof(GuidStrings_TryParseThrows_TestData))]
- public static void Parse_Invalid_Netfx(string input, Type exceptionType)
- {
- Guid result = default(Guid);
- Assert.Throws(exceptionType, () => Guid.TryParse(input, out result));
- Assert.Equal(default(Guid), result);
-
- Assert.Throws(exceptionType, () => Guid.Parse(input));
- }
-
- [Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET framework has a bug where Guid.TryParse throws a format or overflow exception")]
public static void Parse_Invalid_NetcoreApp(string input, Type exceptionType)
{
Parse_Invalid(input, exceptionType);
Assert.Equal(expected, guid1.Equals(guid2));
Assert.Equal(expected, guid1 == guid2);
Assert.Equal(!expected, guid1 != guid2);
-
- if (!PlatformDetection.IsFullFramework) // https://github.com/dotnet/coreclr/pull/5191
- {
- Assert.Equal(expected, guid1.GetHashCode().Equals(guid2.GetHashCode()));
- }
+ Assert.Equal(expected, guid1.GetHashCode().Equals(guid2.GetHashCode()));
}
Assert.Equal(expected, guid1.Equals(obj));
}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Exception strings not guaranteed on UapAot.")]
public static void ToStringTest()
{
string message = "this is not the file you're looking for";
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Exception strings not guaranteed on UapAot.")]
public static void ToStringTest()
{
string message = "this is not the file you're looking for";
Assert.Throws<OverflowException>(() => (int)ptr);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This was a bug fix in .NET Core where the hash code should be different")]
[ConditionalFact(nameof(Is64Bit))]
public static void GetHashCodeRespectAllBits()
{
public static class LazyOfTMetadataTests
{
[Fact]
- [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public static void Ctor_TMetadata()
{
var lazy = new Lazy<int, string>("metadata1");
}
[Fact]
- [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public static void Ctor_TMetadata_Bool()
{
var lazy = new Lazy<int, string>("metadata2", false);
}
[Fact]
- [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public static void Ctor_TMetadata_LazyThreadSaftetyMode()
{
var lazy = new Lazy<int, string>("metadata3", LazyThreadSafetyMode.PublicationOnly);
}
[Fact]
- [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public static void Ctor_TMetadata_LazyThreadSaftetyMode_InvalidMode_ThrowsArgumentOutOfRangeException()
{
AssertExtensions.Throws<ArgumentOutOfRangeException>("mode", () => new Lazy<int, string>("test", LazyThreadSafetyMode.None - 1)); // Invalid mode
}
[Fact]
- [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public static void Ctor_ValueFactory_TMetadata()
{
var lazy = new Lazy<string, int>(() => "foo", 4);
}
[Fact]
- [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public static void Ctor_ValueFactory_TMetadata_NullValueFactory_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("valueFactory", () => new Lazy<int, string>(null, "test")); // Value factory is null
}
[Fact]
- [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public static void Ctor_ValueFactory_TMetadata_Bool()
{
var lazy = new Lazy<string, int>(() => "foo", 5, false);
}
[Fact]
- [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public static void Ctor_ValueFactory_TMetadata_Bool_NullValueFactory_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("valueFactory", () => new Lazy<int, string>(null, "test", false)); // Value factory is null
}
[Fact]
- [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public static void Ctor_ValueFactory_TMetadata_LazyThreadSaftetyMode()
{
var lazy = new Lazy<string, int>(() => "foo", 6, LazyThreadSafetyMode.None);
}
[Fact]
- [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
public static void Ctor_ValueFactory_TMetadata_LazyThreadSaftetyMode_Invalid()
{
AssertExtensions.Throws<ArgumentNullException>("valueFactory", () => new Lazy<int, string>(null, "test", LazyThreadSafetyMode.PublicationOnly)); // Value factory is null
protected override Assembly Load(AssemblyName assemblyName) => null;
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "AssemblyLoadContext not available in NetFx")]
public class IsCollectibleTests
{
static public string asmNameString = "TestCollectibleAssembly";
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "MethodBase.GetMethodBody() not supported on UapAot")]
public static void TestMethodBody()
{
MethodBase mbase = typeof(MethodBaseTests).GetMethod("MyOtherMethod", BindingFlags.Static | BindingFlags.Public);
public static class MethodBodyTests
{
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Method.GetMethodBody() not supported on UapAot")]
public static void Test_MethodBody_ExceptionHandlingClause()
{
MethodInfo mi = typeof(MethodBodyTests).GetMethod("MethodBodyExample");
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module CustomAttributes not supported on UapAot.")]
public void CustomAttributes()
{
List<CustomAttributeData> customAttributes = Module.CustomAttributes.ToList();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.FullyQualifiedName does not indicate file location on UwpAot")]
public void FullyQualifiedName()
{
Assert.Equal(Assembly.GetExecutingAssembly().Location, Module.FullyQualifiedName);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Name does not indicate file location on UwpAot")]
public void Name()
{
Assert.Equal("system.runtime.tests.dll", Module.Name, ignoreCase: true);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.ToString() does not indicate file location on UwpAot")]
public void TestToString()
{
Assert.Equal("System.Runtime.Tests.dll", Module.ToString());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.GetField apis not supported on UapAot.")]
public void GetField_NullName()
{
ArgumentNullException ex = AssertExtensions.Throws<ArgumentNullException>("name", () =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.GetField apis not supported on UapAot.")]
public void GetField()
{
FieldInfo testInt = TestModule.GetField("TestInt", BindingFlags.Public | BindingFlags.Static);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.GetField apis not supported on UapAot.")]
public void GetFields()
{
List<FieldInfo> fields = TestModule.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static).OrderBy(f => f.Name).ToList();
[Theory]
[MemberData(nameof(Types))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")]
public void ResolveType(Type t)
{
Assert.Equal(t, Module.ResolveType(t.MetadataToken));
[Theory]
[MemberData(nameof(BadResolveTypes))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")]
public void ResolveTypeFail(int token)
{
Assert.ThrowsAny<ArgumentException>(() =>
[Theory]
[MemberData(nameof(Methods))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")]
public void ResolveMethod(MethodInfo t)
{
Assert.Equal(t, Module.ResolveMethod(t.MetadataToken));
[Theory]
[MemberData(nameof(BadResolveMethods))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")]
public void ResolveMethodFail(int token)
{
Assert.ThrowsAny<ArgumentException>(() =>
[Theory]
[MemberData(nameof(Fields))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")]
public void ResolveField(FieldInfo t)
{
Assert.Equal(t, Module.ResolveField(t.MetadataToken));
[Theory]
[MemberData(nameof(BadResolveFields))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")]
public void ResolveFieldFail(int token)
{
Assert.ThrowsAny<ArgumentException>(() =>
[Theory]
[MemberData(nameof(BadResolveStrings))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")]
public void ResolveStringFail(int token)
{
Assert.ThrowsAny<ArgumentException>(() =>
[MemberData(nameof(Types))]
[MemberData(nameof(Methods))]
[MemberData(nameof(Fields))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")]
public void ResolveMember(MemberInfo member)
{
Assert.Equal(member, Module.ResolveMember(member.MetadataToken));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")]
public void ResolveMethodOfGenericClass()
{
Type t = typeof(Foo<>);
[InlineData(null)]
[InlineData("")]
[InlineData("keyPairContainer")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Constructor is not supported in .NET Core")]
public void Ctor_String_ThrowsPlatformNotSupportedException(string keyPairContainer)
{
Assert.Throws<PlatformNotSupportedException>(() => new StrongNameKeyPair(keyPairContainer));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Constructor is not supported in .NET Core")]
public void Ctor_SerializationInfo_StreamingContext_ThrowsPlatformNotSupportedException()
{
Assert.Throws<PlatformNotSupportedException>(() => new SubStrongNameKeyPair(null, new StreamingContext()));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "PublicKey is not supported in .NET Core")]
public void PublicKey_Get_ThrowsPlatformNotSupportedException()
{
var keyPair = new StrongNameKeyPair(new byte[0]);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "OnDeserialization is not supported in .NET Core")]
public void GetObjectData_Invoke_ThrowsPlatformNotSupportedException()
{
ISerializable keyPair = new StrongNameKeyPair(new byte[0]);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "OnDeserialization is not supported in .NET Core")]
public void OnDeserialization_Invoke_ThrowsPlatformNotSupportedException()
{
IDeserializationCallback keyPair = new StrongNameKeyPair(new byte[0]);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void PrepareMethod()
{
foreach (MethodInfo m in typeof(RuntimeHelpersTests).GetMethods())
{
Process p = handle.Process;
p.WaitForExit();
- if (PlatformDetection.IsFullFramework)
- Assert.Equal(RemoteExecutor.SuccessExitCode, p.ExitCode);
- else
- Assert.NotEqual(RemoteExecutor.SuccessExitCode, p.ExitCode);
+ Assert.NotEqual(RemoteExecutor.SuccessExitCode, p.ExitCode);
}
}
}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does extra validation for SecurityException properties")]
public static void Properties()
{
var exception = new SecurityException();
[InlineData(float.NaN, -float.NaN, true)]
[InlineData(789.0f, 789.0, false)]
[InlineData(789.0f, "789", false)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/6237")]
public static void Equals(float f1, object value, bool expected)
{
if (value is float f2)
yield return new object[] { float.NegativeInfinity, "G", invariantFormat, "-Infinity" };
}
- public static IEnumerable<object[]> ToString_TestData_NetFramework()
- {
- foreach (var testData in ToString_TestData())
- {
- yield return testData;
- }
-
- yield return new object[] { float.MinValue, "G", null, "-3.402823E+38" };
- yield return new object[] { float.MaxValue, "G", null, "3.402823E+38" };
-
- yield return new object[] { float.Epsilon, "G", null, "1.401298E-45" };
-
- NumberFormatInfo invariantFormat = NumberFormatInfo.InvariantInfo;
- yield return new object[] { float.Epsilon, "G", invariantFormat, "1.401298E-45" };
- }
-
public static IEnumerable<object[]> ToString_TestData_NotNetFramework()
{
foreach (var testData in ToString_TestData())
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Test_ToString_NetFramework()
- {
- RemoteExecutor.Invoke(() =>
- {
- CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
-
- foreach (var testdata in ToString_TestData_NetFramework())
- {
- ToString((float)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]);
- }
- return RemoteExecutor.SuccessExitCode;
- }).Dispose();
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Test_ToString_NotNetFramework()
{
RemoteExecutor.Invoke(() =>
public partial class StringBuilderTests
{
private static readonly string s_chunkSplitSource = new string('a', 30);
- private static readonly string s_noCapacityParamName = PlatformDetection.IsFullFramework ? "requiredLength" : "valueCount";
+ private static readonly string s_noCapacityParamName = "valueCount";
private static StringBuilder StringBuilderWithMultipleChunks() => new StringBuilder(20).Append(s_chunkSplitSource);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Append_CharArray_Invalid()
{
var builder = new StringBuilder(0, 5);
AssertExtensions.Throws<ArgumentOutOfRangeException>("valueCount", () => builder.Append(new char[] { 'a' }, 0, 1)); // New length > builder.MaxCapacity
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Append_CharArray_InvalidDesktop()
- {
- var builder = new StringBuilder(0, 5);
- builder.Append("Hello");
-
- AssertExtensions.Throws<ArgumentNullException>("value", () => builder.Append((char[])null, 1, 1)); // Value is null, startIndex > 0 and count > 0
-
- AssertExtensions.Throws<ArgumentOutOfRangeException>("startIndex", () => builder.Append(new char[0], -1, 0)); // Start index < 0
- AssertExtensions.Throws<ArgumentOutOfRangeException>("count", () => builder.Append(new char[0], 0, -1)); // Count < 0
-
- AssertExtensions.Throws<ArgumentOutOfRangeException>("count", () => builder.Append(new char[5], 6, 0)); // Start index + count > value.Length
- AssertExtensions.Throws<ArgumentOutOfRangeException>("count", () => builder.Append(new char[5], 5, 1)); // Start index + count > value.Length
-
- AssertExtensions.Throws<ArgumentOutOfRangeException>("requiredLength", () => builder.Append(new char[] { 'a' }));
- AssertExtensions.Throws<ArgumentOutOfRangeException>("requiredLength", () => builder.Append(new char[] { 'a' }, 0, 1));
- }
-
public static IEnumerable<object[]> AppendFormat_TestData()
{
yield return new object[] { "", null, "", new object[0], "" };
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void AppendFormat_NoEscapedBracesInCustomFormatSpecifier()
{
// Tests new rule which does not allow escaped braces in the custom format specifier
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Insert_CharArray_InvalidCount()
{
var builder = new StringBuilder(0, 5);
}
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Insert_CharArray_InvalidCount_Desktop()
- {
- var builder = new StringBuilder(0, 5);
- builder.Append("Hello");
- AssertExtensions.Throws<ArgumentOutOfRangeException>("count", () => builder.Insert(0, new char[0], 0, -1)); // Char count < 0
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Insert_CharArray_InvalidCharCount()
{
var builder = new StringBuilder(0, 5);
AssertExtensions.Throws<ArgumentOutOfRangeException>("charCount", () => builder.Insert(0, new char[0], 0, -1)); // Char count < 0
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Insert_CharArray_InvalidCharCount_Desktop()
- {
- var builder = new StringBuilder(0, 5);
- builder.Append("Hello");
- AssertExtensions.Throws<ArgumentOutOfRangeException>("count", () => builder.Insert(0, new char[0], 0, -1)); // Char count < 0
- }
-
[Theory]
[InlineData("", 0, 0, "")]
[InlineData("Hello", 0, 5, "")]
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void Remove_Invalid()
{
var builder = new StringBuilder("Hello");
AssertExtensions.Throws<ArgumentOutOfRangeException>("length", () => builder.Remove(4, 2)); // Start index + length > 0
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void Remove_Invalid_Desktop()
- {
- var builder = new StringBuilder("Hello");
- AssertExtensions.Throws<ArgumentOutOfRangeException>("startIndex", () => builder.Remove(-1, 0)); // Start index < 0
- AssertExtensions.Throws<ArgumentOutOfRangeException>("length", () => builder.Remove(0, -1)); // Length < 0
- AssertExtensions.Throws<ArgumentOutOfRangeException>("index", () => builder.Remove(6, 0)); // Start index + length > 0
- AssertExtensions.Throws<ArgumentOutOfRangeException>("index", () => builder.Remove(5, 1)); // Start index + length > 0
- AssertExtensions.Throws<ArgumentOutOfRangeException>("index", () => builder.Remove(4, 2)); // Start index + length > 0
- }
-
[Theory]
[InlineData("", 'a', '!', 0, 0, "")]
[InlineData("aaaabbbbccccdddd", 'a', '!', 0, 16, "!!!!bbbbccccdddd")]
Assert.Equal(WaitHandle.WaitTimeout, WaitHandle.WaitAny(handles, TimeSpan.FromMilliseconds(1)));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Message is used as parameter name on netfx")]
[Fact]
public static void WaitAny_NullArray_Throws()
{
Assert.Throws<ArgumentNullException>("waitHandles", () => WaitHandle.WaitAny(handles, TimeSpan.Zero, exitContext: false));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Message is used as parameter name on netfx")]
[Fact]
public static void WaitAny_NullHandle_Throws()
{
Assert.False(WaitHandle.WaitAll(handles, TimeSpan.FromMilliseconds(1)));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Message is used as parameter name on netfx")]
[Fact]
public static void WaitAll_NullArray_Throws()
{
Assert.Throws<ArgumentNullException>("waitHandles", () => WaitHandle.WaitAll(handles, TimeSpan.Zero, exitContext: false));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Message is used as parameter name on netfx")]
[Fact]
public static void WaitAll_NullHandle_Throws()
{
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[MemberData(nameof(FromMilliseconds_TestData_NetCore))]
public static void FromMilliseconds_Netcore(double value, TimeSpan expected)
{
yield return new object[] { -1500.5, new TimeSpan(-15010000) };
}
- [Theory]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- [MemberData(nameof(FromMilliseconds_TestData_Desktop))]
- public static void FromMilliseconds_Desktop(double value, TimeSpan expected)
- {
- Assert.Equal(expected, TimeSpan.FromMilliseconds(value));
- }
-
[Fact]
public static void FromMilliseconds_Invalid()
{
yield return new object[] { "1:1:1.000001", CultureInfo.InvariantCulture, new TimeSpan(36610000010) };
yield return new object[] { "1:1:1.0000001", CultureInfo.InvariantCulture, new TimeSpan(36610000001) };
- if (PlatformDetection.IsFullFramework)
- {
- // Full framework can produce some incorrect results in some cases involving leading zeros when
- // parsing fraction more than 7 digits. we test the expected full framework results here and we have
- // have more net core tests to validate the correct the results.
- yield return new object[] { "1:1:1.00000001", CultureInfo.InvariantCulture, new TimeSpan(36610000001) };
- }
-
// DD.HH:MM:SS
yield return new object[] { "1.12:24:02", null, new TimeSpan(1, 12, 24, 2, 0) };
yield return new object[] { "1:1:.000001", CultureInfo.InvariantCulture, new TimeSpan(36600000010) };
yield return new object[] { "1:1:.0000001", CultureInfo.InvariantCulture, new TimeSpan(36600000001) };
- if (PlatformDetection.IsFullFramework)
- {
- // Full framework can produce some incorrect results in some cases involving leading zeros when
- // parsing fraction more than 7 digits. we test the expected full framework results here and we have
- // have more net core tests to validate the correct the results.
- yield return new object[] { "1:1:.00000001", CultureInfo.InvariantCulture, new TimeSpan(36600000001) };
- }
-
// Just below overflow on various components
yield return new object[] { "10675199", null, new TimeSpan(9223371936000000000) };
yield return new object[] { "10675199:00:00", null, new TimeSpan(9223371936000000000) };
// OverflowExceptions
yield return new object[] { "1:1:1.99999999", null, typeof(OverflowException) }; // overflowing fraction
- if (PlatformDetection.IsFullFramework)
- {
- // on non full framework we now succeed parsing the fraction .000000001
- // Full framework can produce some incorrect results in some cases involving leading zeros when
- // parsing fraction more than 7 digits. we test the expected full framework results here and we have
- // have more net core tests to validate the correct the results.
- yield return new object[] { "1:1:1.000000001", null, typeof(OverflowException) }; // too many leading zeroes in fraction
- }
-
yield return new object[] { "2147483647", null, typeof(OverflowException) }; // overflowing value == int.MaxValue
yield return new object[] { "2147483648", null, typeof(OverflowException) }; // overflowing value == int.MaxValue + 1
yield return new object[] { "10675200", null, typeof(OverflowException) }; // overflowing number of days
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET Framework has a bug. See https://github.com/dotnet/corefx/issues/26479")]
public static void CaseInsensitiveLookup()
{
Assert.Equal(TimeZoneInfo.FindSystemTimeZoneById(s_strBrasilia), TimeZoneInfo.FindSystemTimeZoneById(s_strBrasilia.ToLowerInvariant()));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void EnsureUtcObjectSingleton()
{
TimeZoneInfo utcObject = TimeZoneInfo.GetSystemTimeZones().Single(x => x.Id.Equals("UTC", StringComparison.OrdinalIgnoreCase));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "netfx doesn't have the fix in https://github.com/dotnet/coreclr/pull/21071")]
public void GetInterface_SameNameInterfaces_FullySpecified_Succeeds()
{
Assert.NotNull(typeof(ClassWithTwoSameNameInterfaces).GetInterface("System.Tests.Inner.Interface1", ignoreCase: true));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Stackwalking is not supported on UaoAot")]
public void GetTypeByName_InvokeViaReflection_Success()
{
MethodInfo method = typeof(Type).GetMethod("GetType", new[] { typeof(string) });
Type.GetType(name, false, ignore) :
assem.GetType(name, false, ignore);
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() is not supported on UapAot")]
public void GetTypeByName()
{
RemoteInvokeOptions options = new RemoteInvokeOptions();
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() is not supported on UapAot")]
[InlineData("System.Collections.Generic.Dictionary`2[[Program, TestLoadAssembly], [Program2, TestLoadAssembly]]")]
[InlineData("")]
public void GetTypeByName_NoSuchType_ThrowsTypeLoadException(string typeName)
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() is not supported on UapAot")]
public void GetTypeByNameCaseSensitiveTypeloadFailure()
{
RemoteInvokeOptions options = new RemoteInvokeOptions();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void IsContextful()
{
Assert.True(!typeof(TypeTestsExtended).IsContextful);
[Theory]
[MemberData(nameof(GetInterfaceMap_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Type.GetInterfaceMap() is not supported on UapAot")]
public void GetInterfaceMap(Type interfaceType, Type classType, Tuple<MethodInfo, MethodInfo>[] expectedMap)
{
InterfaceMapping actualMapping = classType.GetInterfaceMap(interfaceType);
// - The .NET Native implementation of IsTypeDefinition is not the one that works by enumerating selected values off CorElementType.
// It has much less need of a test like this.
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot)]
public void IsTypeDefinition_AllDefinedTypesInCoreAssembly()
{
foreach (Type type in typeof(object).Assembly.DefinedTypes)
Assert.Equal(os, TypedReference.ToObject(tr));
}
-#if !uapaot // ActiveIssue UapAot TFS 430781 - __makeref causes ILC fatal error.
[Fact]
public static void GetTargetTypeTests()
{
reference = __makeref(boolValue);
Assert.Equal(boolValue.GetType(), TypedReference.GetTargetType(reference));
}
-#endif // !uapaot
-#if !uapaot // ActiveIssue UapAot TFS 430781 - __makeref causes ILC fatal error.
[Fact]
public static unsafe void PointerTypeTests()
{
Assert.Equal(typeof(UIntPtr), obj.GetType());
Assert.Equal((UIntPtr)pointerValue, (UIntPtr)obj);
}
-#endif // !uapaot
}
}
Assert.Throws<OverflowException>(() => (uint)ptr);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This was a bug fix in .NET Core where the hash code should be different")]
[ConditionalFact(nameof(Is64Bit))]
public static void GetHashCodeRespectAllBits()
{
public void UnitySerializationHolderWithAssemblySingleton()
{
const string UnitySerializationHolderAssemblyBase64String = "AAEAAAD/////AQAAAAAAAAAEAQAAAB9TeXN0ZW0uVW5pdHlTZXJpYWxpemF0aW9uSG9sZGVyAwAAAAREYXRhCVVuaXR5VHlwZQxBc3NlbWJseU5hbWUBAAEIBgIAAABLbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BgAAAAkCAAAACw==";
- AssertExtensions.ThrowsIf<ArgumentException>(!PlatformDetection.IsFullFramework,
- () => BinaryFormatterHelpers.FromBase64String(UnitySerializationHolderAssemblyBase64String));
+ AssertExtensions.Throws<ArgumentException>(() =>
+ BinaryFormatterHelpers.FromBase64String(UnitySerializationHolderAssemblyBase64String));
}
}
}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")]
public static void StructWithDoubleFieldTightlyPackedZeroCompareTest()
{
StructWithDoubleFieldTightlyPacked obj1 = new StructWithDoubleFieldTightlyPacked();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")]
public static void StructWithDoubleFieldTightlyPackedNaNCompareTest()
{
StructWithDoubleFieldTightlyPacked obj1 = new StructWithDoubleFieldTightlyPacked();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")]
public static void StructWithNestedDoubleFieldTightlyPackedZeroCompareTest()
{
StructWithDoubleFieldNestedTightlyPacked obj1 = new StructWithDoubleFieldNestedTightlyPacked();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")]
public static void StructWithNestedDoubleFieldTightlyPackedNaNCompareTest()
{
StructWithDoubleFieldNestedTightlyPacked obj1 = new StructWithDoubleFieldNestedTightlyPacked();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/6237")]
public static void StructWithFloatFieldNotTightlyPackedZeroCompareTest()
{
StructWithFloatFieldNotTightlyPacked obj1 = new StructWithFloatFieldNotTightlyPacked();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")]
public static void StructWithFloatFieldTightlyPackedZeroCompareTest()
{
StructWithFloatFieldTightlyPacked obj1 = new StructWithFloatFieldTightlyPacked();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/6237")]
public static void StructWithFloatFieldNotTightlyPackedNaNCompareTest()
{
StructWithFloatFieldNotTightlyPacked obj1 = new StructWithFloatFieldNotTightlyPacked();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")]
public static void StructWithFloatFieldTightlyPackedNaNCompareTest()
{
StructWithFloatFieldTightlyPacked obj1 = new StructWithFloatFieldTightlyPacked();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/6237")]
public static void StructWithNestedFloatFieldNotTightlyPackedZeroCompareTest()
{
StructWithFloatFieldNestedNotTightlyPacked obj1 = new StructWithFloatFieldNestedNotTightlyPacked();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")]
public static void StructWithNestedFloatFieldTightlyPackedZeroCompareTest()
{
StructWithFloatFieldNestedTightlyPacked obj1 = new StructWithFloatFieldNestedTightlyPacked();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/6237")]
public static void StructWithNestedFloatFieldNotTightlyPackedNaNCompareTest()
{
StructWithFloatFieldNestedNotTightlyPacked obj1 = new StructWithFloatFieldNestedNotTightlyPacked();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")]
public static void StructWithNestedFloatFieldTightlyPackedNaNCompareTest()
{
StructWithFloatFieldNestedTightlyPacked obj1 = new StructWithFloatFieldNestedTightlyPacked();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")]
public static void StructWithNestedOverriddenEqualsCompareTest()
{
StructWithNestedOverriddenEqualsAndGetHashCode obj1 = new StructWithNestedOverriddenEqualsAndGetHashCode();
}
[ActiveIssue("https://github.com/dotnet/coreclr/pull/23898")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/coreclr/pull/23898")]
[Theory]
[MemberData(nameof(Comparison_TestData))]
public void ComparisonOperators_ReturnExpected(Version version1, Version version2, int expectedSign)
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
+ netcoreapp-Windows_NT;
+ netfx-Windows_NT;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<ProjectGuid>{70FAC855-CAC6-4523-8477-880548D58A1B}</ProjectGuid>
<UnsupportedPlatforms>Linux;NetBSD;OSX</UnsupportedPlatforms>
- <Configurations>netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
- <!-- Skipping the tests for project in all platforms due to issue: https://github.com/dotnet/corefx/issues/15041 -->
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;nuap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Ace\Ace.Common.Tests.cs" />
}
[Fact]
- [ActiveIssue(22858, framework: TargetFrameworkMonikers.NetFramework)] // Roundtripping claim fails in full framework with EndOfStream exception
public void BinaryWriteReadTest_Success()
{
var claim = new Claim(ClaimTypes.Actor, "value", ClaimValueTypes.String, "issuer", "originalIssuer");
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{BE8B728D-86C1-406F-8F5F-6656EC486B01}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ClaimsIdentityTests.cs" />
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Causing other tests to intermittently fail on netfx (https://github.com/dotnet/corefx/issues/18690)")]
public static void EnsureLegalSizesValuesIsolated()
{
new AesLegalSizesBreaker().Dispose();
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Unix;
- netstandard-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
return RSA.Create(keySize);
#else
RSA rsa = Create();
-
- if (PlatformDetection.IsFullFramework && rsa is RSACryptoServiceProvider)
- {
- rsa.Dispose();
- return new RSACryptoServiceProvider(keySize);
- }
rsa.KeySize = keySize;
return rsa;
public bool SupportsLargeExponent => true;
- public bool SupportsSha2Oaep { get; } =
- !PlatformDetection.IsFullFramework || !(RSA.Create() is RSACryptoServiceProvider);
+ public bool SupportsSha2Oaep { get; } = true;
- public bool SupportsPss { get; } =
- !PlatformDetection.IsFullFramework || !(RSA.Create() is RSACryptoServiceProvider);
+ public bool SupportsPss { get; } = true;
}
public partial class RSAFactory
}
}
- // https://github.com/dotnet/corefx/issues/18863
- private void ReinitilizeHashIfNetfx(HashAlgorithm hash)
- {
- if (PlatformDetection.IsFullFramework)
- {
- hash.Initialize();
- }
- }
-
private void VerifyTransformBlockHash(byte[] block1, byte[] block2, byte[] expected, byte[] expectedEmpty)
{
using (HashAlgorithm hash = Create())
hash.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
Assert.Equal(hash.Hash, expectedEmpty);
- ReinitilizeHashIfNetfx(hash);
hash.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
Assert.Equal(hash.Hash, expectedEmpty);
// Verify Hash
- ReinitilizeHashIfNetfx(hash);
hash.TransformBlock(block1, 0, block1.Length, null, 0);
hash.TransformFinalBlock(block2, 0, block2.Length);
Assert.Equal(expected, hash.Hash);
Assert.Equal(expected, hash.Hash); // .Hash doesn't clear hash
// Verify bad State
- ReinitilizeHashIfNetfx(hash);
hash.TransformBlock(block1, 0, block1.Length, null, 0);
// Can't access hash until TransformFinalBlock is called
Assert.Throws<CryptographicUnexpectedOperationException>(() => hash.Hash);
Assert.Equal(expected, hash.Hash);
// Verify clean State
- ReinitilizeHashIfNetfx(hash);
hash.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
Assert.Equal(hash.Hash, expectedEmpty);
}
Assert.Throws<CryptographicUnexpectedOperationException>(() => hash.Hash);
hash.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
Assert.Equal(expectedEmpty, hash.Hash);
- ReinitilizeHashIfNetfx(hash);
actual = hash.ComputeHash(Array.Empty<byte>(), 0, 0);
Assert.Equal(expectedEmpty, actual);
protected override int BlockSize { get { return 128; } }
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework implements this, Core does not")]
public void ProduceLegacyHmacValues()
{
using (var h = new HMACSHA384())
protected override int BlockSize { get { return 128; } }
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework implements this, Core does not")]
public void ProduceLegacyHmacValues()
{
using (var h = new HMACSHA512())
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetFX throws a CryptoException because it lacks boundary checking in the Stream overload. See #19092.")]
public void InvalidHashCoreArgumentsFromStream()
{
using (SHA1 sha1 = SHA1.Create())
{
RSAParameters parameters = TestData.RSA1032Parameters;
parameters.Exponent = null;
-
- if (RSA.Create() is RSACng && PlatformDetection.IsFullFramework)
- AssertExtensions.Throws<ArgumentException>(null, () => RSA.Create(parameters));
- else
- Assert.Throws<CryptographicException>(() => RSA.Create(parameters));
+ Assert.Throws<CryptographicException>(() => RSA.Create(parameters));
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{508A7D81-6462-459C-9F8F-B58FCCCFC8E7}</ProjectGuid>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\IO\PositionValueStream.cs">
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Causing other tests to intermittently fail on netfx (https://github.com/dotnet/corefx/issues/18690)")]
public static void EnsureLegalSizesValuesIsolated()
{
new TripleDESLegalSizesBreaker().Dispose();
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
netcoreapp-Windows_NT;
net462-Windows_NT;
net47-Windows_NT;
netfx-Windows_NT;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<ProjectGuid>{FF53459F-66F7-4F00-8D36-DF440CE18419}</ProjectGuid>
<DefineConstants>$(DefineConstants);TESTING_CNG_IMPLEMENTATION</DefineConstants>
- <Configurations>net462-Windows_NT-Debug;net462-Windows_NT-Release;net47-Windows_NT-Debug;net47-Windows_NT-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CreateTests.cs" />
<Compile Include="$(CommonTestPath)\System\Security\Cryptography\AlgorithmImplementations\RSA\SignVerify.netcoreapp.cs">
<Link>CommonTest\System\Security\Cryptography\AlgorithmImplementations\RSA\SignVerify.netcoreapp.cs</Link>
</Compile>
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'net462' OR '$(TargetGroup)' == 'net47' OR '$(TargetGroup)' == 'netcoreapp'">
<Compile Condition="'$(TargetsWindows)' == 'true'" Include="AesCngTests.cs" />
<Compile Condition="'$(TargetsWindows)' == 'true'" Include="TripleDESCngTests.cs" />
<Compile Include="$(CommonTestPath)\System\Security\Cryptography\AlgorithmImplementations\AES\AesContractTests.cs">
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
netcoreapp-Windows_NT;
- netstandard-Unix;
netcoreapp-Unix;
+ uap-Windows_NT
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{A05C2EF2-A986-448C-9C63-735CC17409AA}</ProjectGuid>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CreateTransformCompat.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Unix;
- netstandard-Windows_NT;
+ netcoreapp-Unix;
+ netcoreapp-Windows_NT;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<ProjectGuid>{0581E9FA-D639-4B88-96D8-D092760F90B0}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<Import Project="$(CommonPath)\System\Security\Cryptography\Asn1Reader\System.Security.Cryptography.Asn1Reader.Shared.projitems" />
<ItemGroup>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Unix;
netcoreapp-Unix;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<ProjectGuid>{E1DAF7B9-BECB-4D25-AABB-C9E0BC73C690}</ProjectGuid>
<UnsupportedPlatforms>Windows_NT</UnsupportedPlatforms>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netstandard-Unix-Debug;netstandard-Unix-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="EcDsaOpenSslTests.cs" />
<Link>CommonTest\System\Security\Cryptography\AlgorithmImplementations\RSA\RSAXml.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)'=='netcoreapp'">
+ <ItemGroup>
<Compile Include="$(CommonTestPath)\System\Security\Cryptography\AlgorithmImplementations\DSA\DSAKeyFileTests.cs">
<Link>CommonTest\System\Security\Cryptography\AlgorithmImplementations\DSA\DSAKeyFileTests.cs</Link>
</Compile>
netcoreapp-Windows_NT;
netcoreapp;
netfx-Windows_NT;
- netstandard;
+ <!-- uap; -->
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<ProjectGuid>{2DD8DFFA-09FF-46C6-8313-4A9CC1849A44}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <!--
+ UAP fails when loading the src assembly:
+ Could not load file or assembly 'System.Security.Cryptography.Pkcs, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
+ The located assembly's manifest definition does not match the assembly reference. (0x80131040)
+ -->
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release<!-->;uap-Debug;uap-Release--></Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Security\Cryptography\ByteUtils.cs">
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Throws NRE on netfx (https://github.com/dotnet/corefx/issues/18690)")]
public static void ValidKeySizeUsesProperty()
{
using (AsymmetricAlgorithm aa = new DoesNotSetLegalKeySizesField())
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
public static class CryptoConfigTests
{
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void DefaultStaticCreateMethods()
{
// .NET Core does not allow the base classes to pick an algorithm.
Assert.NotNull(new CryptographicException().Message);
Assert.Equal(message, new CryptographicException(message).Message);
Assert.Equal(message + " 12345", new CryptographicException(message + " {0}", "12345").Message);
- if (PlatformDetection.IsFullFramework)
- {
- Assert.Equal(unchecked((int)0x80070005), new CryptographicException(5).HResult);
- }
- else
- {
- Assert.Equal(5, new CryptographicException(5).HResult);
- }
+ Assert.Equal(5, new CryptographicException(5).HResult);
Assert.Same(inner, new CryptographicException(message, inner).InnerException);
Assert.Equal(message, new CryptographicException(message, inner).Message);
// On desktop builds this next line will succeed (modulo FIPS prohibitions on MD5).
// On CoreFX it throws.
- if (PlatformDetection.IsFullFramework)
- {
- hmac.HashName = "MD5";
- Assert.Equal("MD5", hmac.HashName);
- }
- else
- {
- Assert.Throws<PlatformNotSupportedException>(() => hmac.HashName = "MD5");
- Assert.Equal("SHA1", hmac.HashName);
- }
+ Assert.Throws<PlatformNotSupportedException>(() => hmac.HashName = "MD5");
+ Assert.Equal("SHA1", hmac.HashName);
}
}
hmac.Key = Array.Empty<byte>();
byte[] ignored;
- if (PlatformDetection.IsFullFramework)
- {
- ignored = hmac.ComputeHash(Array.Empty<byte>());
- }
- else
- {
- Assert.Throws<PlatformNotSupportedException>(() => ignored = hmac.ComputeHash(Array.Empty<byte>()));
- }
+ Assert.Throws<PlatformNotSupportedException>(() => ignored = hmac.ComputeHash(Array.Empty<byte>()));
}
}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Throws NRE on netfx (https://github.com/dotnet/corefx/issues/18690)")]
public void EnsureDisposeFreesKey()
{
byte[] key = new[] { (byte)0x00, (byte)0x01, (byte)0x02, (byte)0x03, (byte)0x04, (byte)0x05, };
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Throws NRE on netfx (https://github.com/dotnet/corefx/issues/18690)")]
public void SetKeyNull()
{
using (var keyedHash = new TestKeyedHashAlgorithm())
try
{
byte[] hugeKey = new byte[536870917]; // value chosen so that when multiplied by 8 (bits) it overflows to the value 40
- if (PlatformDetection.IsFullFramework)
- {
- // This change should be ported to netfx
- s.Key = hugeKey;
- }
- else
- {
- Assert.Throws<CryptographicException>(() => s.Key = hugeKey);
- }
+ Assert.Throws<CryptographicException>(() => s.Key = hugeKey);
}
catch (OutOfMemoryException) { } // in case there isn't enough memory at test-time to allocate the large array
}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Throws NRE on netfx (https://github.com/dotnet/corefx/issues/18690)")]
public static void SetBlockSize_Uses_LegalBlockSizesProperty()
{
using (SymmetricAlgorithm s = new DoesNotSetKeySizesFields())
<Import Project="$(CommonTestPath)\Tests.props" />
<PropertyGroup>
<ProjectGuid>{101EB757-55A4-4F48-841C-C088640B8F57}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\IO\PositionValueStream.cs">
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
+ netcoreapp-Windows_NT;
+ netfx-Windows_NT;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<ProjectGuid>{749ED7AD-E3C1-4611-99BD-C5D4B3934B3A}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ProtectedDataTests.cs" />
// has been deliberately changed to no longer throw to match the behavior of
// X509CertificateCollection.Contains and the IList.Contains implementation, which do not
// throw.
- if (PlatformDetection.IsFullFramework)
- {
- Assert.Throws<ArgumentNullException>(() => collection.Contains(null));
- }
- else
- {
- Assert.False(collection.Contains(null));
- }
+ Assert.False(collection.Contains(null));
IList ilist = (IList)collection;
Assert.True(ilist.Contains(c1));
[Fact]
// On Desktop, list is untyped so it allows arbitrary types in it
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void X509CertificateCollectionAsIListBogusEntry()
{
using (X509Certificate2 c = new X509Certificate2())
netcoreapp-OSX;
netcoreapp-Unix;
netcoreapp-Windows_NT;
- netstandard;
uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "31463 is not fixed in NetFX")]
public static void FindByThumbprint_WithLrm()
{
RunTest(
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "31463 is not fixed in NetFX")]
public static void TestBySerialNumber_WithLRM()
{
// Hex string is also an allowed input format and case-blind
// Should ignore Left-to-right mark \u200E
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "31463 is not fixed in NetFX")]
[InlineData(LeftToRightMark + "59 71 A6 5A 33 4D DA 98 07 80 FF 84 1E BE 87 F9 72 32 41 F2")]
// Compat: Lone trailing nybbles are ignored
[InlineData(LeftToRightMark + "59 71 A6 5A 33 4D DA 98 07 80 FF 84 1E BE 87 F9 72 32 41 F2 3")]
private static void VerifyImportNotSupported(X509Certificate c)
{
- if (PlatformDetection.IsFullFramework)
- {
- Assert.Throws<ArgumentException>(() => c.Import(Array.Empty<byte>()));
- Assert.Throws<ArgumentException>(() => c.Import(string.Empty));
- Assert.Throws<ArgumentException>(() => c.Import(Array.Empty<byte>(), string.Empty, X509KeyStorageFlags.DefaultKeySet));
- Assert.Throws<ArgumentException>(() => c.Import(Array.Empty<byte>(), new SecureString(), X509KeyStorageFlags.DefaultKeySet));
- Assert.Throws<ArgumentException>(() => c.Import(string.Empty, string.Empty, X509KeyStorageFlags.DefaultKeySet));
- Assert.Throws<ArgumentException>(() => c.Import(string.Empty, new SecureString(), X509KeyStorageFlags.DefaultKeySet));
- }
- else
- {
- Assert.Throws<PlatformNotSupportedException>(() => c.Import(Array.Empty<byte>()));
- Assert.Throws<PlatformNotSupportedException>(() => c.Import(string.Empty));
- Assert.Throws<PlatformNotSupportedException>(() => c.Import(Array.Empty<byte>(), string.Empty, X509KeyStorageFlags.DefaultKeySet));
- Assert.Throws<PlatformNotSupportedException>(() => c.Import(Array.Empty<byte>(), new SecureString(), X509KeyStorageFlags.DefaultKeySet));
- Assert.Throws<PlatformNotSupportedException>(() => c.Import(string.Empty, string.Empty, X509KeyStorageFlags.DefaultKeySet));
- Assert.Throws<PlatformNotSupportedException>(() => c.Import(string.Empty, new SecureString(), X509KeyStorageFlags.DefaultKeySet));
- }
+ Assert.Throws<PlatformNotSupportedException>(() => c.Import(Array.Empty<byte>()));
+ Assert.Throws<PlatformNotSupportedException>(() => c.Import(string.Empty));
+ Assert.Throws<PlatformNotSupportedException>(() => c.Import(Array.Empty<byte>(), string.Empty, X509KeyStorageFlags.DefaultKeySet));
+ Assert.Throws<PlatformNotSupportedException>(() => c.Import(Array.Empty<byte>(), new SecureString(), X509KeyStorageFlags.DefaultKeySet));
+ Assert.Throws<PlatformNotSupportedException>(() => c.Import(string.Empty, string.Empty, X509KeyStorageFlags.DefaultKeySet));
+ Assert.Throws<PlatformNotSupportedException>(() => c.Import(string.Empty, new SecureString(), X509KeyStorageFlags.DefaultKeySet));
}
}
}
VerifyPrivateKey((RSA)alg);
// Currently unable to set PrivateKey
- if (!PlatformDetection.IsFullFramework)
- {
- Assert.Throws<PlatformNotSupportedException>(() => c.PrivateKey = null);
- Assert.Throws<PlatformNotSupportedException>(() => c.PrivateKey = alg);
- }
+ Assert.Throws<PlatformNotSupportedException>(() => c.PrivateKey = null);
+ Assert.Throws<PlatformNotSupportedException>(() => c.PrivateKey = alg);
}
}
Assert.Null(pubOnly.PrivateKey);
// Currently unable to set PrivateKey
- if (!PlatformDetection.IsFullFramework)
- {
- Assert.Throws<PlatformNotSupportedException>(() => cert.PrivateKey = null);
- }
+ Assert.Throws<PlatformNotSupportedException>(() => cert.PrivateKey = null);
using (var privKey = cert.GetECDsaPrivateKey())
{
}
[Fact]
- [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)]
public static void ComplexGetNameInfo_UpnName_Cert()
{
TestComplexGetNameInfo("subjectupn1@example.org", X509NameType.UpnName, false);
}
[Fact]
- [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)]
public static void ComplexGetNameInfo_UpnName_Issuer()
{
TestComplexGetNameInfo("issuerupn1@example.org", X509NameType.UpnName, true);
}
[Fact]
- [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)]
public static void ComplexGetNameInfo_DnsName_Cert()
{
TestComplexGetNameInfo("dns1.subject.example.org", X509NameType.DnsName, false);
}
[Fact]
- [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)]
public static void ComplexGetNameInfo_DnsName_Issuer()
{
TestComplexGetNameInfo("dns1.issuer.example.org", X509NameType.DnsName, true);
}
[Fact]
- [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)]
public static void ComplexGetNameInfo_DnsFromAlternativeName_Cert()
{
TestComplexGetNameInfo("dns1.subject.example.org", X509NameType.DnsFromAlternativeName, false);
}
[Fact]
- [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)]
public static void ComplexGetNameInfo_DnsFromAlternativeName_Issuer()
{
TestComplexGetNameInfo("dns1.issuer.example.org", X509NameType.DnsFromAlternativeName, true);
}
[Fact]
- [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)]
public static void ComplexGetNameInfo_UrlName_Cert()
{
TestComplexGetNameInfo("http://uri1.subject.example.org/", X509NameType.UrlName, false);
}
[Fact]
- [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)]
public static void ComplexGetNameInfo_UrlName_Issuer()
{
TestComplexGetNameInfo("http://uri1.issuer.example.org/", X509NameType.UrlName, true);
}
[Theory, MemberData(nameof(BrainpoolCurves))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "brainpool GetECDsaPublicKey fails on current netfx")]
public static void TestKey_ECDsabrainpool_PublicKey(byte[] curveData, byte[] notUsed)
{
byte[] helloBytes = Encoding.ASCII.GetBytes("Hello");
}
[Theory, MemberData(nameof(BrainpoolCurves))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "brainpool GetECDsaPublicKey fails on current netfx")]
public static void TestECDsaPublicKey_BrainpoolP160r1_ValidatesSignature(byte[] curveData, byte[] existingSignature)
{
byte[] helloBytes = Encoding.ASCII.GetBytes("Hello");
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "brainpool GetECDsaPublicKey fails on current netfx")]
public static void TestKey_BrainpoolP160r1()
{
if (PlatformDetection.WindowsVersion >= 10)
<DefineConstants Condition="'$(TargetGroup)'=='netcoreapp' OR '$(TargetGroup)'=='uap'">$(DefineConstants);HAVE_THUMBPRINT_OVERLOADS</DefineConstants>
<DefineConstants Condition="'$(TargetsUnix)' == 'true'">$(DefineConstants);Unix</DefineConstants>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Cert.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<OutputType>Library</OutputType>
<ProjectGuid>{4A85232C-E914-4E06-8542-26DAF4B22D60}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<RootNamespace>System.Security.Cryptography.Xml.Tests</RootNamespace>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
- netfx;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
{
Assert.Equal(typeof(ArgumentException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.True(ex.Message.IndexOf(tagName) != -1);
- Assert.Null(ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.True(ex.Message.IndexOf(tagName) != -1);
+ Assert.Null(ex.ParamName);
}
}
{
Assert.Equal(typeof(ArgumentNullException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
-
- Assert.NotNull(ex.Message);
- Assert.NotNull(ex.ParamName);
- Assert.Equal("tag", ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.NotNull(ex.ParamName);
+ Assert.Equal("tag", ex.ParamName);
}
}
{
Assert.Equal(typeof(ArgumentException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.True(ex.Message.IndexOf(invalid) != -1);
- Assert.Null(ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.True(ex.Message.IndexOf(invalid) != -1);
+ Assert.Null(ex.ParamName);
}
}
{
Assert.Equal(typeof(ArgumentNullException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.NotNull(ex.ParamName);
- Assert.Equal("tag", ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.NotNull(ex.ParamName);
+ Assert.Equal("tag", ex.ParamName);
}
}
{
Assert.Equal(typeof(ArgumentNullException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.NotNull(ex.ParamName);
- Assert.Equal("name", ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.NotNull(ex.ParamName);
+ Assert.Equal("name", ex.ParamName);
}
}
{
Assert.Equal(typeof(ArgumentNullException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.NotNull(ex.ParamName);
- Assert.Equal("value", ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.NotNull(ex.ParamName);
+ Assert.Equal("value", ex.ParamName);
}
}
{
Assert.Equal(typeof(ArgumentNullException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.NotNull(ex.ParamName);
- Assert.Equal("child", ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.NotNull(ex.ParamName);
+ Assert.Equal("child", ex.ParamName);
}
}
{
Assert.Equal(typeof(ArgumentException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.True(ex.Message.IndexOf("\"invalid\"") != -1);
- Assert.Null(ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.True(ex.Message.IndexOf("\"invalid\"") != -1);
+ Assert.Null(ex.ParamName);
}
}
{
Assert.Equal(typeof(ArgumentNullException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.NotNull(ex.ParamName);
- Assert.Equal("tag", ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.NotNull(ex.ParamName);
+ Assert.Equal("tag", ex.ParamName);
}
}
{
Assert.Equal(typeof(ArgumentNullException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.NotNull(ex.ParamName);
- Assert.Equal("tag", ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.NotNull(ex.ParamName);
+ Assert.Equal("tag", ex.ParamName);
}
}
{
Assert.Equal(typeof(ArgumentException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.True(ex.Message.IndexOf(invalid) != -1);
- Assert.Null(ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.True(ex.Message.IndexOf(invalid) != -1);
+ Assert.Null(ex.ParamName);
}
}
{
Assert.Equal(typeof(ArgumentNullException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.NotNull(ex.ParamName);
- Assert.Equal("Tag", ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.NotNull(ex.ParamName);
+ Assert.Equal("Tag", ex.ParamName);
}
}
{
Assert.Equal(typeof(ArgumentException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.True(ex.Message.IndexOf(invalid) != -1);
- Assert.Null(ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.True(ex.Message.IndexOf(invalid) != -1);
+ Assert.Null(ex.ParamName);
}
}
{
Assert.Equal(typeof(ArgumentNullException), ex.GetType());
Assert.Null(ex.InnerException);
- if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames.
- {
- Assert.NotNull(ex.Message);
- Assert.NotNull(ex.ParamName);
- Assert.Equal("xml", ex.ParamName);
- }
+ Assert.NotNull(ex.Message);
+ Assert.NotNull(ex.ParamName);
+ Assert.Equal("xml", ex.ParamName);
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{7517F1E9-EEB4-4676-A054-CE4A44A66B66}</ProjectGuid>
- <Configurations>netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
- <!-- .NET Framework has actual implementation, not stubs -->
- <ItemGroup Condition="'$(TargetGroup)' != 'netfx'">
+ <ItemGroup>
<Compile Include="ApplicationTrustTests.cs" />
<Compile Include="CodeConnectAccessTests.cs" />
<Compile Include="CodeGroupTests.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
+ netcoreapp-Windows_NT;
+ netfx-Windows_NT;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<ProjectGuid>{6C36F3AC-54A1-4021-9F5D-CDEFF7347277}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="NTAccount.cs" />
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This SidTypes are only available in .NET Core")]
+#if netcoreapp
[ConditionalTheory(nameof(AccountIsDomainJoined))]
[InlineData(WellKnownSidType.WinBuiltinDCOMUsersSid)]
[InlineData(WellKnownSidType.WinBuiltinIUsersSid)]
var currentDomainSid = WindowsIdentity.GetCurrent().Owner.AccountDomainSid;
AssertExtensions.Throws<ArgumentException>("sidType", () => new SecurityIdentifier(sidType, currentDomainSid));
}
+ #endif
[Fact]
public void MaxDefinedHasLegacyValue()
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<ProjectGuid>{69609238-62C7-479D-A8CE-709F41101D3C}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{A622B2C0-DD74-4218-9CF0-F9B2E52F4E91}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="BasicScenarioTests.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<ProjectGuid>{835AD07B-7C9A-406F-B16F-59B3B0D017A4}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="EncoderFallbackBufferHelper.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<ProjectGuid>{037D5B14-EEE1-43C4-8AA8-9F276C0C10CF}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Issue #29898 is not fixed in the full framework yet")]
public static void TestDecoderFallbackIndex()
{
// This test case ensuring when we fallback, we'll never encounter a negative index in
// Call Convert to convert partial of a Unicode character array with UTF8 encoder
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue(11057)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "coreclr #23020 is not fixed in netfx.")]
public void EncoderUTF8ConvertUnicodeCharArrayPartial()
{
char[] chars = "\uD83D\uDE01Test".ToCharArray();
// Call Convert to convert partial of a ASCII+Unicode character array with ASCII encoder
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue(11057)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "coreclr #23020 is not fixed in netfx.")]
public void EncoderASCIIConvertMixedASCIIUnicodeCharArrayPartial()
{
char[] chars = "T\uD83D\uDE01est".ToCharArray();
// Call Convert to convert partial of a ASCII+Unicode character array with UTF8 encoder
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue(11057)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "coreclr #23020 is not fixed in netfx.")]
public void EncoderUTF8ConvertMixedASCIIUnicodeCharArrayPartial()
{
char[] chars = "T\uD83D\uDE01est".ToCharArray();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework uses system ACP and not UTF8")]
public static void DefaultEncodingBOMTest()
{
UTF8Encoding defaultEncoding = Encoding.Default as UTF8Encoding;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void CreateFallbackBuffer_Fallback_InvalidSurrogateChars_ThrowsArgumentOutOfRangeException()
{
EncoderFallbackBuffer buffer = new EncoderExceptionFallback().CreateFallbackBuffer();
AssertExtensions.Throws<ArgumentOutOfRangeException>("charUnknownHigh", () => buffer.Fallback('a', '\uDC00', 0));
AssertExtensions.Throws<ArgumentOutOfRangeException>("charUnknownLow", () => buffer.Fallback('\uD800', 'a', 0));
}
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void CreateFallbackBuffer_Fallback_InvalidSurrogateChars_ThrowsArgumentOutOfRangeException_Desktop()
- {
- EncoderFallbackBuffer buffer = new EncoderExceptionFallback().CreateFallbackBuffer();
-
- AssertExtensions.Throws<ArgumentOutOfRangeException>("charUnknownHigh", () => buffer.Fallback('a', '\uDC00', 0));
- AssertExtensions.Throws<ArgumentOutOfRangeException>("CharUnknownLow", () => buffer.Fallback('\uD800', 'a', 0));
- }
}
}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void CreateFallbackBuffer_Fallback_InvalidSurrogateChars_ThrowsArgumentOutOfRangeException()
{
EncoderFallbackBuffer buffer = new EncoderReplacementFallback().CreateFallbackBuffer();
AssertExtensions.Throws<ArgumentOutOfRangeException>("charUnknownHigh", () => buffer.Fallback('a', '\uDC00', 0));
AssertExtensions.Throws<ArgumentOutOfRangeException>("charUnknownLow", () => buffer.Fallback('\uD800', 'a', 0));
}
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public void CreateFallbackBuffer_Fallback_InvalidSurrogateChars_ThrowsArgumentOutOfRangeException_Desktop()
- {
- EncoderFallbackBuffer buffer = new EncoderReplacementFallback().CreateFallbackBuffer();
-
- AssertExtensions.Throws<ArgumentOutOfRangeException>("charUnknownHigh", () => buffer.Fallback('a', '\uDC00', 0));
- AssertExtensions.Throws<ArgumentOutOfRangeException>("CharUnknownLow", () => buffer.Fallback('\uD800', 'a', 0));
- }
}
}
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ASCIIEncoding\ASCIIEncodingEncode.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
+ netfx;
uap-Windows_NT;
- netstandard;
</BuildConfigurations>
</PropertyGroup>
</Project>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
+ netfx;
uap-Windows_NT;
- netstandard;
</BuildConfigurations>
</PropertyGroup>
</Project>
expectedValue,
Encoding.UTF8.GetString(
buffer.WrittenSpan
-#if netstandard
+#if netfx
.ToArray()
#endif
));
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{5F553243-042C-45C0-8E49-C739131E11C3}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\IO\WrappedMemoryStream.cs">
<ItemGroup>
<Compile Include="..\src\System\Text\Json\BitStack.cs" Link="BitStack.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsNETStandard)' == 'true'">
+ <ItemGroup Condition="'$(TargetsNetFx)' == 'true'">
<Compile Include="$(CommonPath)\System\Buffers\ArrayBufferWriter.cs">
<Link>CommonTest\System\Buffers\ArrayBufferWriter.cs</Link>
</Compile>
Assert.Equal(2, stream.Position);
}
-#if !netstandard
+#if !netfx
[Theory]
[InlineData(true, true)]
[InlineData(true, false)]
Assert.Throws<ObjectDisposedException>(() => jsonUtf8.Reset(output));
}
-#if !netstandard
+#if !netfx
[Theory]
[InlineData(true, true)]
[InlineData(true, false)]
{
const int SyncWriteThreshold = 25_000;
-#if !netstandard
+#if !netfx
await
#endif
using var jsonUtf8 = new Utf8JsonWriter(stream, options);
expectedValue,
Encoding.UTF8.GetString(
buffer.WrittenSpan
-#if netstandard
+#if netfx
.ToArray()
#endif
));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot)]
public static void DebuggerAttributeTests()
{
CaptureCollection col = CreateCollection();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot)]
public static void DebuggerAttributeTests_Null()
{
TargetInvocationException ex = Assert.Throws<TargetInvocationException>(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(CaptureCollection), null));
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
uap;
</BuildConfigurations>
</PropertyGroup>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot)]
public static void DebuggerAttributeTests()
{
GroupCollection col = CreateCollection();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot)]
public static void DebuggerAttributeTests_Null()
{
TargetInvocationException ex = Assert.Throws<TargetInvocationException>(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(GroupCollection), null));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot)]
public static void DebuggerAttributeTests()
{
MatchCollection col = CreateCollection();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot)]
public static void DebuggerAttributeTests_Null()
{
TargetInvocationException ex = Assert.Throws<TargetInvocationException>(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(MatchCollection), null));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "reflection blocked")]
public void Ctor_Cache_Second_drops_first()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "reflection blocked")]
public void Ctor_Cache_Shrink_cache()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "reflection blocked")]
public void Ctor_Cache_Promote_entries()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "reflection blocked")]
public void Ctor_Cache_Uses_culture_and_options()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot,
- "different cache structure, reflection blocked")]
public void Ctor_Cache_Uses_dictionary_linked_list_switch_does_not_throw()
{
// assume the limit is less than the cache size so we cross it two times:
private int GetCachedItemsNum()
{
- // On .NET Framework we have a different cache structure.
- if (PlatformDetection.IsFullFramework)
- {
- object linkedList = typeof(Regex)
- .GetField("livecode", BindingFlags.NonPublic | BindingFlags.Static)
- .GetValue(null);
- return (int)linkedList.GetType()
- .GetProperty("Count", BindingFlags.Public | BindingFlags.Instance)
- .GetValue(linkedList);
- }
-
return (int)typeof(Regex)
.GetField("s_cacheCount", BindingFlags.NonPublic | BindingFlags.Static)
.GetValue(null);
yield return new object[] { @"(cat)(\cZ*)(dog)", "asdlkcat\u001adogiwod", RegexOptions.None, new string[] { "cat\u001adog", "cat", "\u001a", "dog" } };
yield return new object[] { @"(cat)(\cz*)(dog)", "asdlkcat\u001adogiwod", RegexOptions.None, new string[] { "cat\u001adog", "cat", "\u001a", "dog" } };
- if (!PlatformDetection.IsFullFramework) // missing fix for #26501
- {
- yield return new object[] { @"(cat)(\c[*)(dog)", "asdlkcat\u001bdogiwod", RegexOptions.None, new string[] { "cat\u001bdog", "cat", "\u001b", "dog" } };
- yield return new object[] { @"(cat)(\c[*)(dog)", "asdlkcat\u001Bdogiwod", RegexOptions.None, new string[] { "cat\u001Bdog", "cat", "\u001B", "dog" } };
- }
+ yield return new object[] { @"(cat)(\c[*)(dog)", "asdlkcat\u001bdogiwod", RegexOptions.None, new string[] { "cat\u001bdog", "cat", "\u001b", "dog" } };
+ yield return new object[] { @"(cat)(\c[*)(dog)", "asdlkcat\u001Bdogiwod", RegexOptions.None, new string[] { "cat\u001Bdog", "cat", "\u001B", "dog" } };
// Atomic Zero-Width Assertions \A \Z \z \G \b \B
//\A
yield return new object[] { @"[a-[a-f]]", "abcdefghijklmnopqrstuvwxyz", RegexOptions.None, 0, 26, false, string.Empty };
// \c
- if (!PlatformDetection.IsFullFramework) // missing fix for #26501
- yield return new object[] { @"(cat)(\c[*)(dog)", "asdlkcat\u00FFdogiwod", RegexOptions.None, 0, 15, false, string.Empty };
+ yield return new object[] { @"(cat)(\c[*)(dog)", "asdlkcat\u00FFdogiwod", RegexOptions.None, 0, 15, false, string.Empty };
// Surrogate pairs splitted up into UTF-16 code units.
yield return new object[] { @"(\uD82F[\uDCA0-\uDCA3])", "\uD82F\uDCA2", RegexOptions.CultureInvariant, 0, 2, true, "\uD82F\uDCA2" };
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArmProcess))] // times out on ARM
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework needs fix for #26484")]
public void Match_ExcessPrefix()
{
RemoteExecutor.Invoke(() =>
static RegexParserTests()
{
- // On Full Framework RegexParseException doesn't exist and on uapaot reflection is blocked.
- if (!PlatformDetection.IsNetNative && !PlatformDetection.IsFullFramework)
- {
- s_parseExceptionType = typeof(Regex).Assembly.GetType("System.Text.RegularExpressions.RegexParseException", true);
- s_parseErrorField = s_parseExceptionType.GetField("_error", BindingFlags.NonPublic | BindingFlags.Instance);
- }
+ s_parseExceptionType = typeof(Regex).Assembly.GetType("System.Text.RegularExpressions.RegexParseException", true);
+ s_parseErrorField = s_parseExceptionType.GetField("_error", BindingFlags.NonPublic | BindingFlags.Instance);
}
[Theory]
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "fixes not ported to netfx RegexParser")]
// OutOfMemoryException
[InlineData("a{2147483647}", RegexOptions.None, null)]
[InlineData("a{2147483647,}", RegexOptions.None, null)]
/// <param name="action">The action to invoke.</param>
private static void Throws(RegexParseError error, Action action)
{
- // If no specific error is supplied, or we are running on full framework where RegexParseException
- // doesn't exist or we are running on uapaot where reflection is blocked we expect an ArgumentException.
- if (PlatformDetection.IsNetNative || PlatformDetection.IsFullFramework)
- {
- Assert.ThrowsAny<ArgumentException>(action);
- return;
- }
-
try
{
action();
<PropertyGroup>
<ProjectGuid>{94B106C2-D574-4392-80AB-3EE308A078DF}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
</PropertyGroup>
<Link>System\Text\RegularExpressions\RegexParseError.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="GroupCollectionReadOnlyDictionaryTests.cs" />
<Compile Include="CaptureCollectionTests2.cs" />
<Compile Include="GroupCollectionTests2.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard-Windows_NT;
+ netcoreapp-Windows_NT;
+ netfx-Windows_NT;
+ uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{458E445C-DF3C-4E4D-8E1D-F2FAC365BB40}</ProjectGuid>
- <Configurations>netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="MutexSecurityTests.cs" />
protected virtual bool RequiresSingleWriter => false;
protected virtual bool BuffersItems => true;
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Requires internal reflection on framework types.")]
[Fact]
public void ValidateDebuggerAttributes()
{
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
[Theory]
[MemberData(nameof(TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void TestDebuggerDisplaysAndTypeProxies(object obj)
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(obj);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void TestDequeueClass()
{
var c = Channel.CreateBounded<int>(10);
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{1AF01469-DBFC-4BA1-9331-8E39AA639FEE}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="BoundedChannelTests.cs" />
{
protected override bool RequiresSingleReader => true;
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Requires internal reflection on framework types.")]
[Fact]
public void ValidateInternalDebuggerAttributes()
{
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
<ProjectGuid>{861A3318-35AD-46ac-8257-8D5D2479BAD9}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<Compile Include="DllImport.cs" />
<Compile Include="ThreadPoolBoundHandle_PreAllocatedOverlappedTests.cs" />
<Compile Include="ThreadPoolBoundHandle_IntegrationTests.cs" />
- <Compile Include="ThreadPoolBoundHandle_IntegrationTests.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="ThreadPoolBoundHandle_IntegrationTests.netcoreapp.cs" />
<Compile Include="ThreadPoolBoundHandle_Helpers.cs" />
<Compile Include="AsyncResult.cs" />
<Compile Include="Win32Handle.cs" />
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // ThreadPoolBoundHandle.BindHandle is not supported on Unix
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Active Issue dotnet/corefx#13343")]
public unsafe void FlowsAsyncLocalsToCallback()
{ // Makes sure that we flow async locals to callback
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ netfx;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
public class DebugAttributeTests
{
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")]
public void TestDebuggerDisplaysAndTypeProxies()
{
// Test both canceled and non-canceled
<PropertyGroup>
<ProjectGuid>{A7AA2FC3-855F-44BA-8735-AB2F43D118A5}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Dataflow\ActionBlockTests.cs" />
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/22506", TargetFrameworkMonikers.UapAot)]
public void NonGeneric_SetStateMachine_InvalidArgument_ThrowsException()
{
AsyncValueTaskMethodBuilder b = default;
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/22506", TargetFrameworkMonikers.UapAot)]
public void Generic_SetStateMachine_InvalidArgument_ThrowsException()
{
AsyncValueTaskMethodBuilder<int> b = default;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "ValueTask _obj is reflection blocked.")]
public void NonGeneric_TornRead_DoesNotCrashOrHang()
{
// Validate that if we incur a torn read, we may get an exception, but we won't crash or hang.
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "ValueTask _obj is reflection blocked.")]
public void Generic_TornRead_DoesNotCrashOrHang()
{
// Validate that if we incur a torn read, we may get an exception, but we won't crash or hang.
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
{
RemoteExecutor.Invoke(() =>
{
- var eventSourceName = PlatformDetection.IsFullFramework ? "System.Threading.Tasks.TplEventSource" : "System.Threading.Tasks.Parallel.EventSource";
+ var eventSourceName = "System.Threading.Tasks.Parallel.EventSource";
using (var listener = new TestEventListener(eventSourceName, EventLevel.Verbose))
{
var events = new ConcurrentQueue<int>();
<PropertyGroup>
<ProjectGuid>{DE29C320-2ECA-43FD-9F41-6F4F6C6BACD5}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
tokenSource.Dispose(); //Repeat calls to Dispose should be ok.
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Relies on quirked behavior to not throw in token.Register when already disposed")]
[Fact]
public static void TokenSourceDispose_Negative()
{
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
}
[Fact]
- [ActiveIssue("TFS 450361 - Codegen optimization issue", TargetFrameworkMonikers.UapAot)]
public static void TaskMethodBuilder_UsesCompletedCache()
{
var atmb1 = new AsyncTaskMethodBuilder();
[Theory]
[InlineData(true)]
[InlineData(false)]
- [ActiveIssue("TFS 450361 - Codegen optimization issue", TargetFrameworkMonikers.UapAot)]
public static void TaskMethodBuilderBoolean_UsesCompletedCache(bool result)
{
TaskMethodBuilderT_UsesCompletedCache(result, true);
[InlineData(5, true)]
[InlineData(-5, false)]
[InlineData(42, false)]
- [ActiveIssue("TFS 450361 - Codegen optimization issue", TargetFrameworkMonikers.UapAot)]
public static void TaskMethodBuilderInt32_UsesCompletedCache(int result, bool shouldBeCached)
{
TaskMethodBuilderT_UsesCompletedCache(result, shouldBeCached);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/coreclr/pull/16588")]
[Fact]
- [ActiveIssue("TFS 450361 - Codegen optimization issue", TargetFrameworkMonikers.UapAot)]
public static void TaskMethodBuilderDecimal_DoesntUseCompletedCache()
{
TaskMethodBuilderT_UsesCompletedCache(0m, shouldBeCached: false);
[Theory]
[InlineData((string)null, true)]
[InlineData("test", false)]
- [ActiveIssue("TFS 450361 - Codegen optimization issue", TargetFrameworkMonikers.UapAot)]
public static void TaskMethodBuilderRef_UsesCompletedCache(string result, bool shouldBeCached)
{
TaskMethodBuilderT_UsesCompletedCache(result, shouldBeCached);
<ProjectGuid>{B6C09633-D161-499A-8FE1-46B2D53A16E7}</ProjectGuid>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Helpers.cs" />
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, reason: "netfx doesn't have https://github.com/dotnet/coreclr/pull/20294")]
[Fact]
public static async Task TaskDropsExecutionContextUponCompletion()
{
[Theory]
[InlineData(false)]
[InlineData(true)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix in .NET 4.7.")]
public void Direct(bool useRunContinuationsAsynchronously)
{
Run(useRunContinuationsAsynchronously, t => t);
[Theory]
[InlineData(false)]
[InlineData(true)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix in .NET 4.7.")]
public void ViaUnwrap(bool useRunContinuationsAsynchronously)
{
Run(useRunContinuationsAsynchronously, t => ((Task<Task>)t).Unwrap());
[Theory]
[InlineData(false)]
[InlineData(true)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix in .NET 4.7.")]
public void ViaWhenAll(bool useRunContinuationsAsynchronously)
{
Run(useRunContinuationsAsynchronously, t => Task.WhenAll(t));
[Theory]
[InlineData(false)]
[InlineData(true)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix in .NET 4.7.")]
public void ViaWhenAny(bool useRunContinuationsAsynchronously)
{
Run(useRunContinuationsAsynchronously, t => Task.WhenAny(t));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/coreclr/pull/23152")]
public static void LongContinuationChain_Await_DoesNotStackOverflow()
{
const int DiveDepth = 12_000;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Uses reflection to access internal fields of the Task class.")]
public static void RunFromResult_FaultedTask()
{
// Make sure faulted tasks are actually faulted. We have little choice for this test but to use reflection,
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Uses reflection to access an internal method of the TaskScheduler class.")]
public static void GetTaskSchedulersForDebugger_ReturnsDefaultScheduler()
{
MethodInfo getTaskSchedulersForDebuggerMethod = typeof(TaskScheduler).GetTypeInfo().GetDeclaredMethod("GetTaskSchedulersForDebugger");
}
[ConditionalFact(nameof(DebuggerIsAttached))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Uses reflection to access an internal method of the TaskScheduler class.")]
public static void GetTaskSchedulersForDebugger_DebuggerAttached_ReturnsAllSchedulers()
{
MethodInfo getTaskSchedulersForDebuggerMethod = typeof(TaskScheduler).GetTypeInfo().GetDeclaredMethod("GetTaskSchedulersForDebugger");
}
[ConditionalFact(nameof(DebuggerIsAttached))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Uses reflection to access an internal method of the TaskScheduler class.")]
public static void GetScheduledTasksForDebugger_DebuggerAttached_ReturnsTasksFromCustomSchedulers()
{
var nonExecutingScheduler = new BuggyTaskScheduler(faultQueues: false);
/// Tests Unwrap when both the outer task and non-generic inner task have completed by the time Unwrap is called.
/// </summary>
/// <param name="inner">Will be run with a RanToCompletion, Faulted, and Canceled task.</param>
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core optimization to return the exact same object")]
[Theory]
[MemberData(nameof(CompletedNonGenericTasks))]
public void NonGeneric_Completed_Completed_OptimizeToUseSameInner(Task inner)
/// Tests Unwrap when both the outer task and generic inner task have completed by the time Unwrap is called.
/// </summary>
/// <param name="inner">The inner task.</param>
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core optimization to return the exact same object")]
[Theory]
[MemberData(nameof(CompletedStringTasks))]
public void Generic_Completed_Completed_OptimizeToUseSameInner(Task<string> inner)
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // desktop framework throws ArgumentException
public static void RunTest_SkipOnDesktopFramework()
{
Assert.Throws<ArgumentNullException>(() => CompressedStack.Run(null, state => { }, null));
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
uap;
</BuildConfigurations>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CompressedStackTests.cs" />
<Compile Include="ExceptionTests.cs" />
<Compile Include="ThreadExceptionEventArgsTests.cs" />
<Compile Include="ThreadTests.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
<Compile Include="ThreadTests.netcoreapp.cs" />
</ItemGroup>
<ItemGroup>
public static void ApartmentState_AttributePresent(string appName, string testName)
{
var psi = new ProcessStartInfo();
- if (PlatformDetection.IsFullFramework || PlatformDetection.IsNetNative)
- {
- psi.FileName = appName;
- psi.Arguments = $"{testName}";
- }
- else
- {
- psi.FileName = DummyClass.HostRunnerTest;
- psi.Arguments = $"{appName} {testName}";
- }
+ psi.FileName = DummyClass.HostRunnerTest;
+ psi.Arguments = $"{appName} {testName}";
+
using (Process p = Process.Start(psi))
{
p.WaitForExit();
}
[Fact]
- [ActiveIssue(20766,TargetFrameworkMonikers.UapAot)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "RemoteExecutor is STA on UAP and UAPAOT.")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "RemoteExecutor is STA on UAP.")]
[PlatformSpecific(TestPlatforms.Windows)]
public static void ApartmentState_NoAttributePresent_DefaultState_Windows()
{
}).Dispose();
}
- // The Thread Apartment State is set to MTA if attribute is not specified on main function
- [Fact]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
- public static void ApartmentState_NoAttributePresent_STA_Windows_Desktop()
- {
- RemoteExecutor.Invoke(() =>
- {
- Assert.Throws<InvalidOperationException>(() => Thread.CurrentThread.SetApartmentState(ApartmentState.STA));
- Thread.CurrentThread.SetApartmentState(ApartmentState.MTA);
- Assert.Equal(ApartmentState.MTA, Thread.CurrentThread.GetApartmentState());
- }).Dispose();
- }
-
[Fact]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public static void ApartmentState_NoAttributePresent_DefaultState_Unix()
[Theory]
[MemberData(nameof(ApartmentStateTest_MemberData))]
[PlatformSpecific(TestPlatforms.Windows)] // Expected behavior differs on Unix and Windows
- [ActiveIssue(20766,TargetFrameworkMonikers.UapAot)]
public static void GetSetApartmentStateTest_ChangeAfterThreadStarted_Windows(
Func<Thread, ApartmentState> getApartmentState,
Func<Thread, ApartmentState, int> setApartmentState,
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
[MemberData(nameof(ApartmentStateTest_MemberData))]
[PlatformSpecific(TestPlatforms.Windows)] // Expected behavior differs on Unix and Windows
- [ActiveIssue(20766,TargetFrameworkMonikers.UapAot)]
public static void ApartmentStateTest_ChangeBeforeThreadStarted_Windows(
Func<Thread, ApartmentState> getApartmentState,
Func<Thread, ApartmentState, int> setApartmentState,
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono)]
[SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public static void CurrentCultureTest_DifferentThread()
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono)]
public static void CurrentPrincipalTest_SkipOnDesktopFramework()
{
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono)]
public static void CurrentPrincipalContextFlowTest_NotFlow()
{
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono)]
public static void ExecutionContextTest()
{
}
[Fact]
- [ActiveIssue(20766, TargetFrameworkMonikers.UapAot)]
public static void ThreadStateTest()
{
var e0 = new ManualResetEvent(false);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono)]
public static void AbortSuspendTest()
{
}
[Fact]
- [ActiveIssue(20766, TargetFrameworkMonikers.UapAot)]
public static void InterruptTest()
{
// Interrupting a thread that is not blocked does not do anything, but once the thread starts blocking, it gets
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
- [ActiveIssue(20766,TargetFrameworkMonikers.UapAot)]
public static void InterruptInFinallyBlockTest_SkipOnDesktopFramework()
{
// A wait in a finally block can be interrupted. The desktop framework applies the same rules as thread abort, and
}
[Fact]
- [ActiveIssue(20766,TargetFrameworkMonikers.UapAot)]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono)]
public static void MiscellaneousTest()
{
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Default principal policy on .NET Framework is Unauthenticated Principal")]
public static void DefaultPrincipalPolicyTest()
{
RemoteExecutor.Invoke(() =>
Assert.Null(Thread.CurrentPrincipal);
}).Dispose();
}
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Default principal policy on .NET Core is No Principal")]
- public static void DefaultPrincipalPolicyTest_Desktop()
- {
- RemoteExecutor.Invoke(() =>
- {
- Assert.Equal(string.Empty, Thread.CurrentPrincipal.Identity.Name);
- }).Dispose();
- }
}
}
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
uap;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<ProjectGuid>{403AD1B8-6F95-4A2E-92A2-727606ABD866}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<Compile Include="ThreadPoolTests.cs" />
- <Compile Include="ThreadPoolTests.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="ThreadPoolTests.netcoreapp.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Threading\ThreadTestHelpers.cs">
static ThreadPoolTests()
{
// Run the following tests before any others
- if (!PlatformDetection.IsNetNative)
- {
- ConcurrentInitializeTest();
- }
+ ConcurrentInitializeTest();
}
// Tests concurrent calls to ThreadPool.SetMinThreads
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "ThreadPool.SetMinThreads is not supported on UapAot.")]
public static void ConcurrentInitializeTest()
{
int processorCount = Environment.ProcessorCount;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "ThreadPool.SetMinThreads and SetMaxThreads are not supported on UapAot.")]
public static void SetMinMaxThreadsTest()
{
int minw, minc, maxw, maxc;
[Fact]
// Desktop framework doesn't check for this and instead, hits an assertion failure
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "ThreadPool.SetMinThreads and SetMaxThreads are not supported on UapAot.")]
public static void SetMinMaxThreadsTest_ChangedInDotNetCore()
{
int minw, minc, maxw, maxc;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Triggers an assertion failure.")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "ThreadPool.SetMinThreads and SetMaxThreads are not supported on UapAot.")]
public static void SetMinThreadsTo0Test()
{
int minw, minc, maxw, maxc;
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
uap;
</BuildConfigurations>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{ac20a28f-fda8-45e8-8728-058ead16e44c}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
</PropertyGroup>
<Compile Include="TimerConstructorTests.cs" />
<Compile Include="TimerChangeTests.cs" />
<Compile Include="TimerFiringTests.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
<Compile Include="TimerDisposeTests.cs" />
</ItemGroup>
</Project>
\ No newline at end of file
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
netcoreapp;
uap;
</BuildConfigurations>
AssertExtensions.Throws<ArgumentException>("mode", null, () => new EventWaitHandle(true, (EventResetMode)12345));
}
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Full framework throws argument exception on long names")]
- [Fact]
- public void Ctor_InvalidNames()
- {
- AssertExtensions.Throws<ArgumentException>("name", null, () => new EventWaitHandle(true, EventResetMode.AutoReset, new string('a', 1000)));
- }
-
[PlatformSpecific(TestPlatforms.Windows)] // names aren't supported on Unix
[Theory]
[MemberData(nameof(GetValidNames))]
public static TheoryData<string> GetValidNames()
{
var names = new TheoryData<string>() { Guid.NewGuid().ToString("N") };
-
- if (!PlatformDetection.IsFullFramework)
- names.Add(Guid.NewGuid().ToString("N") + new string('a', 1000));
+ names.Add(Guid.NewGuid().ToString("N") + new string('a', 1000));
return names;
}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // desktop framework has a bug
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono)]
public static void CaptureThenSuppressThenRunFlowTest()
{
}
}
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Full framework throws argument exception on long names")]
- [Fact]
- public void Ctor_InvalidNames_Windows()
- {
- AssertExtensions.Throws<ArgumentException>("name", null, () => new Mutex(false, new string('a', 1000), out bool createdNew));
- }
-
[Fact]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void Ctor_InvalidNames_Unix()
[PlatformSpecific(TestPlatforms.Windows)]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInAppContainer))] // Can't create global objects in appcontainer
- [SkipOnTargetFramework(
- TargetFrameworkMonikers.NetFramework,
- "The fix necessary for this test (PR https://github.com/dotnet/coreclr/pull/12381) is not in the .NET Framework.")]
public void Ctor_ImpersonateAnonymousAndTryCreateGlobalMutexTest()
{
ThreadTestHelpers.RunTestInBackgroundThread(() =>
{
var names = new TheoryData<string>() { Guid.NewGuid().ToString("N") };
- if (PlatformDetection.IsWindows && !PlatformDetection.IsFullFramework)
+ if (PlatformDetection.IsWindows)
names.Add(Guid.NewGuid().ToString("N") + new string('a', 1000));
return names;
[Fact]
[OuterLoop]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Hangs in desktop, issue dotnet/corefx#3364 is not fixed there")]
public static void ReleaseReadersWhenWaitingWriterTimesOut()
{
using (var rwls = new ReaderWriterLockSlim())
private const int InvalidLockCookieExceptionHResult = unchecked((int)0x80070057); // E_INVALIDARG
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // desktop framework treats the timeout as an unsigned value
public static void InvalidTimeoutTest_ChangedInDotNetCore()
{
var rwl = new ReaderWriterLock();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void DowngradeQuirks_ChangedInDotNetCore()
{
var trwl = new TestReaderWriterLock();
AssertExtensions.Throws<ArgumentException>(null, () => new Semaphore(2, 1, "CtorSemaphoreTest", out createdNew));
}
- [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Full framework throws argument exception on long names")]
- [Fact]
- public void Ctor_InvalidNames()
- {
- AssertExtensions.Throws<ArgumentException>("name", null, () => new Semaphore(0, 1, new string('a', 10000)));
- bool createdNew;
- AssertExtensions.Throws<ArgumentException>("name", null, () => new Semaphore(0, 1, new string('a', 10000), out createdNew));
- }
-
[Fact]
public void CanWaitWithoutBlockingUntilNoCount()
{
public static TheoryData<string> GetValidNames()
{
var names = new TheoryData<string>() { Guid.NewGuid().ToString("N") };
-
- if (!PlatformDetection.IsFullFramework)
- names.Add(Guid.NewGuid().ToString("N") + new string('a', 1000));
+ names.Add(Guid.NewGuid().ToString("N") + new string('a', 1000));
return names;
}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // desktop framework does not check for null and crashes
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono)]
public static void WaitTest_ChangedInDotNetCore()
{
<ProjectGuid>{18EF66B3-51EE-46D8-B283-1CB6A1197813}</ProjectGuid>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AsyncLocalTests.cs" />
<Compile Include="EtwTests.cs" />
<Compile Include="EventWaitHandleTests.cs" />
<Compile Include="InterlockedTests.cs" />
- <Compile Include="InterlockedTests.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="InterlockedTests.netcoreapp.cs" />
<Compile Include="HostExecutionContextTests.cs" />
<Compile Include="HostExecutionContextManagerTests.cs" />
<Compile Include="ManualResetEventTests.cs" />
<Compile Include="ManualResetEventSlimCancellationTests.cs" />
<Compile Include="ManualResetEventSlimTests.cs" />
<Compile Include="MonitorTests.cs" />
- <Compile Include="MonitorTests.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="MonitorTests.netcoreapp.cs" />
<Compile Include="MutexTests.cs" />
<Compile Include="SemaphoreSlimCancellationTests.cs" />
<Compile Include="SemaphoreSlimTests.cs" />
<Compile Include="ReaderWriterLockTests.cs" />
<Compile Include="ReaderWriterLockSlimTests.cs" />
<Compile Include="SpinWaitTests.cs" />
- <Compile Include="SpinWaitTests.netcoreapp.cs" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <Compile Include="SpinWaitTests.netcoreapp.cs" />
<Compile Include="ThreadLocalTests.cs" />
<Compile Include="XunitAssemblyAttributes.cs" />
<Compile Include="ExecutionContextTests.cs" />
[Fact]
[OuterLoop]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void ValuesGetterDoesNotThrowUnexpectedExceptionWhenDisposed()
{
var startTest = new ManualResetEvent(false);
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
[InlineData(0, EnlistmentOptions.None, EnlistmentOptions.None, Phase1Vote.Prepared, Phase1Vote.Prepared, true, EnlistmentOutcome.Aborted, EnlistmentOutcome.Aborted, TransactionStatus.Aborted)]
[InlineData(1, EnlistmentOptions.None, EnlistmentOptions.None, Phase1Vote.Prepared, Phase1Vote.Prepared, true, EnlistmentOutcome.Aborted, EnlistmentOutcome.Aborted, TransactionStatus.Aborted)]
[InlineData(2, EnlistmentOptions.None, EnlistmentOptions.None, Phase1Vote.Prepared, Phase1Vote.Prepared, true, EnlistmentOutcome.Aborted, EnlistmentOutcome.Aborted, TransactionStatus.Aborted)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Expects PNSE due to not being supported on core")]
public void TwoPhaseDurable(int volatileCount, EnlistmentOptions volatileEnlistmentOption, EnlistmentOptions durableEnlistmentOption, Phase1Vote volatilePhase1Vote, Phase1Vote durablePhase1Vote, bool commit, EnlistmentOutcome expectedVolatileOutcome, EnlistmentOutcome expectedDurableOutcome, TransactionStatus expectedTxStatus)
{
Transaction tx = null;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Expects PNSE due to not being supported on core")]
public void SimpleTransactionSuperior()
{
MySimpleTransactionSuperior superior = new MySimpleTransactionSuperior();
<ProjectGuid>{1C397868-9644-48CB-94BF-35805C4AE024}</ProjectGuid>
<CoverageSupported>false</CoverageSupported>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="NonMsdtcPromoterTests.cs" />
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- netstandard;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{CBD5AE8D-8595-48E2-848F-1A3492A28FDB}</ProjectGuid>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- netstandard;
+ netcoreapp;
+ uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{914279EE-58B1-4B27-BA18-66D988C8DFFA}</ProjectGuid>
- <Configurations>netstandard-Debug;netstandard-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="HttpUtility\HttpUtilityTest.cs" />