Skip to content

Commit

Permalink
Merge CoreMangLib, Exceptions and Interop folders (#91901)
Browse files Browse the repository at this point in the history
  • Loading branch information
trylek authored Oct 12, 2023
1 parent d6fa6bb commit 5280006
Show file tree
Hide file tree
Showing 371 changed files with 1,684 additions and 1,019 deletions.
7 changes: 7 additions & 0 deletions src/tests/CoreMangLib/CoreMangLib.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<MergedWrapperProjectReference Include="*/**/*.??proj" />
</ItemGroup>

<Import Project="$(TestSourceDir)MergedTestRunner.targets" />
</Project>
11 changes: 11 additions & 0 deletions src/tests/CoreMangLib/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Merged.props', $(MSBuildThisFileDirectory)..))" />
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', $(MSBuildThisFileDirectory)..))" />

<PropertyGroup>
<RunAnalyzers>true</RunAnalyzers>
<NoWarn>$(NoWarn);xUnit1013</NoWarn>
<EnableNETAnalyzers>false</EnableNETAnalyzers>
</PropertyGroup>
</Project>
3 changes: 2 additions & 1 deletion src/tests/CoreMangLib/system/buffer/ASURT_99893.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
6 changes: 4 additions & 2 deletions src/tests/CoreMangLib/system/buffer/asurt_99893.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
// and thus one could define a new System.Int32 (as below) and use that instead.

using System;
using Xunit;

namespace System
{
class ASURT_99893
public class ASURT_99893
{
static int Main()
[Fact]
public static int TestEntryPoint()
{
Boolean pass=true;
#pragma warning disable 0436
Expand Down
6 changes: 4 additions & 2 deletions src/tests/CoreMangLib/system/delegate/VSD/OpenDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
using System;
using System.Reflection;
using System.Collections.Generic;
using Xunit;

class Program
public class Program
{
public class ClassA
{
Expand All @@ -28,7 +29,8 @@ public static MethodInfo GetMethod(Type t, string method)
}
return result;
}
public static int Main()
[Fact]
public static int TestEntryPoint()
{
Type typeTestClass = typeof(ClassA);
ClassA TestClass = (ClassA)Activator.CreateInstance(typeTestClass);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>exe</OutputType>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Globalization;
using System.Collections;
using Xunit;
//create for delegate combine(delegate a,delegate b) testing
namespace DelegateTest
{
Expand All @@ -26,7 +27,8 @@ enum identify_null
booldelegate starkWork;
booldelegate working;
voiddelegate completeWork;
public static int Main()
[Fact]
public static int TestEntryPoint()
{
DelegateCombine1 delegateCombine1 = new DelegateCombine1();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Globalization;
using System.Collections;
using Xunit;
//create for delegate combine(delegate a,delegate b) testing
namespace DelegateTest
{
Expand All @@ -25,7 +26,8 @@ enum identify_null
}
booldelegate starkWork;
booldelegate working;
public static int Main()
[Fact]
public static int TestEntryPoint()
{
DelegateCombineImpl delegateCombineImpl = new DelegateCombineImpl();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Globalization;
using Xunit;
//test case for delegate Equals method.
namespace DelegateTest
{
Expand All @@ -12,7 +13,8 @@ public class DelegateEquals

object starkWork;

public static int Main()
[Fact]
public static int TestEntryPoint()
{
DelegateEquals DelegateEquals = new DelegateEquals();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Globalization;
using Xunit;
//test case for delegate GetHashCode method.
namespace DelegateTest
{
Expand All @@ -14,7 +15,8 @@ public class DelegateGetHashCode
{


public static int Main()
[Fact]
public static int TestEntryPoint()
{
DelegateGetHashCode DelegateGetHashCode = new DelegateGetHashCode();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Globalization;
using Xunit;
//test case for delegate GetInvocationList method.
namespace DelegateTest
{
Expand All @@ -12,7 +13,8 @@ public class DelegateGetInvocationList

booldelegate starkWork;

public static int Main()
[Fact]
public static int TestEntryPoint()
{
DelegateGetInvocationList delegateGetInvocationList = new DelegateGetInvocationList();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Globalization;
using Xunit;
//test case for delegate Remove(System.Delegate,System.Delegate) method.
namespace DelegateTest
{
Expand All @@ -13,7 +14,8 @@ public class DelegateRemove

booldelegate starkWork;

public static int Main()
[Fact]
public static int TestEntryPoint()
{
DelegateRemove delegateRemoveImpl = new DelegateRemove();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Globalization;
using Xunit;
//test case for delegate RemoveImpl(System.Delegate) method.
namespace DelegateTest
{
Expand All @@ -12,7 +13,8 @@ public class DelegateRemoveImpl

booldelegate starkWork;

public static int Main()
[Fact]
public static int TestEntryPoint()
{
DelegateRemoveImpl delegateRemoveImpl = new DelegateRemoveImpl();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
//Covers various negative binding cases for delegates and generics...
using System;
using Xunit;


//Define some classes and method for use in our scenarios...
Expand All @@ -18,10 +19,11 @@ public override void GMeth<U>(){}
delegate void Open(B<int> b);
delegate void GClosed<T>();

class Test_negativegenerics{
public class Test_negativegenerics{
public static int retVal=100;

public static int Main(){
[Fact]
public static int TestEntryPoint(){
//Try to create an open-instance delegate to a virtual generic method (@TODO - Need early bound case here too)
//Try to create a generic delegate of a non-instantiated type
//Try to create a delegate over a non-instantiated target type
Expand Down
9 changes: 4 additions & 5 deletions src/tests/CoreMangLib/system/delegate/generics/ng_standard.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using Xunit;

class Test_ng_standard{
public static int Main(){
public class Test_ng_standard{
[Fact]
public static void TestEntryPoint(){
Console.WriteLine("Test creation/invocation of non-generic closed instance or open static delegates over various generic methods");

GenericClass<EQStruct<long>> refr = new GenericClass<EQStruct<long>>();
Expand Down Expand Up @@ -102,8 +104,5 @@ public static int Main(){
d9(50,new EQClass<long>(50));
d9 = new dc7(GenericStruct<EQStruct<long>>.SM9<EQClass<long>>);
d9(50,new EQClass<long>(50));

Console.WriteLine("Done - Passed");
return 100;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Reflection;
using Xunit;

class Program
public class Program
{
public int scale;

Expand All @@ -15,7 +16,9 @@ public static decimal getfunc(Program prog,int constituent)
{
return new decimal(constituent/prog.scale);
}
static int Main()

[Fact]
public static int TestEntryPoint()
{
int result = -1;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

using System;
using System.Diagnostics;
using Xunit;

delegate void Void_VoidDelegate();
public class TestClass
Expand All @@ -20,7 +21,8 @@ static Delegate DelegateCombine(params Delegate[] delegates) {
return a;
}

public static int Main() {
[Fact]
public static int TestEntryPoint() {
int iErrorCount = 0;
int iTestCount = 0;
{
Expand Down
Loading

0 comments on commit 5280006

Please sign in to comment.