summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/test/stubs/stubs-compareversion.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-29 21:04:08 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-12-03 22:25:12 +0100
commit3300815c44200c0dfb25de7cafe16a71abde57f0 (patch)
treea7e86b249df3648673d273d0cc839ac0f9da902a /rbutil/rbutilqt/test/stubs/stubs-compareversion.cpp
parentb064a6cbb58a0db1a70fbac2e82242ce0c7509b1 (diff)
downloadrockbox-3300815c44.tar.gz
rockbox-3300815c44.tar.bz2
rockbox-3300815c44.zip
rbutil: Update and fix unit tests.
- Fix changed dependencies and provide real stubs. - Update to use QTest global data for test table, so individual test vector entries show up as individual tests. That way a single comparison failing doesn't make all appear as failed and provide better indication what went wrong. Change-Id: I69681c3acd5ceceb4c8ceb1feb341e90a65dd603
Diffstat (limited to 'rbutil/rbutilqt/test/stubs/stubs-compareversion.cpp')
-rw-r--r--rbutil/rbutilqt/test/stubs/stubs-compareversion.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/test/stubs/stubs-compareversion.cpp b/rbutil/rbutilqt/test/stubs/stubs-compareversion.cpp
new file mode 100644
index 0000000000..07e2d18f19
--- /dev/null
+++ b/rbutil/rbutilqt/test/stubs/stubs-compareversion.cpp
@@ -0,0 +1,31 @@
+
+#include "playerbuildinfo.h"
+#include "rbsettings.h"
+#include "rockboxinfo.h"
+
+// not used by the test, just to make things compile.
+QVariant RbSettings::value(RbSettings::UserSettings setting)
+{
+ (void)setting;
+ return QVariant();
+}
+
+
+// not used in the test. If used the test will crash!
+PlayerBuildInfo* PlayerBuildInfo::instance()
+{
+ return nullptr;
+}
+
+QVariant PlayerBuildInfo::value(PlayerBuildInfo::DeviceInfo item, QString target)
+{
+ (void)item;
+ (void)target;
+ return QVariant();
+}
+
+RockboxInfo::RockboxInfo(QString, QString)
+{
+}
+
+