summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsqlrecord
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-05-17 13:43:30 +1000
committerJason McDonald <jason.mcdonald@nokia.com>2011-05-18 16:09:29 +1000
commit49babe02f0a00fe2baff3950fbdcb725ce20d772 (patch)
treee0383c879f78ef74ba7a0fe394504c096312edf4 /tests/auto/qsqlrecord
parent0cd93933d8e5cc69151958fc285936854ff86e47 (diff)
Remove autotest code for Qt3Support library.
This commit deals with the simple cases -- mostly just removing blocks of code enclosed in #ifdef QT3_SUPPORT. Later commits will deal with the trickier cases. Change-Id: I280dea25b3754be175efe62fc7e5e4e7c304e658 Task-number: QTBUG-19325 Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto/qsqlrecord')
-rw-r--r--tests/auto/qsqlrecord/tst_qsqlrecord.cpp86
1 files changed, 0 insertions, 86 deletions
diff --git a/tests/auto/qsqlrecord/tst_qsqlrecord.cpp b/tests/auto/qsqlrecord/tst_qsqlrecord.cpp
index 431dfbf3fe..41c4e3b1cf 100644
--- a/tests/auto/qsqlrecord/tst_qsqlrecord.cpp
+++ b/tests/auto/qsqlrecord/tst_qsqlrecord.cpp
@@ -70,12 +70,6 @@ public slots:
void cleanup();
private slots:
void value();
-#ifdef QT3_SUPPORT
- void toStringList_data();
- void toStringList();
- void toString_data();
- void toString();
-#endif // QT3_SUPPORT
void setValue_data();
void setValue();
void setNull();
@@ -166,12 +160,6 @@ void tst_QSqlRecord::append()
QCOMPARE( rec->indexOf( "int" ), 1 );
QCOMPARE( rec->indexOf( "double" ), 2 );
QCOMPARE( rec->indexOf( "bool" ), 3 );
-#ifdef QT3_SUPPORT
- QCOMPARE( rec->position( "string" ), 0 );
- QCOMPARE( rec->position( "int" ), 1 );
- QCOMPARE( rec->position( "double" ), 2 );
- QCOMPARE( rec->position( "bool" ), 3 );
-#endif
}
void tst_QSqlRecord::clear()
@@ -181,10 +169,6 @@ void tst_QSqlRecord::clear()
rec->clear();
QCOMPARE( (int)rec->count(), 0 );
QVERIFY( rec->isEmpty() );
-#ifdef QT3_SUPPORT
- QVERIFY( rec->fieldPtr( 0 ) == 0 );
- QVERIFY( rec->fieldPtr( "_This should give a warning!_" ) == 0 );
-#endif
QVERIFY( !rec->contains( fields[0]->name() ) );
}
@@ -236,12 +220,6 @@ void tst_QSqlRecord::clearValues()
QCOMPARE( rec->indexOf( "int" ), 1 );
QCOMPARE( rec->indexOf( "double" ), 2 );
QCOMPARE( rec->indexOf( "bool" ), 3 );
-#ifdef QT3_SUPPORT
- QCOMPARE( rec->position( "string" ), 0 );
- QCOMPARE( rec->position( "int" ), 1 );
- QCOMPARE( rec->position( "double" ), 2 );
- QCOMPARE( rec->position( "bool" ), 3 );
-#endif
for ( i = 0; i < 4; ++i )
rec->setNull( i );
@@ -287,9 +265,6 @@ void tst_QSqlRecord::field()
int i;
for ( i = 0; i < NUM_FIELDS; ++i )
QVERIFY( rec->field( i ) == *fields[ i ] );
-#ifdef QT3_SUPPORT
- QVERIFY( rec->fieldPtr( NUM_FIELDS ) == 0 );
-#endif
for ( i = 0; i < NUM_FIELDS; ++i )
QVERIFY( rec->field( (fields[ i ] )->name() ) == *( fields[ i ] ) );
@@ -438,9 +413,6 @@ void tst_QSqlRecord::position()
int i;
for ( i = 0; i < NUM_FIELDS; ++i ) {
QCOMPARE( rec->indexOf( fields[ i ]->name() ), i );
-#ifdef QT3_SUPPORT
- QCOMPARE( rec->position( fields[ i ]->name() ), i );
-#endif
}
}
@@ -499,12 +471,6 @@ void tst_QSqlRecord::setValue()
QCOMPARE( rec->indexOf( "int" ), 1 );
QCOMPARE( rec->indexOf( "double" ), 2 );
QCOMPARE( rec->indexOf( "bool" ), 3 );
-#ifdef QT3_SUPPORT
- QCOMPARE( rec->position( "string" ), 0 );
- QCOMPARE( rec->position( "int" ), 1 );
- QCOMPARE( rec->position( "double" ), 2 );
- QCOMPARE( rec->position( "bool" ), 3 );
-#endif
QFETCH( int, ival );
QFETCH( QString, sval );
@@ -543,58 +509,6 @@ void tst_QSqlRecord::setValue()
QCOMPARE( rec->value( 3 ), QVariant(bval) );
}
-#ifdef QT3_SUPPORT
-void tst_QSqlRecord::toString_data()
-{
- clearValues_data( t );
-}
-
-void tst_QSqlRecord::toString()
-{
- createTestRecord();
- QString result;
- QFETCH( QString, prefix );
- QFETCH( QString, sep );
- rec->setGenerated( 1, false );
- for (int i = 0; i < NUM_FIELDS; ++i ) {
- if ( i == 1 )
- continue;
- if ( prefix.isEmpty() ) {
- result += fields[ i ]->name();
- } else {
- result += prefix + '.' + fields[ i ]->name();
- }
- if ( i != NUM_FIELDS - 1 )
- result += sep + ' ';
- }
- QCOMPARE( rec->toString( prefix, sep ), result );
-}
-
-void tst_QSqlRecord::toStringList_data()
-{
- clearValues_data( t );
-}
-
-void tst_QSqlRecord::toStringList()
-{
- createTestRecord();
- QStringList result;
- QFETCH( QString, prefix );
- rec->setGenerated( 1, false );
- for (int i = 0; i < NUM_FIELDS; ++i ) {
- if ( i == 1 )
- continue;
- if ( prefix.isEmpty() ) {
- result << fields[ i ]->name();
- } else {
- result << ( prefix + '.' + fields[ i ]->name() );
- }
- }
- QCOMPARE(rec->toStringList( prefix ), result);
-}
-
-#endif // QT3_SUPPORT
-
void tst_QSqlRecord::value()
{
// this test is already covered in setValue()