mirror of https://github.com/ppy/osu
add test for overall difficulty filter query
This commit is contained in:
parent
8e1bcc4d6b
commit
4df4afe533
|
@ -90,6 +90,20 @@ public void TestApplyDrainRateQueriesByHpKeyword()
|
|||
Assert.Less(filterCriteria.DrainRate.Min, 6.1f);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestApplyOverallDifficultyQueries()
|
||||
{
|
||||
const string query = "od>4 easy od<8";
|
||||
var filterCriteria = new FilterCriteria();
|
||||
FilterQueryParser.ApplyQueries(filterCriteria, query);
|
||||
Assert.AreEqual("easy", filterCriteria.SearchText.Trim());
|
||||
Assert.AreEqual(1, filterCriteria.SearchTerms.Length);
|
||||
Assert.Greater(filterCriteria.OverallDifficulty.Min, 4.0);
|
||||
Assert.Less(filterCriteria.OverallDifficulty.Min, 4.1);
|
||||
Assert.Greater(filterCriteria.OverallDifficulty.Max, 7.9);
|
||||
Assert.Less(filterCriteria.OverallDifficulty.Max, 8.0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestApplyBPMQueries()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue