Skip to content

Commit adc31bb

Browse files
committedSep 12, 2018
Fix test on Travis
1 parent c5ab589 commit adc31bb

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed
 

‎tests/src/core/testqgsstyle.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ void TestStyle::testFavorites()
270270
// remove one symbol from favorites
271271
mStyle->removeFavorite( QgsStyle::SymbolEntity, QStringLiteral( "symbolA" ) );
272272
QCOMPARE( favoriteChangedSpy.count(), 1 );
273-
QCOMPARE( favoriteChangedSpy.at( 0 ).at( 0 ).toInt(), QgsStyle::SymbolEntity );
273+
QCOMPARE( favoriteChangedSpy.at( 0 ).at( 0 ).toInt(), static_cast< int >( QgsStyle::SymbolEntity ) );
274274
QCOMPARE( favoriteChangedSpy.at( 0 ).at( 1 ).toString(), QStringLiteral( "symbolA" ) );
275275
QCOMPARE( favoriteChangedSpy.at( 0 ).at( 2 ).toBool(), false );
276276

@@ -281,7 +281,7 @@ void TestStyle::testFavorites()
281281

282282
mStyle->addFavorite( QgsStyle::SymbolEntity, QStringLiteral( "symbolA" ) );
283283
QCOMPARE( favoriteChangedSpy.count(), 2 );
284-
QCOMPARE( favoriteChangedSpy.at( 1 ).at( 0 ).toInt(), QgsStyle::SymbolEntity );
284+
QCOMPARE( favoriteChangedSpy.at( 1 ).at( 0 ).toInt(), static_cast< int >( QgsStyle::SymbolEntity ) );
285285
QCOMPARE( favoriteChangedSpy.at( 1 ).at( 1 ).toString(), QStringLiteral( "symbolA" ) );
286286
QCOMPARE( favoriteChangedSpy.at( 1 ).at( 2 ).toBool(), true );
287287
favorites = mStyle->symbolsOfFavorite( QgsStyle::SymbolEntity );
@@ -295,7 +295,7 @@ void TestStyle::testFavorites()
295295

296296
mStyle->addFavorite( QgsStyle::ColorrampEntity, QStringLiteral( "gradient_1" ) );
297297
QCOMPARE( favoriteChangedSpy.count(), 3 );
298-
QCOMPARE( favoriteChangedSpy.at( 2 ).at( 0 ).toInt(), QgsStyle::ColorrampEntity );
298+
QCOMPARE( favoriteChangedSpy.at( 2 ).at( 0 ).toInt(), static_cast< int >( QgsStyle::ColorrampEntity ) );
299299
QCOMPARE( favoriteChangedSpy.at( 2 ).at( 1 ).toString(), QStringLiteral( "gradient_1" ) );
300300
QCOMPARE( favoriteChangedSpy.at( 2 ).at( 2 ).toBool(), true );
301301
favorites = mStyle->symbolsOfFavorite( QgsStyle::ColorrampEntity );
@@ -304,7 +304,7 @@ void TestStyle::testFavorites()
304304

305305
mStyle->removeFavorite( QgsStyle::ColorrampEntity, QStringLiteral( "gradient_1" ) );
306306
QCOMPARE( favoriteChangedSpy.count(), 4 );
307-
QCOMPARE( favoriteChangedSpy.at( 3 ).at( 0 ).toInt(), QgsStyle::ColorrampEntity );
307+
QCOMPARE( favoriteChangedSpy.at( 3 ).at( 0 ).toInt(), static_cast< int >( QgsStyle::ColorrampEntity ) );
308308
QCOMPARE( favoriteChangedSpy.at( 3 ).at( 1 ).toString(), QStringLiteral( "gradient_1" ) );
309309
QCOMPARE( favoriteChangedSpy.at( 3 ).at( 2 ).toBool(), false );
310310
favorites = mStyle->symbolsOfFavorite( QgsStyle::ColorrampEntity );
@@ -364,13 +364,13 @@ void TestStyle::testTags()
364364
//tag them
365365
QVERIFY( mStyle->tagSymbol( QgsStyle::SymbolEntity, "blue starry", QStringList() << "blue" << "starry" ) );
366366
QCOMPARE( tagsChangedSpy.count(), 1 );
367-
QCOMPARE( tagsChangedSpy.at( 0 ).at( 0 ).toInt(), QgsStyle::SymbolEntity );
367+
QCOMPARE( tagsChangedSpy.at( 0 ).at( 0 ).toInt(), static_cast< int >( QgsStyle::SymbolEntity ) );
368368
QCOMPARE( tagsChangedSpy.at( 0 ).at( 1 ).toString(), QStringLiteral( "blue starry" ) );
369369
QCOMPARE( tagsChangedSpy.at( 0 ).at( 2 ).toStringList(), QStringList() << QStringLiteral( "blue" ) << QStringLiteral( "starry" ) );
370370

