mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-10 00:13:55 -04:00
Test fixes
This commit is contained in:
parent
ec244b3338
commit
1895db9495
@ -153,7 +153,7 @@ void TestQgsDxfExport::testPoints()
|
|||||||
|
|
||||||
QString file = getTempFileName( "point_dxf" );
|
QString file = getTempFileName( "point_dxf" );
|
||||||
QFile dxfFile( file );
|
QFile dxfFile( file );
|
||||||
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::Success );
|
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::ExportResult::Success );
|
||||||
dxfFile.close();
|
dxfFile.close();
|
||||||
|
|
||||||
// reload and compare
|
// reload and compare
|
||||||
@ -181,7 +181,7 @@ void TestQgsDxfExport::testLines()
|
|||||||
|
|
||||||
QString file = getTempFileName( "line_dxf" );
|
QString file = getTempFileName( "line_dxf" );
|
||||||
QFile dxfFile( file );
|
QFile dxfFile( file );
|
||||||
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::Success );
|
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::ExportResult::Success );
|
||||||
dxfFile.close();
|
dxfFile.close();
|
||||||
|
|
||||||
// reload and compare
|
// reload and compare
|
||||||
@ -209,7 +209,7 @@ void TestQgsDxfExport::testPolygons()
|
|||||||
|
|
||||||
QString file = getTempFileName( "polygon_dxf" );
|
QString file = getTempFileName( "polygon_dxf" );
|
||||||
QFile dxfFile( file );
|
QFile dxfFile( file );
|
||||||
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::Success );
|
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::ExportResult::Success );
|
||||||
dxfFile.close();
|
dxfFile.close();
|
||||||
|
|
||||||
// reload and compare
|
// reload and compare
|
||||||
@ -242,7 +242,7 @@ void TestQgsDxfExport::testMultiSurface()
|
|||||||
|
|
||||||
QString file = getTempFileName( "multisurface_dxf" );
|
QString file = getTempFileName( "multisurface_dxf" );
|
||||||
QFile dxfFile( file );
|
QFile dxfFile( file );
|
||||||
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::Success );
|
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::ExportResult::Success );
|
||||||
dxfFile.close();
|
dxfFile.close();
|
||||||
|
|
||||||
// reload and compare
|
// reload and compare
|
||||||
@ -295,7 +295,7 @@ void TestQgsDxfExport::testMTextEscapeSpaces()
|
|||||||
|
|
||||||
QString file = getTempFileName( "mtext_escape_spaces" );
|
QString file = getTempFileName( "mtext_escape_spaces" );
|
||||||
QFile dxfFile( file );
|
QFile dxfFile( file );
|
||||||
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::Success );
|
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::ExportResult::Success );
|
||||||
dxfFile.close();
|
dxfFile.close();
|
||||||
QVERIFY( fileContainsText( file, "\\fQGIS Vera Sans|i0|b1;\\H3.81136;A\\~text\\~with\\~spaces" ) );
|
QVERIFY( fileContainsText( file, "\\fQGIS Vera Sans|i0|b1;\\H3.81136;A\\~text\\~with\\~spaces" ) );
|
||||||
}
|
}
|
||||||
@ -331,7 +331,7 @@ void TestQgsDxfExport::testText()
|
|||||||
|
|
||||||
QString file = getTempFileName( "text_dxf" );
|
QString file = getTempFileName( "text_dxf" );
|
||||||
QFile dxfFile( file );
|
QFile dxfFile( file );
|
||||||
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::Success );
|
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::ExportResult::Success );
|
||||||
dxfFile.close();
|
dxfFile.close();
|
||||||
|
|
||||||
|
|
||||||
@ -397,7 +397,7 @@ bool TestQgsDxfExport::testMtext( QgsVectorLayer *vlayer, const QString &tempFil
|
|||||||
|
|
||||||
QString file = getTempFileName( tempFileName );
|
QString file = getTempFileName( tempFileName );
|
||||||
QFile dxfFile( file );
|
QFile dxfFile( file );
|
||||||
if ( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ) != 0 )
|
if ( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ) != QgsDxfExport::ExportResult::Success )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -451,7 +451,7 @@ void TestQgsDxfExport::testGeometryGeneratorExport()
|
|||||||
|
|
||||||
QString file = getTempFileName( "geometry_generator_dxf" );
|
QString file = getTempFileName( "geometry_generator_dxf" );
|
||||||
QFile dxfFile( file );
|
QFile dxfFile( file );
|
||||||
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::Success );
|
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::ExportResult::Success );
|
||||||
dxfFile.close();
|
dxfFile.close();
|
||||||
|
|
||||||
QVERIFY( fileContainsText( file, "HATCH" ) );
|
QVERIFY( fileContainsText( file, "HATCH" ) );
|
||||||
@ -484,7 +484,7 @@ void TestQgsDxfExport::testCurveExport()
|
|||||||
|
|
||||||
QString file = getTempFileName( wktType );
|
QString file = getTempFileName( wktType );
|
||||||
QFile dxfFile( file );
|
QFile dxfFile( file );
|
||||||
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::Success );
|
QCOMPARE( d.writeToFile( &dxfFile, QStringLiteral( "CP1252" ) ), QgsDxfExport::ExportResult::Success );
|
||||||
dxfFile.close();
|
dxfFile.close();
|
||||||
|
|
||||||
QVERIFY( fileContainsText( file, dxfText ) );
|
QVERIFY( fileContainsText( file, dxfText ) );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user