add DlaHelper for tests and correct minor typos

This commit is contained in:
BobLd
2020-05-23 20:33:00 +01:00
committed by Eliot Jones
parent 05d96cd9c4
commit 75e9046c16
3 changed files with 21 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
namespace UglyToad.PdfPig.Tests.Dla
{
using System;
using System.IO;
internal static class DlaHelper
{
public static string GetDocumentPath(string name, bool isPdf = true)
{
var documentFolder = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..", "..", "..", "Dla", "Documents"));
if (!name.EndsWith(".pdf") && isPdf)
{
name += ".pdf";
}
return Path.Combine(documentFolder, name);
}
}
}

View File

@@ -6727,7 +6727,6 @@
// root -> right side -> right side
Assert.Null(kdTree.Root.RightChild.RightChild);
}
[Theory]

View File

@@ -183,7 +183,7 @@
var dataFloat = data.Select(x => (float)x);
Assert.Equal((float)expected, dataFloat.Mode(), PreciseDoubleComparer);
}
[Theory]
[MemberData(nameof(ModeDataNaN))]
public void ModeNaN(double[] data)