C#: Start using 'options' files in tests

This commit is contained in:
Tamas Vajk
2021-06-29 14:51:02 +02:00
parent d325d2ae81
commit c29d11087b
285 changed files with 323 additions and 166 deletions

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Data.Common.dll /r:System.Xml.XmlSerializer.dll /r:System.Runtime.Serialization.Xml.dll /r:System.Runtime.Serialization.Xml.dll /r:System.Collections.dll /r:System.Private.Xml.dll /r:System.Private.DataContractSerialization.dll /r:System.Runtime.Extensions.dll /r:System.ComponentModel.TypeConverter.dll /r:System.Xml.ReaderWriter.dll /r:System.IO.FileSystem.dll

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /r:System.Data.Common.dll /r:System.Xml.XmlSerializer.dll /r:System.Runtime.Serialization.Xml.dll /r:System.Runtime.Serialization.Xml.dll /r:System.Collections.dll /r:System.Private.Xml.dll /r:System.Private.DataContractSerialization.dll /r:System.Runtime.Extensions.dll /r:System.ComponentModel.TypeConverter.dll /r:System.Xml.ReaderWriter.dll /r:System.IO.FileSystem.dll
using System;
using System.Data;
@@ -98,4 +98,4 @@ namespace DataSetSerializationTest
Console.WriteLine("Hello World!");
}
}
}
}

View File

@@ -0,0 +1 @@
semmle-extractor-options: /langversion:preview

View File

@@ -27,4 +27,4 @@ class UsingStmt
}
}
// semmle-extractor-options: /langversion:preview

View File

@@ -1,5 +1,5 @@
/*
semmle-extractor-options: /r:asm1=${testdir}/Assembly1.dll /r:asm2=${testdir}/Assembly2.dll
Class is defined in three places, and requires the alias to disambiguate them.
*/

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:asm1=${testdir}/Assembly1.dll /r:asm2=${testdir}/Assembly2.dll

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Collections.Specialized.dll
using System;
using System.Web;

View File

@@ -0,0 +1 @@
semmle-extractor-options: ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Collections.Specialized.dll

View File

@@ -15,4 +15,4 @@ namespace TestAssemblies
}
}
// semmle-extractor-options: /r:System.Runtime.Extensions.dll

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /out:Locations.dll
using System.Reflection;

View File

@@ -0,0 +1,2 @@
semmle-extractor-options: /out:Locations.dll
semmle-extractor-options: /r:System.Runtime.Extensions.dll

View File

@@ -139,4 +139,4 @@ class Assignables
}
}
// semmle-extractor-options: /langversion:8.0

View File

@@ -0,0 +1 @@
semmle-extractor-options: /langversion:8.0

View File

@@ -55,4 +55,4 @@ namespace Semmle
}
}
// semmle-extractor-options: /r:System.Runtime.Extensions.dll /r:System.IO.FileSystem.dll

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Runtime.Extensions.dll /r:System.IO.FileSystem.dll

View File

@@ -1,7 +1,7 @@
// semmle-extractor-options: --cil
using System;
class Test
{
}
}

View File

@@ -0,0 +1 @@
semmle-extractor-options: --cil

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: --cil
using System;

View File

@@ -0,0 +1 @@
semmle-extractor-options: --cil

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: --cil
using System;

View File

@@ -0,0 +1 @@
semmle-extractor-options: --cil

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: --cil
using System;

View File

@@ -0,0 +1 @@
semmle-extractor-options: --cil

View File

@@ -1,7 +1,7 @@
// semmle-extractor-options: --cil
using System;
class Test
{
}
}

View File

@@ -0,0 +1 @@
semmle-extractor-options: --cil

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: --cil
using System;

View File

@@ -0,0 +1 @@
semmle-extractor-options: --cil

View File

@@ -1 +1 @@
// semmle-extractor-options: --cil --pdb

View File

@@ -0,0 +1 @@
semmle-extractor-options: --cil --pdb

View File

@@ -1,10 +1,10 @@
/*
/*
* A regression test for the CIL extractor - compiled into Methods.dll
* This tests the correct extraction of F<T>, and we should end up with
* 2 constructed methods of F<T>.
*/
// semmle-extractor-options: --cil
namespace Methods
{

View File

@@ -0,0 +1 @@
semmle-extractor-options: --cil

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: --cil
using System;

View File

@@ -0,0 +1 @@
semmle-extractor-options: --cil

View File

@@ -52,4 +52,4 @@ class Assertions
}
}
// semmle-extractor-options: ${testdir}/../../../resources/stubs/Microsoft.VisualStudio.TestTools.UnitTesting.cs /r:System.Diagnostics.Contracts.dll

View File

@@ -0,0 +1 @@
semmle-extractor-options: ${testdir}/../../../resources/stubs/Microsoft.VisualStudio.TestTools.UnitTesting.cs /r:System.Diagnostics.Contracts.dll

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: --cil /r:System.Net.Http.dll /r:System.Runtime.Extensions.dll /r:System.Private.Xml.dll
using System;

View File

