diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ExceptionVerifier.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ExceptionVerifier.cs index 7d8fe958f7a0cb..750cd7e93666b5 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ExceptionVerifier.cs +++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ExceptionVerifier.cs @@ -134,13 +134,18 @@ public ExceptionVerifier(string assemblyName, ExceptionVerificationFlags flags, { _output.WriteLine(e2.ToString()); } + catch (PlatformNotSupportedException e3) + { + // NativeAOT doesn't support assembly loading + _output.WriteLine(e3.ToString()); + } } } catch (Exception e) { _output.WriteLine("Exception: " + e.Message); _output.WriteLine("Stack: " + e.StackTrace); - throw new VerifyException("Error while loading assembly"); + throw new VerifyException("Error while loading assembly", e); } string[] resArray; @@ -395,5 +400,9 @@ public class VerifyException : Exception public VerifyException(string msg) : base(msg) { } + + public VerifyException(string msg, Exception innerException) + : base(msg, innerException) + { } } } diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/Initialize_EndValidation.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/Initialize_EndValidation.cs index 9deba7048c8b7e..7b7e56195103c9 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/Initialize_EndValidation.cs +++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/Initialize_EndValidation.cs @@ -9,7 +9,7 @@ namespace System.Xml.XmlSchemaValidatorApiTests { // ===================== Initialize ===================== - + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class TCInitialize : CXmlSchemaValidatorTestCase { private ITestOutputHelper _output; @@ -498,7 +498,7 @@ public void SetPartiaValidationAndCallValidate_Text_WhiteSpace_Valid(string type } // ===================== EndValidation ===================== - + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class TCEndValidation : CXmlSchemaValidatorTestCase { private ITestOutputHelper _output; diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/PropertiesTests.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/PropertiesTests.cs index 9193f315b89f2b..e9fc5daf566b61 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/PropertiesTests.cs +++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/PropertiesTests.cs @@ -10,7 +10,7 @@ namespace System.Xml.XmlSchemaValidatorApiTests { // ===================== XmlResolver ===================== - + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class TCXmlResolver : CXmlSchemaValidatorTestCase { private ITestOutputHelper _output; diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute.cs index 12c1dc848e085c..43751fc5a17b91 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute.cs +++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute.cs @@ -10,7 +10,7 @@ namespace System.Xml.XmlSchemaValidatorApiTests { // ===================== ValidateAttribute ===================== - + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class TCValidateAttribute : CXmlSchemaValidatorTestCase { private ITestOutputHelper _output; @@ -198,7 +198,7 @@ public void ValidateSameAttributeTwice() } // ===================== GetUnspecifiedDefaultAttributes ===================== - + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class TCGetUnspecifiedDefaultAttributes : CXmlSchemaValidatorTestCase { public TCGetUnspecifiedDefaultAttributes(ITestOutputHelper output) : base(output) diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute_String.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute_String.cs index b2943e64d09059..be1ab4a3c60351 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute_String.cs +++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute_String.cs @@ -10,7 +10,7 @@ namespace System.Xml.XmlSchemaValidatorApiTests { // ===================== ValidateAttribute ===================== - + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class TCValidateAttribute_String : CXmlSchemaValidatorTestCase { private ITestOutputHelper _output; diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateElement.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateElement.cs index 7fcafeb2ea7469..7a5757032d5a81 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateElement.cs +++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateElement.cs @@ -9,7 +9,7 @@ namespace System.Xml.XmlSchemaValidatorApiTests { // ===================== ValidateElement ===================== - + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class TCValidateElement : CXmlSchemaValidatorTestCase { private ITestOutputHelper _output; diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_EndElement.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_EndElement.cs index 94de287d334f33..6087bee16b813c 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_EndElement.cs +++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_EndElement.cs @@ -8,7 +8,7 @@ namespace System.Xml.XmlSchemaValidatorApiTests { // ===================== ValidateText ===================== - + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class TCValidateText : CXmlSchemaValidatorTestCase { private ITestOutputHelper _output; @@ -170,7 +170,7 @@ public void EmptyContent() } // ===================== ValidateWhitespace ===================== - + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class TCValidateWhitespace : CXmlSchemaValidatorTestCase { private ITestOutputHelper _output; @@ -295,7 +295,7 @@ public void PassNonWhitespaceContent() } // ===================== ValidateEndElement ===================== - + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class TCValidateEndElement : CXmlSchemaValidatorTestCase { private ITestOutputHelper _output; @@ -729,7 +729,7 @@ public void CallValidateEndElementWithTypedValueForComplexContent() } // ===================== SkipToEndElement ===================== - + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class TCSkipToEndElement : CXmlSchemaValidatorTestCase { private ITestOutputHelper _output; diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_String.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_String.cs index fe9affd1e32dc5..2cd855069c04a8 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_String.cs +++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_String.cs @@ -8,7 +8,7 @@ namespace System.Xml.XmlSchemaValidatorApiTests { // ===================== ValidateText ===================== - + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class TCValidateText_String : CXmlSchemaValidatorTestCase { private ITestOutputHelper _output; diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateWhitespace_String.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateWhitespace_String.cs index c4afb2ece7f613..57ab2cacfdb4dc 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateWhitespace_String.cs +++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateWhitespace_String.cs @@ -8,7 +8,7 @@ namespace System.Xml.XmlSchemaValidatorApiTests { // ===================== ValidateWhitespace ===================== - + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class TCValidateWhitespace_String : CXmlSchemaValidatorTestCase { private ITestOutputHelper _output; diff --git a/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs b/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs index b834792eebff79..d91abcbd9a912f 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs +++ b/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs @@ -21,6 +21,7 @@ using SerializationTypes; using Xunit; +[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static partial class XmlSerializerTests { #if ReflectionOnly|| XMLSERIALIZERGENERATORTESTS diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/Errata4.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/Errata4.cs index 6846c462c17c6a..68e0964199f160 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/Errata4.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/Errata4.cs @@ -13,6 +13,7 @@ namespace System.Xml.XslCompiledTransformApiTests { //[TestCase(Name = "Xml 4th Errata tests for XslCompiledTransform", Params = new object[] { 300 })] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class Errata4 : XsltApiTestCaseBase2 { private ITestOutputHelper _output; diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/OutputSettings.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/OutputSettings.cs index 4c0b3500f463cb..5bf09df20ede9c 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/OutputSettings.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/OutputSettings.cs @@ -10,6 +10,7 @@ namespace System.Xml.XslCompiledTransformApiTests { //[TestCase(Name = "OutputSettings", Desc = "This testcase tests the OutputSettings on XslCompiledTransform", Param = "Debug")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class COutputSettings : XsltApiTestCaseBase2 { private XslCompiledTransform _xsl = null; diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/TempFiles.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/TempFiles.cs index f9532bb061eeae..373314df7bbe75 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/TempFiles.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/TempFiles.cs @@ -9,6 +9,7 @@ namespace System.Xml.XslCompiledTransformApiTests { //[TestCase(Name = "TemporaryFiles", Desc = "This testcase tests the Temporary Files property on XslCompiledTransform")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class TempFiles : XsltApiTestCaseBase2 { private XslCompiledTransform _xsl = null; diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs index 20bdea92a9131b..3739812954e0c2 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs @@ -81,6 +81,7 @@ protected void WLoad(XslCompiledTransform instance, MethodInfo meth, byte[] byte } //[TestCase(Name = "Load(MethodInfo, ByteArray, TypeArray) tests", Desc = "This testcase tests private Load method via Reflection. This method is used by sharepoint")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CLoadMethInfoTest : ReflectionTestCaseBase { private ITestOutputHelper _output; @@ -476,6 +477,7 @@ public void Var14() //[TestCase(Name = "XslCompiledTransform.XmlResolver : Navigator, Stream", Desc = "NAVIGATOR,STREAM")] //[TestCase(Name = "XslCompiledTransform.XmlResolver : Navigator, Writer", Desc = "NAVIGATOR,WRITER")] //[TestCase(Name = "XslCompiledTransform.XmlResolver : Navigator, TextWriter", Desc = "NAVIGATOR,TEXTWRITER")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CXmlResolverTest : XsltApiTestCaseBase2, IDisposable { private ITestOutputHelper _output; @@ -666,6 +668,7 @@ public void XmlResolver7(XslInputType xslInputType, ReaderType readerType, Outpu //[TestCase(Name = "XslCompiledTransform.Load() - Integrity : Navigator, Stream", Desc = "NAVIGATOR,STREAM")] //[TestCase(Name = "XslCompiledTransform.Load() - Integrity : Navigator, Writer", Desc = "NAVIGATOR,WRITER")] //[TestCase(Name = "XslCompiledTransform.Load() - Integrity : Navigator, TextWriter", Desc = "NAVIGATOR,TEXTWRITER")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CLoadTest : XsltApiTestCaseBase2 { private ITestOutputHelper _output; @@ -1004,6 +1007,7 @@ public void LoadGeneric12(XslInputType xslInputType, ReaderType readerType) //[TestCase(Name = "XslCompiledTransform.Load(XmlResolver) - Integrity : URI, Stream", Desc = "URI,STREAM")] //[TestCase(Name = "XslCompiledTransform.Load(XmlResolver) - Integrity : URI, Writer", Desc = "URI,WRITER")] //[TestCase(Name = "XslCompiledTransform.Load(XmlResolver) - Integrity : URI, TextWriter", Desc = "URI,TEXTWRITER")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CLoadXmlResolverTest : XsltApiTestCaseBase2 { private ITestOutputHelper _output; @@ -1435,6 +1439,7 @@ public void LoadGeneric11(XslInputType xslInputType, ReaderType readerType) //[TestCase(Name = "XslCompiledTransform.Load(Url, Resolver) : URI, Stream", Desc = "URI,STREAM")] //[TestCase(Name = "XslCompiledTransform.Load(Url, Resolver) : URI, Writer", Desc = "URI,WRITER")] //[TestCase(Name = "XslCompiledTransform.Load(Url, Resolver) : URI, TextWriter", Desc = "URI,TEXTWRITER")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CLoadUrlResolverTest : XsltApiTestCaseBase2 { private ITestOutputHelper _output; @@ -1534,6 +1539,7 @@ private sealed class XmlAuditingUrlResolver : XmlUrlResolver /***********************************************************/ //[TestCase(Name = "XslCompiledTransform.Load(Url) Integrity : URI, Stream", Desc = "URI,STREAM")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CLoadStringTest : XsltApiTestCaseBase2 { private ITestOutputHelper _output; @@ -1652,6 +1658,7 @@ public void LoadUrl5(ReaderType readerType) /***********************************************************/ //[TestCase(Name = "XslCompiledTransform .Load(IXPathNavigable) : Navigator, TextWriter", Desc = "NAVIGATOR,TEXTWRITER")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CLoadXPathNavigableTest : XsltApiTestCaseBase2 { private ITestOutputHelper _output; @@ -1760,6 +1767,7 @@ public void LoadNavigator4() /***********************************************************/ //[TestCase(Name = "XslCompiledTransform.Load(Reader) : Reader, Stream", Desc = "READER,STREAM")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CLoadReaderTest : XsltApiTestCaseBase2 { private ITestOutputHelper _output; @@ -2149,6 +2157,7 @@ public override string Value //[TestCase(Name = "XslCompiledTransform.Transform() Integrity : Navigator, Stream", Desc = "NAVIGATOR,STREAM")] //[TestCase(Name = "XslCompiledTransform.Transform() Integrity : Navigator, Writer", Desc = "NAVIGATOR,WRITER")] //[TestCase(Name = "XslCompiledTransform.Transform() Integrity : Navigator, TextWriter", Desc = "NAVIGATOR,TEXTWRITER")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CTransformTestGeneric : XsltApiTestCaseBase2 { private ITestOutputHelper _output; @@ -2404,6 +2413,7 @@ public void TransformGeneric11(XslInputType xslInputType, ReaderType readerType, //[TestCase(Name = "XslCompiledTransform.Transform(XmlResolver) : Navigator, Stream", Desc = "NAVIGATOR,STREAM")] //[TestCase(Name = "XslCompiledTransform.Transform(XmlResolver) : Navigator, Writer", Desc = "NAVIGATOR,WRITER")] //[TestCase(Name = "XslCompiledTransform.Transform(XmlResolver) : Navigator, TextWriter", Desc = "NAVIGATOR,TEXTWRITER")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CTransformResolverTest : XsltApiTestCaseBase2, IDisposable { private ITestOutputHelper _output; @@ -2615,6 +2625,7 @@ public void XmlResolver7(XslInputType xslInputType, ReaderType readerType, Outpu //[TestCase(Name = "XslCompiledTransform.Transform(String, String) : Reader , String", Desc = "READER,STREAM")] //[TestCase(Name = "XslCompiledTransform.Transform(String, String) : URI, String", Desc = "URI,STREAM")] //[TestCase(Name = "XslCompiledTransform.Transform(String, String) : Navigator, String", Desc = "NAVIGATOR,STREAM")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CTransformStrStrTest : XsltApiTestCaseBase2 { private ITestOutputHelper _output; @@ -2987,6 +2998,7 @@ public void TransformStrStr13(XslInputType xslInputType, ReaderType readerType) //[TestCase(Name = "XslCompiledTransform.Transform(String, String, Resolver) : Reader , String", Desc = "READER,STREAM")] //[TestCase(Name = "XslCompiledTransform.Transform(String, String, Resolver) : URI, String", Desc = "URI,STREAM")] //[TestCase(Name = "XslCompiledTransform.Transform(String, String, Resolver) : Navigator, String", Desc = "NAVIGATOR,STREAM")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CTransformStrStrResolverTest : XsltApiTestCaseBase2, IDisposable { private ITestOutputHelper _output; @@ -3091,6 +3103,7 @@ public void TransformStrStrResolver3(object param, XslInputType xslInputType, Re //[TestCase(Name = "XslCompiledTransform.Transform(IXPathNavigable, XsltArgumentList, XmlWriter, XmlResolver)", Desc = "Constructor Tests", Param = "IXPathNavigable")] //[TestCase(Name = "XslCompiledTransform.Transform(XmlReader, XsltArgumentList, XmlWriter, XmlResolver)", Desc = "Constructor Tests", Param = "XmlReader")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CTransformConstructorWithFourParametersTest : XsltApiTestCaseBase2 { private ITestOutputHelper _output; @@ -3295,6 +3308,7 @@ public void InValidCases(object param0, object param1, object param2) // This testcase is for bugs 109429, 111075 and 109644 fixed in Everett SP1 //[TestCase(Name = "NDP1_1SP1 Bugs (URI,STREAM)", Desc = "URI,STREAM")] //[TestCase(Name = "NDP1_1SP1 Bugs (NAVIGATOR,TEXTWRITER)", Desc = "NAVIGATOR,TEXTWRITER")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CNDP1_1SP1Test : XsltApiTestCaseBase2 { private ITestOutputHelper _output; @@ -3386,6 +3400,7 @@ public void var4(XslInputType xslInputType, ReaderType readerType, OutputType ou } //[TestCase(Name = "XslCompiledTransform Regression Tests for API", Desc = "XslCompiledTransform Regression Tests")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CTransformRegressionTest : XsltApiTestCaseBase2, IDisposable { private ITestOutputHelper _output; diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompilerTests.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompilerTests.cs index b788db89bfd7b7..77230c4d625b1c 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompilerTests.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompilerTests.cs @@ -7,6 +7,7 @@ namespace System.Xml.XslCompiledTransformApiTests { + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class XslCompilerTests { [Fact] diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslTransformMultith.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslTransformMultith.cs index 0532519a87ea70..5699868c280638 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslTransformMultith.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslTransformMultith.cs @@ -35,6 +35,7 @@ public SameInstanceXslTransformTestCase(ITestOutputHelper output) : base(output) } //[TestCase(Name = "Same instance testing: Transform() - READER")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class SameInstanceXslTransformReader : SameInstanceXslTransformTestCase { private XPathDocument _xd; // Loads XML file @@ -318,6 +319,7 @@ public void proc12() } //[TestCase(Name = "Same instance testing: Transform() - TEXTWRITER")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class SameInstanceXslTransformWriter : SameInstanceXslTransformTestCase { private XPathDocument _xd; // Loads XML file diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs index 6184bfc0e31908..0e7dd962fce0be 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs @@ -37,6 +37,7 @@ public enum NavType // Base class for test cases // //////////////////////////////////////////////////////////////// + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class XsltApiTestCaseBase2 { // Generic data for all derived test cases diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentList.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentList.cs index 5e9d7a877cc66e..6bf0e435b2e60d 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentList.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentList.cs @@ -17,6 +17,7 @@ namespace System.Xml.XslCompiledTransformApiTests /***********************************************************/ //[TestCase(Name = "XsltArgumentList - GetParam", Desc = "Get Param Test Cases")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CArgIntegrity : XsltApiTestCaseBase2 { private ITestOutputHelper _output; diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentListMultith.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentListMultith.cs index 39a6646ecafc67..bfa3788d0c9072 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentListMultith.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentListMultith.cs @@ -55,6 +55,7 @@ public CSameInstanceXsltArgTestCase2(ITestOutputHelper output) : base(output) } //[TestCase(Name = "Same instance testing: XsltArgList - GetParam", Desc = "GetParam test cases")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CSameInstanceXsltArgumentListGetParam : CSameInstanceXsltArgTestCase2 { private ITestOutputHelper _output; @@ -140,6 +141,7 @@ public void proc2() } //[TestCase(Name = "Same instance testing: XsltArgList - GetExtensionObject", Desc = "GetExtensionObject test cases")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CSameInstanceXsltArgumentListGetExtnObject : CSameInstanceXsltArgTestCase2 { private ITestOutputHelper _output; @@ -224,6 +226,7 @@ public void proc2() } //[TestCase(Name = "Same instance testing: XsltArgList - Transform", Desc = "Multiple transforms")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CSameInstanceXsltArgumentListTransform : CSameInstanceXsltArgTestCase2 { private ITestOutputHelper _output; diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs index 0ef104833f8cd3..e780f556cfd410 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs @@ -13,6 +13,7 @@ namespace System.Xml.XslCompiledTransformApiTests { //[TestCase(Name = "XsltSettings-Retail", Desc = "This testcase tests the different settings on XsltSettings and the corresponding behavior in retail mode", Param = "Retail")] //[TestCase(Name = "XsltSettings-Debug", Desc = "This testcase tests the different settings on XsltSettings and the corresponding behavior in debug mode", Param = "Debug")] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public class CXsltSettings : XsltApiTestCaseBase2 { private ITestOutputHelper _output; diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 6ea3f13a2200b7..9db3aefc66d3ef 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -245,9 +245,6 @@ - - - @@ -258,8 +255,6 @@ - - @@ -475,7 +470,6 @@ - @@ -494,9 +488,6 @@ - - -