tests/auto/qlcdnumber/tst_qlcdnumber.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
    72 
    72 
    73 // Testing get/set functions
    73 // Testing get/set functions
    74 void tst_QLCDNumber::getSetCheck()
    74 void tst_QLCDNumber::getSetCheck()
    75 {
    75 {
    76     QLCDNumber obj1;
    76     QLCDNumber obj1;
    77     // int QLCDNumber::numDigits()
    77     // int QLCDNumber::digitCount()
    78     // void QLCDNumber::setNumDigits(int)
    78     // void QLCDNumber::setDigitCount(int)
    79     obj1.setNumDigits(0);
    79     obj1.setDigitCount(0);
    80     QCOMPARE(0, obj1.numDigits());
    80     QCOMPARE(0, obj1.digitCount());
    81     obj1.setNumDigits(INT_MIN);
    81     obj1.setDigitCount(INT_MIN);
    82     QCOMPARE(0, obj1.numDigits()); // Range<0, 99>
    82     QCOMPARE(0, obj1.digitCount()); // Range<0, 99>
    83     obj1.setNumDigits(INT_MAX);
    83     obj1.setDigitCount(INT_MAX);
    84     QCOMPARE(99, obj1.numDigits()); // Range<0, 99>
    84     QCOMPARE(99, obj1.digitCount()); // Range<0, 99>
    85 }
    85 }
    86 
    86 
    87 QTEST_MAIN(tst_QLCDNumber)
    87 QTEST_MAIN(tst_QLCDNumber)
    88 #include "tst_qlcdnumber.moc"
    88 #include "tst_qlcdnumber.moc"