tests/auto/qsystemdisplayinfo/tst_qsystemdisplayinfo.cpp
changeset 5 603d3f8b6302
parent 0 876b1a06bc25
equal deleted inserted replaced
3:e4ebb16b39ea 5:603d3f8b6302
    54 
    54 
    55 void tst_QSystemDisplayInfo::tst_displayBrightness()
    55 void tst_QSystemDisplayInfo::tst_displayBrightness()
    56 {
    56 {
    57     QSystemDisplayInfo di;
    57     QSystemDisplayInfo di;
    58     QVERIFY(di.displayBrightness(0) > -2);
    58     QVERIFY(di.displayBrightness(0) > -2);
       
    59     QVERIFY(di.displayBrightness(999) == -1);
    59 }
    60 }
    60 
    61 
    61 void tst_QSystemDisplayInfo::tst_colorDepth()
    62 void tst_QSystemDisplayInfo::tst_colorDepth()
    62 {
    63 {
    63     QSystemDisplayInfo di;
    64     QSystemDisplayInfo di;
    64     int depth = di.colorDepth(0);
    65     int depth = di.colorDepth(0);
    65     qWarning() << __FUNCTION__ << depth;
       
    66 
    66 
    67     QVERIFY(depth == 0
    67     QVERIFY(depth == 0
    68             || depth == 8
    68             || depth == 8
    69             || depth == 16
    69             || depth == 16
    70             || depth == 24
    70             || depth == 24
    71             || depth == 32
    71             || depth == 32
    72             || depth == 64);
    72             || depth == 64);
       
    73 
       
    74     QVERIFY(di.colorDepth(999) == -1);
    73 }
    75 }
    74 
    76 
    75 
    77 
    76 QTEST_MAIN(tst_QSystemDisplayInfo)
    78 QTEST_MAIN(tst_QSystemDisplayInfo)
    77 #include "tst_qsystemdisplayinfo.moc"
    79 #include "tst_qsystemdisplayinfo.moc"