Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/LinkAttributes/LinkerAttributeRemoval.cs')
-rw-r--r--test/Mono.Linker.Tests.Cases/LinkAttributes/LinkerAttributeRemoval.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/Mono.Linker.Tests.Cases/LinkAttributes/LinkerAttributeRemoval.cs b/test/Mono.Linker.Tests.Cases/LinkAttributes/LinkerAttributeRemoval.cs
index 382e847bc..2475dd4f4 100644
--- a/test/Mono.Linker.Tests.Cases/LinkAttributes/LinkerAttributeRemoval.cs
+++ b/test/Mono.Linker.Tests.Cases/LinkAttributes/LinkerAttributeRemoval.cs
@@ -54,13 +54,14 @@ namespace Mono.Linker.Tests.Cases.LinkAttributes
// [RemovedAttributeInAssembly ("LinkerAttributeRemovalEmbeddedAndLazyLoad.dll", typeof (EmbeddedAttributeToBeRemoved), typeof (TypeWithEmbeddedAttributeToBeRemoved))]
[KeptAttributeInAssembly ("LinkerAttributeRemovalEmbeddedAndLazyLoad", typeof (EmbeddedAttributeToBeRemoved), typeof (TypeWithEmbeddedAttributeToBeRemoved))]
- [LogContains ("IL2045: Mono.Linker.Tests.Cases.LinkAttributes.LinkerAttributeRemoval.TestType(): Attribute 'System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute'")]
[LogContains ("IL2045: Mono.Linker.Tests.Cases.LinkAttributes.Dependencies.TypeOnCopyAssemblyWithAttributeUsage.TypeOnCopyAssemblyWithAttributeUsage(): Attribute 'Mono.Linker.Tests.Cases.LinkAttributes.Dependencies.TestAttributeReferencedAsTypeFromCopyAssemblyAttribute'")]
-
[LogDoesNotContain ("IL2045")] // No other 2045 messages should be logged
+ [ExpectedWarning ("IL2049", "'InvalidInternal'", FileName = "LinkerAttributeRemoval.xml")]
[ExpectedWarning ("IL2048", "RemoveAttributeInstances", FileName = "LinkerAttributeRemoval.xml")]
+ [ExpectedNoWarnings]
+
[KeptMember (".ctor()")]
class LinkerAttributeRemoval
{
@@ -68,7 +69,7 @@ namespace Mono.Linker.Tests.Cases.LinkAttributes
{
var instance = new LinkerAttributeRemoval ();
instance._fieldWithCustomAttribute = null;
- string value = instance.methodWithCustomAttribute ("parameter");
+ string value = instance.methodWithCustomAttribute (null);
TestType ();
_ = new TypeOnCopyAssemblyWithAttributeUsage ();
@@ -94,9 +95,10 @@ namespace Mono.Linker.Tests.Cases.LinkAttributes
[return: DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors)]
private string methodWithCustomAttribute ([DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors)] string parameterWithCustomAttribute)
{
- return "this is a return value";
+ return null;
}
+ [ExpectedWarning ("IL2045", "Attribute 'System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute'")]
[Kept]
public static void TestType ()
{