summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
index 38f561dbaa..5f1eb99524 100644
--- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
@@ -211,6 +211,8 @@ private slots:
void QTBUG_6852();
void QTBUG_5765_data() { generic_data("QMYSQL"); }
void QTBUG_5765();
+ void QTBUG_12186_data() { generic_data("QSQLITE"); }
+ void QTBUG_12186();
void QTBUG_14132_data() { generic_data("QOCI"); }
void QTBUG_14132();
void QTBUG_18435_data() { generic_data("QODBC"); }
@@ -3054,6 +3056,27 @@ void tst_QSqlQuery::QTBUG_551()
QCOMPARE(res_outLst[2].toString(), QLatin1String("3. Value is 2"));
}
+void tst_QSqlQuery::QTBUG_12186()
+{
+ QFETCH( QString, dbName );
+ QSqlDatabase db = QSqlDatabase::database(dbName);
+
+ // make sure that query.boundValues() returns the values in the right order even for more than 16 placeholders
+ QSqlQuery query(db);
+ query.prepare("INSERT INTO person (col1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11, col12, col13, col14, col15, col16, col17, col18) "
+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+
+ QList<QVariant> values;
+
+ for (int i = 0; i < 18; ++i)
+ values << i;
+
+ foreach (QVariant v, values)
+ query.bindValue(v.toInt(), v);
+
+ QCOMPARE(query.boundValues().values(), values);
+}
+
void tst_QSqlQuery::QTBUG_14132()
{
QFETCH( QString, dbName );