Skip to content

Commit

Permalink
Update tests/src/core/testqgsexpression.cpp
Browse files Browse the repository at this point in the history
Co-Authored-By: Matthias Kuhn <matthias@opengis.ch>
  • Loading branch information
rduivenvoorde and m-kuhn committed Nov 2, 2019
1 parent 0d2c256 commit 564f9fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/src/core/testqgsexpression.cpp
Expand Up @@ -1286,7 +1286,7 @@ class TestQgsExpression: public QObject
QTest::newRow( "epoch invalid date" ) << "epoch('invalid')" << true << QVariant();
// datetime_from_epoch will always return a local datetime, so here we create some circular magic to create a local datetime during test (so test can be ran in every timezone...)
QTest::newRow( "datetime_from_epoch" ) << "datetime_from_epoch(epoch(to_datetime('2017-01-01T00:00:01')))" << false << QVariant( QDateTime( QDate( 2017, 1, 1 ), QTime( 0, 0, 1 ), Qt::LocalTime ) );
QTest::newRow( "datetime_from_epoch_null" ) << "datetime_from_epoch(NULL)" << false << QVariant(QVariant::Invalid);
QTest::newRow( "datetime_from_epoch_null" ) << "datetime_from_epoch(NULL)" << false << QVariant( QVariant::Invalid );
QTest::newRow( "date from format" ) << "to_date('June 29, 2019','MMMM d, yyyy')" << false << QVariant( QDate( 2019, 6, 29 ) );
QTest::newRow( "date from format, wrong string" ) << "to_date('wrong.string.here','yyyy.MM.dd')" << true << QVariant();
QTest::newRow( "date from format, wrong format" ) << "to_date('2019-01-01','wrong')" << true << QVariant();
Expand Down

0 comments on commit 564f9fb

Please sign in to comment.