add a different way of running open cover since it doesn't work on app veyor

This commit is contained in:
Eliot Jones
2017-12-05 22:44:37 +00:00
parent 70b01deb38
commit 6b11d570c9
5 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
@echo off
cd src\CodeCoverage
nuget restore packages.config -PackagesDirectory .
cd ..
dotnet restore UglyToad.Pdf.sln
dotnet build UglyToad.Pdf.sln --no-incremental -c debug /p:codecov=true
rem The -threshold options prevents this taking ages...
CodeCoverage\OpenCover.4.6.519\tools\OpenCover.Console.exe -target:"dotnet.exe" -targetargs:"test UglyToad.Pdf.Tests\UglyToad.Pdf.Tests.csproj --no-build -c debug" -register:user -output:.\test-results.xml -hideskipped:All -returntargetcode -oldStyle -filter:"+[UglyToad.Pdf*]* -[UglyToad.Pdf.Tests*]*"
if %errorlevel% neq 0 exit /b %errorlevel%

BIN
src/CodeCoverage/nuget.exe Normal file

Binary file not shown.

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenCover" version="4.6.519" />
</packages>

View File

@@ -0,0 +1,29 @@
namespace UglyToad.Pdf.Fonts.TrueType.Tables
{
/// <summary>
/// Stores the offset to the glyph locations relative to the start of the glyph data table.
/// Index zero points to the "missing character" which is used for characters not provided by the font.
/// The number of glpyhs in this table should match the maximum profile table.
/// </summary>
internal class IndexToLocationTable : ITable
{
public string Tag => TrueTypeHeaderTable.Loca;
public TrueTypeHeaderTable DirectoryTable { get; }
public long[] GlyphOffsets { get; }
public IndexToLocationTable(TrueTypeHeaderTable directoryTable, long[] glyphOffsets)
{
DirectoryTable = directoryTable;
GlyphOffsets = glyphOffsets;
}
public static IndexToLocationTable Load(TrueTypeDataBytes data, TrueTypeHeaderTable table)
{
data.Seek(table.Offset);
return null;
}
}
}