diff options
| author | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
| commit | c25cbdf6fb6d946175f4335fab77bfea601b56db (patch) | |
| tree | 6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /tests/unit/common/test_rr73_policy.cpp | |
| parent | 71f5689252c9f13e70e1c24856904475b2307809 (diff) | |
| parent | 0685fcada9f95fe90f70b387cd7d757da8209624 (diff) | |
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
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" |
