mirror of https://github.com/ppy/osu
Add 'yes'/'no' acronyms to the `played=` filter
This commit is contained in:
parent
925710d9b3
commit
6913d75792
|
@ -633,11 +633,15 @@ public void TestOutOfRangeDateQuery()
|
|||
new object[] { "0", DateTimeOffset.Now, false },
|
||||
new object[] { "false", DateTimeOffset.MinValue, true },
|
||||
new object[] { "false", DateTimeOffset.Now, false },
|
||||
new object[] { "no", DateTimeOffset.MinValue, true },
|
||||
new object[] { "no", DateTimeOffset.Now, false },
|
||||
|
||||
new object[] { "1", DateTimeOffset.MinValue, false },
|
||||
new object[] { "1", DateTimeOffset.Now, true },
|
||||
new object[] { "true", DateTimeOffset.MinValue, false },
|
||||
new object[] { "true", DateTimeOffset.Now, true },
|
||||
new object[] { "yes", DateTimeOffset.MinValue, false },
|
||||
new object[] { "yes", DateTimeOffset.Now, true },
|
||||
};
|
||||
|
||||
[Test]
|
||||
|
|
|
@ -159,10 +159,12 @@ private static bool tryParseBool(string value, out bool result)
|
|||
switch (value)
|
||||
{
|
||||
case "1":
|
||||
case "yes":
|
||||
result = true;
|
||||
return true;
|
||||
|
||||
case "0":
|
||||
case "no":
|
||||
result = false;
|
||||
return true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue