2b091f6ce8b6309a8764d7cce97738fc00138e10
[platform/upstream/dotnet/runtime.git] /
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 System.Reflection;
6 using Xunit;
7
8 namespace System.Runtime.CompilerServices.Tests
9 {
10     public static class MethodImplAttributeTests
11     {
12         [Fact]
13         [MethodImpl(MethodImplOptions.AggressiveOptimization)]
14         public static void AggressiveOptimizationTest()
15         {
16             MethodImplAttributes implAttributes = MethodBase.GetCurrentMethod().MethodImplementationFlags;
17             Assert.Equal(MethodImplAttributes.AggressiveOptimization, implAttributes);
18             Assert.Equal(MethodImplOptions.AggressiveOptimization, (MethodImplOptions)implAttributes);
19         }
20     }
21 }