debug logging

This commit is contained in:
Jeremy Wu 2020-01-02 08:04:16 +11:00
parent 52615c6f52
commit f6d0738c79

View File

@ -191,6 +191,13 @@ namespace Wox.Test
// Act // Act
var matchResult = StringMatcher.FuzzySearch(queryString, compareString); var matchResult = StringMatcher.FuzzySearch(queryString, compareString);
Debug.WriteLine("");
Debug.WriteLine("###############################################");
Debug.WriteLine($"QueryString: {queryString} CompareString: {compareString}");
Debug.WriteLine($"RAW SCORE: {matchResult.RawScore.ToString()}, PrecisionLevelSetAt: {expectedPrecisionString} ({expectedPrecisionScore})");
Debug.WriteLine("###############################################");
Debug.WriteLine("");
// Assert // Assert
Assert.AreEqual(expectedPrecisionResult, matchResult.IsSearchPrecisionScoreMet(), Assert.AreEqual(expectedPrecisionResult, matchResult.IsSearchPrecisionScoreMet(),
$"Query:{queryString}{Environment.NewLine} " + $"Query:{queryString}{Environment.NewLine} " +
@ -225,6 +232,13 @@ namespace Wox.Test
// Act // Act
var matchResult = StringMatcher.FuzzySearch(queryString, compareString); var matchResult = StringMatcher.FuzzySearch(queryString, compareString);
Debug.WriteLine("");
Debug.WriteLine("###############################################");
Debug.WriteLine($"QueryString: {queryString} CompareString: {compareString}");
Debug.WriteLine($"RAW SCORE: {matchResult.RawScore.ToString()}, PrecisionLevelSetAt: {expectedPrecisionString} ({expectedPrecisionScore})");
Debug.WriteLine("###############################################");
Debug.WriteLine("");
// Assert // Assert
Assert.AreEqual(expectedPrecisionResult, matchResult.IsSearchPrecisionScoreMet(), Assert.AreEqual(expectedPrecisionResult, matchResult.IsSearchPrecisionScoreMet(),
$"Query:{queryString}{Environment.NewLine} " + $"Query:{queryString}{Environment.NewLine} " +