diff options
author | Jeremy Koritzinsky <jkoritzinsky@gmail.com> | 2021-03-16 21:17:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-16 21:17:23 +0300 |
commit | f3ec06a1a4b711748ec371385380e47882559912 (patch) | |
tree | f0dc0ed7bb6bd27a03edb8f7bf9cf4a21d5e7d03 /Test/Mono.Cecil.Tests | |
parent | 553506adb74b1edbc12a8fb8cd681dcc93f180cf (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.cs | 8 |
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)); }); } |