Skip to content
Permalink
Browse files

Fix test

  • Loading branch information
m-kuhn committed Aug 24, 2018
1 parent f9da596 commit 7e63093987e37c84e3a4489c302840020b9e46b9
Showing with 3 additions and 3 deletions.
  1. +3 −3 tests/src/core/testqgsexpression.cpp
@@ -3114,9 +3114,9 @@ class TestQgsExpression: public QObject
QVariantMap map;
map[QStringLiteral( "1" )] = "One";
map[QStringLiteral( "2" )] = "Two";
QCOMPARE( QgsExpression::formatPreviewString( QVariant( map ) ), QStringLiteral( "{ '1': 'One', 2: 'Two' }" ) );
QCOMPARE( QgsExpression::formatPreviewString( QVariant( map ) ), QStringLiteral( "{ '1': 'One', '2': 'Two' }" ) );
map[QStringLiteral( "3" )] = "A very long string that is going to be truncated";
QCOMPARE( QgsExpression::formatPreviewString( QVariant( map ) ), QStringLiteral( "{ '1': 'One', '2': 'Two', '3': 'A very long string that is going to … }" ) );
QCOMPARE( QgsExpression::formatPreviewString( QVariant( map ) ), QStringLiteral( "{ '1': 'One', '2': 'Two', '3': 'A very long string that is… }" ) );

QVariantList list;
list << 1 << 2 << 3;
@@ -3125,7 +3125,7 @@ class TestQgsExpression: public QObject
QStringList stringList;
stringList << QStringLiteral( "One" ) << QStringLiteral( "Two" ) << QStringLiteral( "A very long string that is going to be truncated" );
QCOMPARE( QgsExpression::formatPreviewString( QVariant( stringList ) ),
QStringLiteral( "[ 'One', 'Two', 'A very long string that is going to be trunca… ]" ) );
QStringLiteral( "[ 'One', 'Two', 'A very long string that is going to be tr… ]" ) );
}
};

0 comments on commit 7e63093

Please sign in to comment.
You can’t perform that action at this time.