summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/test/test-serverinfo.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-15 21:55:34 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-15 21:55:34 +0100
commitdec5421ca2cb5ac9e77ce96507d0285a6b0fcfee (patch)
treed8a93441f1ed6f4c21f5e483fa42d5fe7f97b1eb /rbutil/rbutilqt/test/test-serverinfo.cpp
parentaf766ae10eb10685bfd81124738b167294b7a8f2 (diff)
downloadrockbox-dec5421ca2.tar.gz
rockbox-dec5421ca2.tar.bz2
rockbox-dec5421ca2.zip
rbutil: Rework server info data handling.
Return status as int, not as string, and provide a separate function for converting to string. This allows to filter based on the actual status, not a (localized) status string, which is more robust. Fix a regression that made players with missing status value show up as retired. Change-Id: I15f83ae0df484199b1b3b5b95069db8b4d425987
Diffstat (limited to 'rbutil/rbutilqt/test/test-serverinfo.cpp')
-rw-r--r--rbutil/rbutilqt/test/test-serverinfo.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/test/test-serverinfo.cpp b/rbutil/rbutilqt/test/test-serverinfo.cpp
index 9aa8306e50..bda939676c 100644
--- a/rbutil/rbutilqt/test/test-serverinfo.cpp
+++ b/rbutil/rbutilqt/test/test-serverinfo.cpp
@@ -65,21 +65,21 @@ struct testvector {
const struct testvector testdata[] =
{
{ "archosfmrecorder", ServerInfo::CurReleaseVersion, "3.11.2" },
- { "archosfmrecorder", ServerInfo::CurStatus, "Stable" },
+ { "archosfmrecorder", ServerInfo::CurStatus, "3" },
{ "iaudiom3", ServerInfo::CurReleaseVersion, "3.11.2" },
{ "iaudiom3", ServerInfo::CurReleaseUrl, "http://dl.rockbox.org/release/3.11.2/rockbox-iaudiom5-3.11.2.zip" },
{ "sansae200", ServerInfo::CurReleaseVersion, "3.11.2" },
{ "sansae200", ServerInfo::CurReleaseUrl, "https://unittest/release/3.11.2/rockbox-sansae200-3.11.2.zip" },
{ "iriverh100", ServerInfo::CurReleaseVersion, "3.11.2" },
{ "iriverh100", ServerInfo::CurReleaseUrl, "http://dl.rockbox.org/release/3.11.2/rockbox-iriverh100-3.11.2.zip" },
- { "iriverh100", ServerInfo::CurStatus, "Unstable" },
+ { "iriverh100", ServerInfo::CurStatus, "2" },
{ "iriverh100", ServerInfo::CurDevelUrl, "https://unittest/dev/rockbox-iriverh100.zip" },
{ "iriverh300", ServerInfo::CurReleaseVersion, "" },
{ "iriverh300", ServerInfo::CurReleaseUrl, "" },
- { "iriverh300", ServerInfo::CurStatus, "Unusable" },
+ { "iriverh300", ServerInfo::CurStatus, "1" },
{ "iriverh10", ServerInfo::CurReleaseVersion, "" },
{ "iriverh10", ServerInfo::CurReleaseUrl, "" },
- { "iriverh10", ServerInfo::CurStatus, "Stable (Retired)" },
+ { "iriverh10", ServerInfo::CurStatus, "0" },
{ "gigabeatfx", ServerInfo::RelCandidateVersion, "f9dce96" },
{ "gigabeatfx", ServerInfo::RelCandidateUrl, "http://dl.rockbox.org/rc/f9dce96/rockbox-gigabeatfx.zip" },
{ "archosfmrecorder", ServerInfo::RelCandidateVersion, "f9dce96" },