summaryrefslogtreecommitdiff
path: root/tests/unit/common/test_rr73_policy.cpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2026-09-26 23:24:28 +0200
committerChristoph Berg <myon@debian.org>2026-09-26 23:24:28 +0200
commit69344560ea394c06ca94acac46a2e4c3e8b7b229 (patch)
treeebc98370a697a9bbd6b973a14fa5113c475c6db7 /tests/unit/common/test_rr73_policy.cpp
parent3e9d10a67671d0bd5c7b8c3ca8088f1818322eff (diff)
parent059831534c7e884f0a607ed86b582fd00d821731 (diff)
Update upstream source from tag 'upstream/3.2.0_rc1+dfsg'
Update to upstream version '3.2.0~rc1+dfsg' with Debian dir dbff457fd2c3616d5c77b863c7bfb2186ed86047
Diffstat (limited to 'tests/unit/common/test_rr73_policy.cpp')
-rw-r--r--tests/unit/common/test_rr73_policy.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/unit/common/test_rr73_policy.cpp b/tests/unit/common/test_rr73_policy.cpp
new file mode 100644
index 00000000..9f126f3b
--- /dev/null
+++ b/tests/unit/common/test_rr73_policy.cpp
@@ -0,0 +1,43 @@
+#include <QtTest>
+
+#include "Rr73Policy.hpp"
+
+class TestRr73Policy final : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void tx4AllowsRr73_data ();
+ void tx4AllowsRr73 ();
+};
+
+void TestRr73Policy::tx4AllowsRr73_data ()
+{
+ QTest::addColumn<QString> ("mode");
+ QTest::addColumn<bool> ("shortMessages");
+ QTest::addColumn<bool> ("allowed");
+
+ QTest::newRow ("FT8") << QString {"FT8"} << false << true;
+ QTest::newRow ("FT4") << QString {"FT4"} << false << true;
+ QTest::newRow ("FST4") << QString {"FST4"} << false << true;
+ QTest::newRow ("MSK144") << QString {"MSK144"} << false << true;
+ QTest::newRow ("MSK144 shorthand") << QString {"MSK144"} << true << false;
+ QTest::newRow ("Q65") << QString {"Q65"} << false << true;
+ QTest::newRow ("Q65 shorthand") << QString {"Q65"} << true << false;
+ QTest::newRow ("JT65") << QString {"JT65"} << false << false;
+ QTest::newRow ("JT4") << QString {"JT4"} << false << false;
+ QTest::newRow ("FST4W") << QString {"FST4W"} << false << false;
+}
+
+void TestRr73Policy::tx4AllowsRr73 ()
+{
+ QFETCH (QString, mode);
+ QFETCH (bool, shortMessages);
+ QFETCH (bool, allowed);
+
+ QCOMPARE (Rr73Policy::tx4AllowsRr73 (mode, shortMessages), allowed);
+}
+
+QTEST_GUILESS_MAIN (TestRr73Policy)
+
+#include "test_rr73_policy.moc"