diff options
author | Bill King <bill.king@nokia.com> | 2010-04-07 05:42:36 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2010-04-07 05:42:36 (GMT) |
commit | ddd1e4aefcb8e52125656588b0bb76ec246b5d29 (patch) | |
tree | 29e1feed857032beaadc1512665e9255bbf7d37a /tests | |
parent | ccda3100c7a0487d314fb58ba315f06b1b40af9c (diff) | |
download | Qt-ddd1e4aefcb8e52125656588b0bb76ec246b5d29.zip Qt-ddd1e4aefcb8e52125656588b0bb76ec246b5d29.tar.gz Qt-ddd1e4aefcb8e52125656588b0bb76ec246b5d29.tar.bz2 |
Fix test sql for sql server.
Sql server requires explicitly setting fields to be nullable.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp index 8a084bb..38e5387 100644 --- a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp +++ b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp @@ -181,7 +181,11 @@ void tst_QSqlTableModel::createTestTables() QVERIFY_SQL( q, exec("create table " + test3 + "(id int, random varchar(20), randomtwo varchar(20))")); - QVERIFY_SQL( q, exec("create table " + qTableName("test4", __FILE__) + "(column1 varchar(50), column2 varchar(50), column3 varchar(50))")); + if(!tst_Databases::isSqlServer(db)) + QVERIFY_SQL( q, exec("create table " + qTableName("test4", __FILE__) + "(column1 varchar(50), column2 varchar(50), column3 varchar(50))")); + else + QVERIFY_SQL( q, exec("create table " + qTableName("test4", __FILE__) + "(column1 varchar(50), column2 varchar(50) NULL, column3 varchar(50))")); + QVERIFY_SQL( q, exec("create table " + qTableName("emptytable", __FILE__) + "(id int)")); |