diff options
| author | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:03 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:03 +0200 |
| commit | 059831534c7e884f0a607ed86b582fd00d821731 (patch) | |
| tree | 76bcb67a78f8aa2654fd34c2ad801a62136b0170 /tests/unit/common/test_rr73_policy.cpp | |
| parent | d83a420f0517d7fc47aeb288a6a0cf4891784fcc (diff) | |
New upstream version 3.2.0~rc1+dfsgupstream/3.2.0_rc1+dfsg
Diffstat (limited to 'tests/unit/common/test_rr73_policy.cpp')
| -rw-r--r-- | tests/unit/common/test_rr73_policy.cpp | 43 |
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" |
