diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-02 08:14:52 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-02 08:14:52 +0200 |
commit | 4457d68912bea52d34f12224a78c3231377958af (patch) | |
tree | 5eaa5f160a911f144af570646dd0306d8862aeeb /sources/shiboken2/ApiExtractor/tests/testtoposort.cpp | |
parent | 44502f016ac69620fd5d1cf6c26a02eca5cdc8cf (diff) | |
parent | c246633b49f0551de4ae052cfe0f4f9dcdde579e (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I7fc1857f15ccf5d9667dd6d6adb8208c775c6722
Diffstat (limited to 'sources/shiboken2/ApiExtractor/tests/testtoposort.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/tests/testtoposort.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sources/shiboken2/ApiExtractor/tests/testtoposort.cpp b/sources/shiboken2/ApiExtractor/tests/testtoposort.cpp index 9d7729513..c59fa8c3d 100644 --- a/sources/shiboken2/ApiExtractor/tests/testtoposort.cpp +++ b/sources/shiboken2/ApiExtractor/tests/testtoposort.cpp @@ -33,23 +33,22 @@ void TestTopoSort::testTopoSort() { - QLinkedList<int> result; { Graph g(3); g.addEdge(1, 2); g.addEdge(0, 1); - result = g.topologicalSort(); + const auto result = g.topologicalSort(); QCOMPARE(result.size(), 3); - QLinkedList<int>::iterator it = result.begin(); + auto it = result.begin(); QCOMPARE(*it, 0); QCOMPARE(*(++it), 1); QCOMPARE(*(++it), 2); } { Graph g(2); - result = g.topologicalSort(); + const auto result = g.topologicalSort(); QCOMPARE(result.size(), 2); - QLinkedList<int>::iterator it = result.begin(); + auto it = result.begin(); QCOMPARE(*it, 1); QCOMPARE(*(++it), 0); } @@ -61,7 +60,7 @@ void TestTopoSort::testCiclicGraph() g.addEdge(0, 1); g.addEdge(1, 2); g.addEdge(2, 0); - QLinkedList<int> result = g.topologicalSort(); + const auto result = g.topologicalSort(); QVERIFY(result.isEmpty()); } |