From dec5421ca2cb5ac9e77ce96507d0285a6b0fcfee Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sun, 15 Nov 2020 21:55:34 +0100 Subject: 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 --- rbutil/rbutilqt/test/test-serverinfo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rbutil/rbutilqt/test/test-serverinfo.cpp') 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" }, -- cgit v1.2.3