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

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Koritzinsky <jkoritzinsky@gmail.com>2021-03-16 21:17:23 +0300
committerGitHub <noreply@github.com>2021-03-16 21:17:23 +0300
commitf3ec06a1a4b711748ec371385380e47882559912 (patch)
treef0dc0ed7bb6bd27a03edb8f7bf9cf4a21d5e7d03 /Test/Mono.Cecil.Tests
parent553506adb74b1edbc12a8fb8cd681dcc93f180cf (diff)
Implement automatic handling of the HasFieldRVA field attribute. (#733)
* Implement automatic handling of the HasFieldRVA field attribute. Fixes #728 * Add FieldDefinition.HasFieldRVA Co-authored-by: Jb Evain <jb@evain.net>
Diffstat (limited to 'Test/Mono.Cecil.Tests')
-rw-r--r--Test/Mono.Cecil.Tests/FieldTests.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Test/Mono.Cecil.Tests/FieldTests.cs b/Test/Mono.Cecil.Tests/FieldTests.cs
index 05165d6..4f575de 100644
--- a/Test/Mono.Cecil.Tests/FieldTests.cs
+++ b/Test/Mono.Cecil.Tests/FieldTests.cs
@@ -122,6 +122,14 @@ namespace Mono.Cecil.Tests {
Assert.AreEqual (2, buffer.ReadUInt32 ());
Assert.AreEqual (3, buffer.ReadUInt32 ());
Assert.AreEqual (4, buffer.ReadUInt32 ());
+
+ var intialValue = field.InitialValue;
+ field.InitialValue = null;
+ Assert.False (field.Attributes.HasFlag (FieldAttributes.HasFieldRVA));
+
+ field.InitialValue = intialValue;
+
+ Assert.True (field.Attributes.HasFlag (FieldAttributes.HasFieldRVA));
});
}