mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-02 15:26:00 +08:00
6.5.3 clean
This commit is contained in:
@ -12,6 +12,8 @@
|
||||
#include <QtGui/QVector3D>
|
||||
#include <QtGui/QVector4D>
|
||||
#endif
|
||||
#include <QSet>
|
||||
#include <vector>
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
/* XPM test data for QPixmap, QImage tests (use drag cursors as example) */
|
||||
@ -127,6 +129,7 @@ private slots:
|
||||
void compareQListIntToInitializerList_data();
|
||||
void compareQListIntToInitializerList();
|
||||
void compareQListDouble();
|
||||
void compareContainerToInitializerList();
|
||||
#ifdef QT_GUI_LIB
|
||||
void compareQColor_data();
|
||||
void compareQColor();
|
||||
@ -506,6 +509,24 @@ void tst_Cmptest::compareQListDouble()
|
||||
QCOMPARE(double1, double2);
|
||||
}
|
||||
|
||||
void tst_Cmptest::compareContainerToInitializerList()
|
||||
{
|
||||
// Protect ',' in the list
|
||||
#define ARG(...) __VA_ARGS__
|
||||
QSet<int> set{1, 2, 3};
|
||||
QCOMPARE(set, ARG({1, 2, 3}));
|
||||
|
||||
std::vector<int> vec{1, 2, 3};
|
||||
QCOMPARE(vec, ARG({1, 2, 3}));
|
||||
|
||||
vec.clear();
|
||||
QCOMPARE(vec, {});
|
||||
|
||||
vec.push_back(42);
|
||||
QCOMPARE(vec, {42});
|
||||
#undef ARG
|
||||
}
|
||||
|
||||
#ifdef QT_GUI_LIB
|
||||
void tst_Cmptest::compareQColor_data()
|
||||
{
|
||||
|
Reference in New Issue
Block a user