diff options
author | Bill King <bill.king@nokia.com> | 2009-08-03 04:11:07 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-08-03 04:13:28 (GMT) |
commit | c386e433ff9e55bcf65abf9eee665ad4237fbd33 (patch) | |
tree | ebd911527e1e18e44857e4948d63b10c1c0964cc /tests | |
parent | 9ce6d885f4c141fabce1427ff776e02bdb6846ae (diff) | |
download | Qt-c386e433ff9e55bcf65abf9eee665ad4237fbd33.zip Qt-c386e433ff9e55bcf65abf9eee665ad4237fbd33.tar.gz Qt-c386e433ff9e55bcf65abf9eee665ad4237fbd33.tar.bz2 |
Fixes casing fails for databases that have variable casing support.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp index 1e23d3d..d836486 100644 --- a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp +++ b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp @@ -930,13 +930,15 @@ void tst_QSqlRelationalTableModel::casing() QSqlQuery q(db); QVERIFY_SQL( q, exec("create table " + qTableName("CASETEST1", db.driver()).toUpper() + " (id int not null primary key, name varchar(20), title_key int, another_title_key int)")); + + if( !q.exec("create table " + qTableName("casetest1", db.driver()) + + " (ident int not null primary key, name varchar(20), title_key int)")) + QSKIP("The casing test for this database is irrelevant since this database does not treat different cases as separate entities", SkipAll); + QVERIFY_SQL( q, exec("insert into " + qTableName("CASETEST1", db.driver()).toUpper() + " values(1, 'harry', 1, 2)")); QVERIFY_SQL( q, exec("insert into " + qTableName("CASETEST1", db.driver()).toUpper() + " values(2, 'trond', 2, 1)")); QVERIFY_SQL( q, exec("insert into " + qTableName("CASETEST1", db.driver()).toUpper() + " values(3, 'vohi', 1, 2)")); QVERIFY_SQL( q, exec("insert into " + qTableName("CASETEST1", db.driver()).toUpper() + " values(4, 'boris', 2, 2)")); - - QVERIFY_SQL( q, exec("create table " + qTableName("casetest1", db.driver()) + - " (ident int not null primary key, name varchar(20), title_key int)")); QVERIFY_SQL( q, exec("insert into " + qTableName("casetest1", db.driver()) + " values(1, 'jerry', 1)")); QVERIFY_SQL( q, exec("insert into " + qTableName("casetest1", db.driver()) + " values(2, 'george', 2)")); QVERIFY_SQL( q, exec("insert into " + qTableName("casetest1", db.driver()) + " values(4, 'kramer', 2)")); |