diff options
author | Andy Shaw <andy.shaw@theqtcompany.com> | 2015-11-06 16:00:56 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-11-06 18:44:04 +0000 |
commit | bf517c22f6ca78f2ab04f87f6801c6ca7081e579 (patch) | |
tree | 556c6a0f0457986c3f6c03d0769d57cc29f18d06 /tests/auto/printsupport/kernel | |
parent | 7a42c8c15c59ef5fe84e6f293f2c97d38b85599c (diff) |
Fix tst_QPrinter::doubleSidedPrinting() test and remove from blacklist
Change-Id: If96471ed3324795086c5ff951d9332a0e82870ea
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'tests/auto/printsupport/kernel')
-rw-r--r-- | tests/auto/printsupport/kernel/qprinter/BLACKLIST | 3 | ||||
-rw-r--r-- | tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/tests/auto/printsupport/kernel/qprinter/BLACKLIST b/tests/auto/printsupport/kernel/qprinter/BLACKLIST deleted file mode 100644 index 250a18787c..0000000000 --- a/tests/auto/printsupport/kernel/qprinter/BLACKLIST +++ /dev/null @@ -1,3 +0,0 @@ -[doubleSidedPrinting] -windows 32bit msvc-2013 - diff --git a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp index 318f87467c..aa72be3ea8 100644 --- a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp +++ b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp @@ -1090,12 +1090,12 @@ void tst_QPrinter::doubleSidedPrinting() QPrinter native; if (native.outputFormat() == QPrinter::NativeFormat) { // Test default - QPrinterInfo printerInfo; + QPrinterInfo printerInfo(native); bool expected = (printerInfo.defaultDuplexMode() != QPrinter::DuplexNone); - QCOMPARE(native.doubleSidedPrinting(), false); + QCOMPARE(native.doubleSidedPrinting(), expected); - // Test set/get - expected = (printerInfo.supportedDuplexModes().count() > 1); + // Test set/get, changing the expected value if possible + expected = expected ? false : (printerInfo.supportedDuplexModes().count() > 1); native.setDoubleSidedPrinting(expected); QCOMPARE(native.doubleSidedPrinting(), expected); |