@@ -0,0 +1 @@
semmle-extractor-options: --cil /r:System.Net.Http.dll /r:System.Runtime.Extensions.dll /r:System.Private.Xml.dll

View File

@@ -2,4 +2,4 @@ using System;
class NonGeneratedCode { }
// semmle-extractor-options: /r:System.Diagnostics.Tools.dll

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Diagnostics.Tools.dll

View File

@@ -147,4 +147,4 @@ class ExitMethods
}
}
// semmle-extractor-options: ${testdir}/../../../resources/stubs/System.Windows.cs ${testdir}/../../../resources/stubs/Microsoft.VisualStudio.TestTools.UnitTesting.cs

View File

@@ -301,4 +301,4 @@ class NegationInConstructor
}
}
// semmle-extractor-options: /r:System.Linq.dll /r:System.Runtime.Extensions.dll

View File

@@ -0,0 +1,2 @@
semmle-extractor-options: /r:System.Linq.dll /r:System.Runtime.Extensions.dll
semmle-extractor-options: ${testdir}/../../../resources/stubs/System.Windows.cs ${testdir}/../../../resources/stubs/Microsoft.VisualStudio.TestTools.UnitTesting.cs

View File

@@ -95,4 +95,4 @@ class AssertTests
}
}
// semmle-extractor-options: ${testdir}/../../../resources/stubs/Microsoft.VisualStudio.TestTools.UnitTesting.cs

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /r:System.Collections.Specialized.dll /r:System.Collections.dll /r:System.Linq.dll
using System;
using System.Collections;
using System.Collections.Generic;

View File

@@ -1,2 +1,2 @@
// semmle-extractor-options: --cil
#nullable enable

View File

@@ -0,0 +1,3 @@
semmle-extractor-options: --cil
semmle-extractor-options: ${testdir}/../../../resources/stubs/Microsoft.VisualStudio.TestTools.UnitTesting.cs
semmle-extractor-options: /r:System.Collections.Specialized.dll /r:System.Collections.dll /r:System.Linq.dll

View File

@@ -46,4 +46,4 @@ class C<T1, T2, T3, T4, T5, T6>
}
}
// semmle-extractor-options: /r:System.Dynamic.Runtime.dll /r:System.Linq.Expressions.dll

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Dynamic.Runtime.dll /r:System.Linq.Expressions.dll

View File

@@ -29,4 +29,4 @@ class C<T>
}
}
// semmle-extractor-options: /r:System.Dynamic.Runtime.dll /r:System.Linq.Expressions.dll

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Dynamic.Runtime.dll /r:System.Linq.Expressions.dll

View File

@@ -92,4 +92,4 @@ class C3<T5, T6> where T5 : C1
public I4<T5, T6> M(I4<C1, T6> x) => x;
}
// semmle-extractor-options: /r:System.Dynamic.Runtime.dll /r:System.Linq.Expressions.dll

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Dynamic.Runtime.dll /r:System.Linq.Expressions.dll

View File

@@ -1,4 +1,4 @@
/*
/*
Testcase covering C# 6.0 features
*/
@@ -80,4 +80,4 @@ class IndexInitializers
}
}
// semmle-extractor-options: /r:System.Linq.dll /langerversion:6.0

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Linq.dll /langerversion:6.0

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /langversion:latest
class DefaultLiterals
{

View File

@@ -0,0 +1 @@
semmle-extractor-options: /langversion:latest

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /langversion:latest
using System;

View File

@@ -0,0 +1 @@
semmle-extractor-options: /langversion:latest

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /langversion:latest
using System;

View File

@@ -0,0 +1 @@
semmle-extractor-options: /langversion:latest

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /r:System.Linq.dll
using System;
using System.Linq;

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Linq.dll

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /r:System.Threading.Tasks.dll /r:System.Threading.Tasks.Extensions.dll /r:netstandard.dll /langversion:preview
using System;
using System.Collections.Generic;

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /langversion:8.0
using System;

View File

@@ -0,0 +1,3 @@
semmle-extractor-options: /langversion:8.0
semmle-extractor-options: /r:System.Threading.Tasks.dll /r:System.Threading.Tasks.Extensions.dll /r:netstandard.dll /langversion:preview
semmle-extractor-options: /langversion:8.0

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /langversion:8.0
using System;

View File

@@ -1,7 +1,7 @@
/*
Global statements are not allowed in 'library' target.
semmle-extractor-options: --standalone
*/
using System;
@@ -22,4 +22,4 @@ public class Attr : Attribute
{
Console.WriteLine("3");
}
}
}

View File

@@ -0,0 +1 @@
semmle-extractor-options: --standalone

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /r:System.Linq.dll
using System;
using System.Collections.Generic;
using System.Linq;

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Linq.dll

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Security.Cryptography.X509Certificates.dll ${testdir}/../../../../resources/stubs/System.Web.cs
using System.Web.Http;
using System.Web.Mvc;

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Security.Cryptography.X509Certificates.dll ${testdir}/../../../../resources/stubs/System.Web.cs

View File

