Imported Upstream version 5.10.0.116

Former-commit-id: 8f2f8afd053f1b5b4b35b0827e7a9424613038ae
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-02-15 19:17:22 +00:00
parent 05e67c9e5f
commit c10090095e
48 changed files with 115 additions and 73 deletions

View File

@@ -6,7 +6,7 @@
<RootNamespace>Mono.Cecil.Tests</RootNamespace>
<AssemblyName>Mono.Cecil.Tests</AssemblyName>
</PropertyGroup>
<ItemGroup Condition="'$(NetStandard)' == 'true'">
<ItemGroup Condition="$(NetStandard)">
<PackageReference Include="System.Reflection.TypeExtensions">
<Version>4.3.0</Version>
</PackageReference>
@@ -50,5 +50,5 @@
<ItemGroup>
<None Include="Resources\**\*" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition="'$(NetStandard)' != 'true'" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition="!$(NetStandard)" />
</Project>

View File

@@ -89,5 +89,19 @@ namespace Mono.Cecil.Tests {
Assert.AreEqual (module.AssemblyReferences [0], module.TypeSystem.CoreLibrary);
}, verify: !Platform.OnMono);
}
[Test]
public void MismatchedLibraryAndSymbols_DoNotThrow ()
{
// SQLite-net.dll (from nuget) shiped with mismatched symbol files, but throwIfNoSymbol did not prevent it from throwing
var readerParms = new ReaderParameters {
ReadSymbols = true,
SymbolReaderProvider = new Cil.DefaultSymbolReaderProvider (throwIfNoSymbol: false)
};
using (var module = GetResourceModule ("SQLite-net.dll", readerParms)) {
Assert.Null (module.SymbolReader);
}
}
}
}

Binary file not shown.