371371
QVERIFY( mStyle->tagSymbol( QgsStyle::SymbolEntity, "red circle", QStringList() << "red" << "circle" ) );
372372
QCOMPARE( tagsChangedSpy.count(), 2 );
373-
QCOMPARE( tagsChangedSpy.at( 1 ).at( 0 ).toInt(), QgsStyle::SymbolEntity );
373+
QCOMPARE( tagsChangedSpy.at( 1 ).at( 0 ).toInt(), static_cast< int >( QgsStyle::SymbolEntity ) );
374374
QCOMPARE( tagsChangedSpy.at( 1 ).at( 1 ).toString(), QStringLiteral( "red circle" ) );
375375
QCOMPARE( tagsChangedSpy.at( 1 ).at( 2 ).toStringList(), QStringList() << QStringLiteral( "red" ) << QStringLiteral( "circle" ) );
376376

@@ -380,7 +380,7 @@ void TestStyle::testTags()
380380
//tag which hasn't been added yet
381381
QVERIFY( mStyle->tagSymbol( QgsStyle::SymbolEntity, "red circle", QStringList() << "round" ) );
382382
QCOMPARE( tagsChangedSpy.count(), 3 );
383-
QCOMPARE( tagsChangedSpy.at( 2 ).at( 0 ).toInt(), QgsStyle::SymbolEntity );
383+
QCOMPARE( tagsChangedSpy.at( 2 ).at( 0 ).toInt(), static_cast< int >( QgsStyle::SymbolEntity ) );
384384
QCOMPARE( tagsChangedSpy.at( 2 ).at( 1 ).toString(), QStringLiteral( "red circle" ) );
385385
QCOMPARE( tagsChangedSpy.at( 2 ).at( 2 ).toStringList(), QStringList() << QStringLiteral( "red" ) << QStringLiteral( "circle" ) << QStringLiteral( "round" ) );
386386

@@ -426,7 +426,7 @@ void TestStyle::testTags()
426426
QCOMPARE( tags.count(), 1 );
427427
QVERIFY( tags.contains( "starry" ) );
428428
QCOMPARE( tagsChangedSpy.count(), 5 );
429-
QCOMPARE( tagsChangedSpy.at( 4 ).at( 0 ).toInt(), QgsStyle::SymbolEntity );
429+
QCOMPARE( tagsChangedSpy.at( 4 ).at( 0 ).toInt(), static_cast< int >( QgsStyle::SymbolEntity ) );
430430
QCOMPARE( tagsChangedSpy.at( 4 ).at( 1 ).toString(), QStringLiteral( "blue starry" ) );
431431
QCOMPARE( tagsChangedSpy.at( 4 ).at( 2 ).toStringList(), QStringList() << QStringLiteral( "starry" ) );
432432

@@ -435,7 +435,7 @@ void TestStyle::testTags()
435435
tags = mStyle->tagsOfSymbol( QgsStyle::SymbolEntity, QStringLiteral( "blue starry" ) );
436436
QCOMPARE( tags.count(), 0 );
437437
QCOMPARE( tagsChangedSpy.count(), 6 );
438-
QCOMPARE( tagsChangedSpy.at( 5 ).at( 0 ).toInt(), QgsStyle::SymbolEntity );
438+
QCOMPARE( tagsChangedSpy.at( 5 ).at( 0 ).toInt(), static_cast< int >( QgsStyle::SymbolEntity ) );
439439
QCOMPARE( tagsChangedSpy.at( 5 ).at( 1 ).toString(), QStringLiteral( "blue starry" ) );
440440
QCOMPARE( tagsChangedSpy.at( 5 ).at( 2 ).toStringList(), QStringList() );
441441

@@ -537,7 +537,7 @@ void TestStyle::testTags()
537537
QCOMPARE( tags.count(), 1 );
538538
QVERIFY( tags.contains( "starry" ) );
539539
QCOMPARE( tagsChangedSpy.count(), 13 );
540-
QCOMPARE( tagsChangedSpy.at( 12 ).at( 0 ).toInt(), QgsStyle::ColorrampEntity );
540+
QCOMPARE( tagsChangedSpy.at( 12 ).at( 0 ).toInt(), static_cast< int >( QgsStyle::ColorrampEntity ) );
541541
QCOMPARE( tagsChangedSpy.at( 12 ).at( 1 ).toString(), QStringLiteral( "gradient_tag1" ) );
542542
QCOMPARE( tagsChangedSpy.at( 12 ).at( 2 ).toStringList(), QStringList() << QStringLiteral( "starry" ) );
543543

@@ -546,7 +546,7 @@ void TestStyle::testTags()
546546
tags = mStyle->tagsOfSymbol( QgsStyle::ColorrampEntity, QStringLiteral( "gradient_tag1" ) );
547547
QCOMPARE( tags.count(), 0 );
548548
QCOMPARE( tagsChangedSpy.count(), 14 );
549-
QCOMPARE( tagsChangedSpy.at( 13 ).at( 0 ).toInt(), QgsStyle::ColorrampEntity );
549+
QCOMPARE( tagsChangedSpy.at( 13 ).at( 0 ).toInt(), static_cast< int >( QgsStyle::ColorrampEntity ) );
550550
QCOMPARE( tagsChangedSpy.at( 13 ).at( 1 ).toString(), QStringLiteral( "gradient_tag1" ) );
551551
QCOMPARE( tagsChangedSpy.at( 13 ).at( 2 ).toStringList(), QStringList() );
552552
}

0 commit comments

Comments
 (0)
Please sign in to comment.