Skip to content

Commit 0cff397

Browse files
committed
0.5.1: InlineMethod.Inline attribute removed from the assembly
1 parent 5c1d545 commit 0cff397

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

src/ZstdSharp.Test/ZstdTest.cs

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,21 @@ public void JitMethods()
9797
BindingFlags.Public | BindingFlags.Instance |
9898
BindingFlags.Static))
9999
{
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+
}
110104

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");
112115
}
113116
}
114117
}

src/ZstdSharp/ZstdSharp.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<PackageProjectUrl>https://github.com/oleg-st/ZstdSharp</PackageProjectUrl>
1515
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
1616
<PackageTags>zstd zstandard port compression</PackageTags>
17-
<Version>0.5</Version>
17+
<Version>0.5.1</Version>
1818
</PropertyGroup>
1919

2020
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
@@ -42,7 +42,7 @@
4242
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4343
</PackageReference>
4444
<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" />
4646
</ItemGroup>
4747

4848
</Project>

0 commit comments

Comments
 (0)