mirror of https://github.com/qt/qtbase.git
tst_QSizePolicy: split a test function
Split off default-value check from getSetCheck(). This is in preparation of extracting getSetCheck_data(). Change-Id: I869c34014a92e29a07dc08584a93a4cbba372518 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
parent
4bf8613df1
commit
933c06e3f7
|
@ -40,17 +40,17 @@ class tst_QSizePolicy : public QObject
|
|||
Q_OBJECT
|
||||
|
||||
private Q_SLOTS:
|
||||
void defaultValues();
|
||||
void getSetCheck();
|
||||
void dataStream();
|
||||
void horizontalStretch();
|
||||
void verticalStretch();
|
||||
};
|
||||
|
||||
// Testing get/set functions
|
||||
void tst_QSizePolicy::getSetCheck()
|
||||
void tst_QSizePolicy::defaultValues()
|
||||
{
|
||||
{
|
||||
// check values of a default constructed QSizePolicy
|
||||
// check values of a default-constructed QSizePolicy
|
||||
QSizePolicy sp;
|
||||
QCOMPARE(sp.horizontalPolicy(), QSizePolicy::Fixed);
|
||||
QCOMPARE(sp.verticalPolicy(), QSizePolicy::Fixed);
|
||||
|
@ -61,7 +61,11 @@ void tst_QSizePolicy::getSetCheck()
|
|||
QCOMPARE(sp.hasHeightForWidth(), false);
|
||||
QCOMPARE(sp.hasWidthForHeight(), false);
|
||||
}
|
||||
}
|
||||
|
||||
// Testing get/set functions
|
||||
void tst_QSizePolicy::getSetCheck()
|
||||
{
|
||||
{
|
||||
static const QSizePolicy::Policy policies[3] = {
|
||||
QSizePolicy::Fixed,
|
||||
|
|
Loading…
Reference in New Issue