File tree 2 files changed +16
-13
lines changed
2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -97,18 +97,21 @@ public void JitMethods()
97
97
BindingFlags . Public | BindingFlags . Instance |
98
98
BindingFlags . Static ) )
99
99
{
100
- bool isValid ;
101
- try
102
- {
103
- System . Runtime . CompilerServices . RuntimeHelpers . PrepareMethod ( method . MethodHandle ) ;
104
- isValid = true ;
105
- }
106
- catch ( Exception )
107
- {
108
- isValid = false ;
109
- }
100
+ var exception = Record . Exception ( ( ) => System . Runtime . CompilerServices . RuntimeHelpers . PrepareMethod ( method . MethodHandle ) ) ;
101
+ Assert . True ( exception == null , $ "Method { method . Name } jit failed") ;
102
+ }
103
+ }
110
104
111
- Assert . True ( isValid , $ "Method { method . Name } ") ;
105
+ [ Fact ]
106
+ public void CheckAttributes ( )
107
+ {
108
+ foreach ( var method in typeof ( Methods ) . Module . GetTypes ( ) . SelectMany ( t => t . GetMethods ( BindingFlags . DeclaredOnly |
109
+ BindingFlags . NonPublic |
110
+ BindingFlags . Public | BindingFlags . Instance |
111
+ BindingFlags . Static ) ) )
112
+ {
113
+ var exception = Record . Exception ( ( ) => method . GetCustomAttributes ( true ) ) ;
114
+ Assert . True ( exception == null , $ "Method { method . Name } has invalid attributes") ;
112
115
}
113
116
}
114
117
}
Original file line number Diff line number Diff line change 14
14
<PackageProjectUrl >https://github.com/oleg-st/ZstdSharp</PackageProjectUrl >
15
15
<GeneratePackageOnBuild >false</GeneratePackageOnBuild >
16
16
<PackageTags >zstd zstandard port compression</PackageTags >
17
- <Version >0.5</Version >
17
+ <Version >0.5.1 </Version >
18
18
</PropertyGroup >
19
19
20
20
<PropertyGroup Condition =" '$(Configuration)|$(Platform)'=='Release|AnyCPU'" >
42
42
<IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
43
43
</PackageReference >
44
44
<PackageReference Include =" InlineIL.Fody" Version =" 1.7.0" PrivateAssets =" all" />
45
- <PackageReference Include =" InlineMethod.Fody" Version =" 0.6.0 " PrivateAssets =" all" />
45
+ <PackageReference Include =" InlineMethod.Fody" Version =" 0.6.1 " PrivateAssets =" all" />
46
46
</ItemGroup >
47
47
48
48
</Project >
You can’t perform that action at this time.
0 commit comments