@@ -503,4 +503,4 @@ static class IEnumerableExtensions
}
}
// semmle-extractor-options: /r:System.Diagnostics.Process.dll /r:System.Linq.dll /r:System.Linq.Expressions.dll /r:System.Linq.Queryable.dll /r:System.ComponentModel.Primitives.dll

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Diagnostics.Process.dll /r:System.Linq.dll /r:System.Linq.Expressions.dll /r:System.Linq.Queryable.dll /r:System.ComponentModel.Primitives.dll

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll
using System;
using System.IO;
using System.Text;

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll

View File

@@ -181,4 +181,4 @@ public class Ssa
}
}
// semmle-extractor-options: /r:System.Collections.dll /r:System.Collections.Specialized.dll /r:System.Linq.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Collections.dll /r:System.Collections.Specialized.dll /r:System.Linq.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll

View File

@@ -488,4 +488,4 @@ class SignAnalysis
}
}
// semmle-extractor-options: /r:System.Linq.dll

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Linq.dll

View File

@@ -36,4 +36,4 @@ class Tuples
static void Use<T>(T u) { }
}
// semmle-extractor-options: /r:System.Diagnostics.Process.dll /r:System.Linq.dll /r:System.Linq.Expressions.dll /r:System.Linq.Queryable.dll /r:System.ComponentModel.Primitives.dll

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Diagnostics.Process.dll /r:System.Linq.dll /r:System.Linq.Expressions.dll /r:System.Linq.Queryable.dll /r:System.ComponentModel.Primitives.dll

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: --standalone
using System;

View File

@@ -0,0 +1 @@
semmle-extractor-options: --standalone

View File

@@ -1,4 +1,4 @@
using System; // semmle-extractor-options: /r:System.Dynamic.Runtime.dll /r:System.Linq.Expressions.dll
using System.Collections.Generic;
using System.Reflection;

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.Dynamic.Runtime.dll /r:System.Linq.Expressions.dll

View File

@@ -1,6 +1,6 @@
// semmle-extractor-options: /codepage:1252
class SBCS
{
string sbcs = "<22>";
string sbcs = "<22>";
}

View File

@@ -0,0 +1 @@
semmle-extractor-options: /codepage:1252

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /out:test.dll
class C1
{

View File

@@ -0,0 +1 @@
semmle-extractor-options: /out:test.dll

View File

@@ -25,4 +25,4 @@ namespace VisualStudioTests
}
}
// semmle-extractor-options: ${testdir}/../../../resources/stubs/Microsoft.VisualStudio.TestTools.UnitTesting.cs

View File

@@ -0,0 +1 @@
semmle-extractor-options: ${testdir}/../../../resources/stubs/Microsoft.VisualStudio.TestTools.UnitTesting.cs

View File

@@ -1,5 +1,5 @@
// semmle-extractor-options: /r:System.Data.dll /r:System.ComponentModel.Primitives.dll /r:System.ComponentModel.TypeConverter.dll ${testdir}/../../../resources/stubs/EntityFramework.cs ${testdir}/../../../resources/stubs/System.Data.cs /r:System.ComponentModel.TypeConverter.dll /r:System.Data.Common.dll /r:System.Linq.dll
// semmle-extractor-options: ${testdir}/../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs ${testdir}/../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.cs
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
@@ -225,4 +225,4 @@ namespace EFTests
{
}
}
}
}

View File

@@ -0,0 +1,2 @@
semmle-extractor-options: /r:System.Data.dll /r:System.ComponentModel.Primitives.dll /r:System.ComponentModel.TypeConverter.dll ${testdir}/../../../resources/stubs/EntityFramework.cs ${testdir}/../../../resources/stubs/System.Data.cs /r:System.ComponentModel.TypeConverter.dll /r:System.Data.Common.dll /r:System.Linq.dll
semmle-extractor-options: ${testdir}/../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs ${testdir}/../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.cs

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /nostdlib /noconfig --load-sources-from-project:../../../resources/stubs/Newtonsoft.Json/13.0.1/Newtonsoft.Json.csproj
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

View File

@@ -0,0 +1 @@
semmle-extractor-options: /nostdlib /noconfig --load-sources-from-project:../../../resources/stubs/Newtonsoft.Json/13.0.1/Newtonsoft.Json.csproj

View File

@@ -1,4 +1,4 @@
// semmle-extractor-options: /nostdlib /noconfig --load-sources-from-project:../../../resources/stubs/NHibernate/5.3.8/NHibernate.csproj
using NHibernate;

View File

@@ -0,0 +1 @@
semmle-extractor-options: /nostdlib /noconfig --load-sources-from-project:../../../resources/stubs/NHibernate/5.3.8/NHibernate.csproj

View File

@@ -33,4 +33,4 @@ struct Dispose1Struct : IDisposable
public void Dispose() { }
}
// semmle-extractor-options: /r:System.ComponentModel.Primitives.dll

View File

@@ -0,0 +1 @@
semmle-extractor-options: /r:System.ComponentModel.Primitives.dll

Some files were not shown because too many files have changed in this diff Show More