Skip to content

Commit 12c6c91

Browse files
iakovmrbean-bremen
authored andcommitted
Fix tests
* `opengl` is not required * `CHAR_MIN` is `0` for unsigned `char`. It is implementation specific, actually
1 parent 14ec00c commit 12c6c91

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tests/PythonQtTests.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,11 @@ void PythonQtTestSlotCalling::testPODSlotCalls()
193193
QVERIFY(_helper->runScript("if obj.getUInt(42)==42: obj.setPassed();\n"));
194194
QVERIFY(_helper->runScript("if obj.getShort(-43)==-43: obj.setPassed();\n"));
195195
QVERIFY(_helper->runScript("if obj.getUShort(43)==43: obj.setPassed();\n"));
196+
#if (CHAR_MIN + 0)
196197
QVERIFY(_helper->runScript("if obj.getChar(-12)==-12: obj.setPassed();\n"));
198+
#else
199+
QVERIFY(_helper->runScript("if obj.getChar(250)==250: obj.setPassed();\n"));
200+
#endif
197201
QVERIFY(_helper->runScript("if obj.getUChar(12)==12: obj.setPassed();\n"));
198202
QVERIFY(_helper->runScript("if obj.getLong(-256*256*256)==-256*256*256: obj.setPassed();\n"));
199203
QVERIFY(_helper->runScript("if obj.getULong(256*256*256)==256*256*256: obj.setPassed();\n"));

tests/tests.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ TEMPLATE = app
99
DESTDIR = ../lib
1010
QMAKE_RPATHDIR += $$DESTDIR
1111

12-
QT += testlib opengl
12+
QT += testlib
1313
CONFIG += testcase cmdline exceptions testcase_no_bundle no_testcase_installs
1414

1515
#Workaround for MinGW build. Qt incorrectly sets it to empty string on Win32 for bash

0 commit comments

Comments
 (0)