mirror of
https://github.com/ppy/osu
synced 2024-12-27 01:12:45 +00:00
Rename MatchMode.{None -> Substring}
This commit is contained in:
parent
06654dc618
commit
e3d97b37f1
@ -39,13 +39,13 @@ namespace osu.Game.Tests.NonVisual.Filtering
|
||||
Assert.That(filterCriteria.SearchTerms[1].MatchMode, Is.EqualTo(FilterCriteria.MatchMode.IsolatedPhrase));
|
||||
|
||||
Assert.That(filterCriteria.SearchTerms[2].SearchTerm, Is.EqualTo("looking"));
|
||||
Assert.That(filterCriteria.SearchTerms[2].MatchMode, Is.EqualTo(FilterCriteria.MatchMode.None));
|
||||
Assert.That(filterCriteria.SearchTerms[2].MatchMode, Is.EqualTo(FilterCriteria.MatchMode.Substring));
|
||||
|
||||
Assert.That(filterCriteria.SearchTerms[3].SearchTerm, Is.EqualTo("for"));
|
||||
Assert.That(filterCriteria.SearchTerms[3].MatchMode, Is.EqualTo(FilterCriteria.MatchMode.None));
|
||||
Assert.That(filterCriteria.SearchTerms[3].MatchMode, Is.EqualTo(FilterCriteria.MatchMode.Substring));
|
||||
|
||||
Assert.That(filterCriteria.SearchTerms[4].SearchTerm, Is.EqualTo("like"));
|
||||
Assert.That(filterCriteria.SearchTerms[4].MatchMode, Is.EqualTo(FilterCriteria.MatchMode.None));
|
||||
Assert.That(filterCriteria.SearchTerms[4].MatchMode, Is.EqualTo(FilterCriteria.MatchMode.Substring));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -272,7 +272,7 @@ namespace osu.Game.Tests.NonVisual.Filtering
|
||||
Assert.AreEqual("find me songs by please", filterCriteria.SearchText.Trim());
|
||||
Assert.AreEqual(5, filterCriteria.SearchTerms.Length);
|
||||
Assert.AreEqual("singer", filterCriteria.Artist.SearchTerm);
|
||||
Assert.That(filterCriteria.Artist.MatchMode, Is.EqualTo(FilterCriteria.MatchMode.None));
|
||||
Assert.That(filterCriteria.Artist.MatchMode, Is.EqualTo(FilterCriteria.MatchMode.Substring));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -154,7 +154,7 @@ namespace osu.Game.Screens.Select
|
||||
switch (MatchMode)
|
||||
{
|
||||
default:
|
||||
case MatchMode.None:
|
||||
case MatchMode.Substring:
|
||||
return value.Contains(SearchTerm, StringComparison.InvariantCultureIgnoreCase);
|
||||
|
||||
case MatchMode.IsolatedPhrase:
|
||||
@ -185,7 +185,7 @@ namespace osu.Game.Screens.Select
|
||||
MatchMode = MatchMode.IsolatedPhrase;
|
||||
}
|
||||
else
|
||||
MatchMode = MatchMode.None;
|
||||
MatchMode = MatchMode.Substring;
|
||||
}
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ namespace osu.Game.Screens.Select
|
||||
/// <summary>
|
||||
/// Match using a simple "contains" substring match.
|
||||
/// </summary>
|
||||
None,
|
||||
Substring,
|
||||
|
||||
/// <summary>
|
||||
/// Match for the search phrase being isolated by spaces, or at the start or end of the text.
|
||||
|
Loading…
Reference in New Issue
Block a user