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.
5 using System.Reflection;
8 namespace System.Runtime.CompilerServices.Tests
10 public static class MethodImplAttributeTests
13 [MethodImpl(MethodImplOptions.AggressiveOptimization)]
14 public static void AggressiveOptimizationTest()
16 MethodImplAttributes implAttributes = MethodBase.GetCurrentMethod().MethodImplementationFlags;
17 Assert.Equal(MethodImplAttributes.AggressiveOptimization, implAttributes);
18 Assert.Equal(MethodImplOptions.AggressiveOptimization, (MethodImplOptions)implAttributes);