| 1 |
// Licensed to the .NET Foundation under one or more agreements. |
| 2 |
// The .NET Foundation licenses this file to you under the MIT license. |
| 3 |
// See the LICENSE file in the project root for more information. |
| 4 |
|
| 5 |
using Xunit; |
| 6 |
|
| 7 |
namespace System.Reflection.Emit.Tests |
| 8 |
{ |
| 9 |
public class PropertyBuilderTest3 |
| 10 |
{ |
| 11 |
[Theory] |
| 12 |
[InlineData(PropertyAttributes.HasDefault)] |
| 13 |
[InlineData(PropertyAttributes.None)] |
| 14 |
[InlineData(PropertyAttributes.RTSpecialName)] |
| 15 |
[InlineData(PropertyAttributes.SpecialName)] |
| 16 |
[InlineData(PropertyAttributes.SpecialName | PropertyAttributes.RTSpecialName | PropertyAttributes.None | PropertyAttributes.HasDefault)] |
| 17 |
public void ExecutePosTest(PropertyAttributes attributes) |
| 18 |
{ |
| 19 |
TypeBuilder type = Helpers.DynamicType(TypeAttributes.Class | TypeAttributes.Public); |
| 20 |
PropertyBuilder property = type.DefineProperty("TestProperty", attributes, typeof(int), null); |
| 21 |
Assert.Equal(attributes, property.Attributes); |
| 22 |
} |
| 23 |
} |
| 24 |
} |