summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2019-04-08 10:58:31 +0200
committerKarsten Heimrich <karsten.heimrich@qt.io>2019-04-15 08:23:41 +0000
commit2a80df505c6af22755107403b23597874c863db1 (patch)
treee5edca3127e30f44af15d25481e379d374ded9bd /tests
parenta3aff40794cd877944d74d99bc369ada38c53799 (diff)
Fix reverse default values
Change-Id: I17e7e8ea519d4f4eaa45c03a8875f4f90ce090cd Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qknxdatapointtype/tst_qknxdatapointtype.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qknxdatapointtype/tst_qknxdatapointtype.cpp b/tests/auto/qknxdatapointtype/tst_qknxdatapointtype.cpp
index 428bd37..8387ae1 100644
--- a/tests/auto/qknxdatapointtype/tst_qknxdatapointtype.cpp
+++ b/tests/auto/qknxdatapointtype/tst_qknxdatapointtype.cpp
@@ -127,6 +127,10 @@ void tst_QKnxDatapointType::dpt1_1Bit()
QCOMPARE(dpt1Bit.isValid(), true);
QCOMPARE(dpt1Bit.bytes(), QKnxByteArray({ 0x00 }));
QCOMPARE(dpt1Bit.type(), QKnxDatapointType::Type::Dpt1_1Bit);
+ QCOMPARE(dpt1Bit.minimum(), QVariant::fromValue(false));
+ QCOMPARE(dpt1Bit.maximum(), QVariant::fromValue(true));
+ QCOMPARE(dpt1Bit.minimumText(), QString("false"));
+ QCOMPARE(dpt1Bit.maximumText(), QString("true"));
dpt1Bit.setBit(true);
QCOMPARE(dpt1Bit.bit(), true);
@@ -144,6 +148,10 @@ void tst_QKnxDatapointType::dpt1_1Bit()
QCOMPARE(dptSwitch.value(), QKnxSwitch::State::Off);
QCOMPARE(dptSwitch.bytes(), QKnxByteArray({ 0x00 }));
QCOMPARE(dptSwitch.type(), QKnxDatapointType::Type::DptSwitch);
+ QCOMPARE(dptSwitch.minimum(), QVariant::fromValue(false));
+ QCOMPARE(dptSwitch.maximum(), QVariant::fromValue(true));
+ QCOMPARE(dptSwitch.minimumText(), QString("Off"));
+ QCOMPARE(dptSwitch.maximumText(), QString("On"));
dptSwitch.setValue(QKnxSwitch::State::On);
QCOMPARE(dptSwitch.isValid(), true);
@@ -187,6 +195,10 @@ void tst_QKnxDatapointType::dpt1_1Bit()
QCOMPARE(dptWindowDoor.value(), QKnxWindowDoor::State::Closed);
QCOMPARE(dptWindowDoor.bytes(), QKnxByteArray({ 0x00 }));
QCOMPARE(dptWindowDoor.type(), QKnxDatapointType::Type::DptWindowDoor);
+ QCOMPARE(dptWindowDoor.minimum(), QVariant::fromValue(false));
+ QCOMPARE(dptWindowDoor.maximum(), QVariant::fromValue(true));
+ QCOMPARE(dptWindowDoor.minimumText(), QString("Closed"));
+ QCOMPARE(dptWindowDoor.maximumText(), QString("Open"));
}
void tst_QKnxDatapointType::dpt2_1BitControlled()