diff options
author | Bill King <bill.king@nokia.com> | 2009-10-23 03:48:03 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-10-23 03:48:03 (GMT) |
commit | eeb116b56f9555458438dfe235b16488db9b1494 (patch) | |
tree | b101f46c0772133c8d1c305cb2c99dd40ab58ff2 /tests/auto/q3sqlcursor | |
parent | 4d1a9b18b905f21b70608b13f4789dadec6bc181 (diff) | |
download | Qt-eeb116b56f9555458438dfe235b16488db9b1494.zip Qt-eeb116b56f9555458438dfe235b16488db9b1494.tar.gz Qt-eeb116b56f9555458438dfe235b16488db9b1494.tar.bz2 |
Better sql unicode tests (still not working correctly tho).
Diffstat (limited to 'tests/auto/q3sqlcursor')
-rw-r--r-- | tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp b/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp index ecc0594..4b62302 100644 --- a/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp +++ b/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp @@ -152,10 +152,10 @@ void tst_Q3SqlCursor::createTestTables( QSqlDatabase db ) if ( tst_Databases::isSqlServer( db ) ) { //workaround for SQL SERVER since he can store unicode only in nvarchar fields QVERIFY_SQL(q, exec("create table " + qTableName("qtest_unicode") + " (id int not null, " - "t_varchar nvarchar(40) not null, t_char nchar(40) )" )); + "t_varchar nvarchar(80) not null, t_char nchar(80) )" )); } else { QVERIFY_SQL(q, exec("create table " + qTableName("qtest_unicode") + " (id int not null, " - "t_varchar varchar(40) not null," "t_char char(40))" )); + "t_varchar varchar(100) not null," "t_char char(100))" )); } if (tst_Databases::isMSAccess(db)) { @@ -521,8 +521,7 @@ void tst_Q3SqlCursor::unicode() QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - static const unsigned short utf8arr[] = { 0xd792,0xd79c,0xd792,0xd79c,0xd799,0x20,0xd7a9,0xd799,0x00 }; - static const QString utf8str = QString::fromUcs2( utf8arr ); + static const QString utf8str = QString::fromUtf8( "ὕαλον ϕαγεῖν δύναμαι· τοῦτο οὔ με βλάπτει." ); if ( !db.driver()->hasFeature( QSqlDriver::Unicode ) ) { QSKIP( "DBMS not Unicode capable", SkipSingle ); } |