diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-11-15 21:55:34 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-11-15 21:55:34 +0100 |
commit | dec5421ca2cb5ac9e77ce96507d0285a6b0fcfee (patch) | |
tree | d8a93441f1ed6f4c21f5e483fa42d5fe7f97b1eb /rbutil/rbutilqt/test/test-serverinfo.cpp | |
parent | af766ae10eb10685bfd81124738b167294b7a8f2 (diff) | |
download | rockbox-dec5421ca2cb5ac9e77ce96507d0285a6b0fcfee.tar.gz rockbox-dec5421ca2cb5ac9e77ce96507d0285a6b0fcfee.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.cpp | 8 |
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 { | |||
65 | const struct testvector testdata[] = | 65 | const struct testvector testdata[] = |
66 | { | 66 | { |
67 | { "archosfmrecorder", ServerInfo::CurReleaseVersion, "3.11.2" }, | 67 | { "archosfmrecorder", ServerInfo::CurReleaseVersion, "3.11.2" }, |
68 | { "archosfmrecorder", ServerInfo::CurStatus, "Stable" }, | 68 | { "archosfmrecorder", ServerInfo::CurStatus, "3" }, |
69 | { "iaudiom3", ServerInfo::CurReleaseVersion, "3.11.2" }, | 69 | { "iaudiom3", ServerInfo::CurReleaseVersion, "3.11.2" }, |
70 | { "iaudiom3", ServerInfo::CurReleaseUrl, "http://dl.rockbox.org/release/3.11.2/rockbox-iaudiom5-3.11.2.zip" }, | 70 | { "iaudiom3", ServerInfo::CurReleaseUrl, "http://dl.rockbox.org/release/3.11.2/rockbox-iaudiom5-3.11.2.zip" }, |
71 | { "sansae200", ServerInfo::CurReleaseVersion, "3.11.2" }, | 71 | { "sansae200", ServerInfo::CurReleaseVersion, "3.11.2" }, |
72 | { "sansae200", ServerInfo::CurReleaseUrl, "https://unittest/release/3.11.2/rockbox-sansae200-3.11.2.zip" }, | 72 | { "sansae200", ServerInfo::CurReleaseUrl, "https://unittest/release/3.11.2/rockbox-sansae200-3.11.2.zip" }, |
73 | { "iriverh100", ServerInfo::CurReleaseVersion, "3.11.2" }, | 73 | { "iriverh100", ServerInfo::CurReleaseVersion, "3.11.2" }, |
74 | { "iriverh100", ServerInfo::CurReleaseUrl, "http://dl.rockbox.org/release/3.11.2/rockbox-iriverh100-3.11.2.zip" }, | 74 | { "iriverh100", ServerInfo::CurReleaseUrl, "http://dl.rockbox.org/release/3.11.2/rockbox-iriverh100-3.11.2.zip" }, |
75 | { "iriverh100", ServerInfo::CurStatus, "Unstable" }, | 75 | { "iriverh100", ServerInfo::CurStatus, "2" }, |
76 | { "iriverh100", ServerInfo::CurDevelUrl, "https://unittest/dev/rockbox-iriverh100.zip" }, | 76 | { "iriverh100", ServerInfo::CurDevelUrl, "https://unittest/dev/rockbox-iriverh100.zip" }, |
77 | { "iriverh300", ServerInfo::CurReleaseVersion, "" }, | 77 | { "iriverh300", ServerInfo::CurReleaseVersion, "" }, |
78 | { "iriverh300", ServerInfo::CurReleaseUrl, "" }, | 78 | { "iriverh300", ServerInfo::CurReleaseUrl, "" }, |
79 | { "iriverh300", ServerInfo::CurStatus, "Unusable" }, | 79 | { "iriverh300", ServerInfo::CurStatus, "1" }, |
80 | { "iriverh10", ServerInfo::CurReleaseVersion, "" }, | 80 | { "iriverh10", ServerInfo::CurReleaseVersion, "" }, |
81 | { "iriverh10", ServerInfo::CurReleaseUrl, "" }, | 81 | { "iriverh10", ServerInfo::CurReleaseUrl, "" }, |
82 | { "iriverh10", ServerInfo::CurStatus, "Stable (Retired)" }, | 82 | { "iriverh10", ServerInfo::CurStatus, "0" }, |
83 | { "gigabeatfx", ServerInfo::RelCandidateVersion, "f9dce96" }, | 83 | { "gigabeatfx", ServerInfo::RelCandidateVersion, "f9dce96" }, |
84 | { "gigabeatfx", ServerInfo::RelCandidateUrl, "http://dl.rockbox.org/rc/f9dce96/rockbox-gigabeatfx.zip" }, | 84 | { "gigabeatfx", ServerInfo::RelCandidateUrl, "http://dl.rockbox.org/rc/f9dce96/rockbox-gigabeatfx.zip" }, |
85 | { "archosfmrecorder", ServerInfo::RelCandidateVersion, "f9dce96" }, | 85 | { "archosfmrecorder", ServerInfo::RelCandidateVersion, "f9dce96" }, |