Skip to content

Commit 8305bda

Browse files
committed
Fix unit test
1 parent daa4038 commit 8305bda

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

tests/src/app/testqgsappbrowserproviders.cpp

+15-15
Original file line numberDiff line numberDiff line change
@@ -104,26 +104,26 @@ void TestQgsAppBrowserProviders::testProjectItemCreation()
104104
{
105105
child->populate( true );
106106

107-
QCOMPARE( child->children().count(), 4 );
108-
QVERIFY( dynamic_cast< QgsProjectLayerTreeGroupItem * >( child->children().at( 0 ) ) );
109-
QCOMPARE( child->children().at( 0 )->name(), QStringLiteral( "groupwithoutshortname" ) );
107+
QCOMPARE( child->children().count(), 7 );
108+
QVERIFY( dynamic_cast< QgsProjectLayerTreeGroupItem * >( child->children().at( 2 ) ) );
109+
QCOMPARE( child->children().at( 2 )->name(), QStringLiteral( "groupwithoutshortname" ) );
110110

111-
QCOMPARE( child->children().at( 0 )->children().count(), 1 );
112-
QVERIFY( dynamic_cast< QgsLayerItem * >( child->children().at( 0 )->children().at( 0 ) ) );
113-
QCOMPARE( child->children().at( 0 )->children().at( 0 )->name(), QStringLiteral( "testlayer3" ) );
111+
QCOMPARE( child->children().at( 2 )->children().count(), 1 );
112+
QVERIFY( dynamic_cast< QgsLayerItem * >( child->children().at( 2 )->children().at( 0 ) ) );
113+
QCOMPARE( child->children().at( 2 )->children().at( 0 )->name(), QStringLiteral( "testlayer3" ) );
114114

115-
QVERIFY( dynamic_cast< QgsProjectLayerTreeGroupItem * >( child->children().at( 1 ) ) );
116-
QCOMPARE( child->children().at( 1 )->name(), QStringLiteral( "groupwithshortname" ) );
115+
QVERIFY( dynamic_cast< QgsProjectLayerTreeGroupItem * >( child->children().at( 3 ) ) );
116+
QCOMPARE( child->children().at( 3 )->name(), QStringLiteral( "groupwithshortname" ) );
117117

118-
QCOMPARE( child->children().at( 1 )->children().count(), 1 );
119-
QVERIFY( dynamic_cast< QgsLayerItem * >( child->children().at( 1 )->children().at( 0 ) ) );
120-
QCOMPARE( child->children().at( 1 )->children().at( 0 )->name(), QStringLiteral( "testlayer2" ) );
118+
QCOMPARE( child->children().at( 3 )->children().count(), 1 );
119+
QVERIFY( dynamic_cast< QgsLayerItem * >( child->children().at( 3 )->children().at( 0 ) ) );
120+
QCOMPARE( child->children().at( 3 )->children().at( 0 )->name(), QStringLiteral( "testlayer2" ) );
121121

122-
QVERIFY( dynamic_cast< QgsLayerItem * >( child->children().at( 2 ) ) );
123-
QCOMPARE( child->children().at( 2 )->name(), QStringLiteral( "testlayer" ) );
122+
QVERIFY( dynamic_cast< QgsLayerItem * >( child->children().at( 5 ) ) );
123+
QCOMPARE( child->children().at( 5 )->name(), QStringLiteral( "testlayer" ) );
124124

125-
QVERIFY( dynamic_cast< QgsLayerItem * >( child->children().at( 3 ) ) );
126-
QCOMPARE( child->children().at( 3 )->name(), QStringLiteral( "testlayer \u00E8\u00E9" ) );
125+
QVERIFY( dynamic_cast< QgsLayerItem * >( child->children().at( 6 ) ) );
126+
QCOMPARE( child->children().at( 6 )->name(), QStringLiteral( "testlayer \u00E8\u00E9" ) );
127127

128128
delete dirItem;
129129
return;

0 commit comments

Comments
 (0)