| 567 | } |
| 568 | |
| 569 | void testWorkspace_twoRootTree() { |
| 570 | auto tree = makeTwoRootTree(); |
| 571 | QStandardItemModel model; |
| 572 | buildWorkspaceModel(&model, tree, "TwoRoot.rcx"); |
| 573 | |
| 574 | QCOMPARE(model.rowCount(), 1); |
| 575 | QStandardItem* project = model.item(0); |
| 576 | |
| 577 | // 2 root struct children: Alpha and Bravo |
| 578 | QCOMPARE(project->rowCount(), 2); |
| 579 | QVERIFY(project->child(0)->text().contains("Alpha")); |
| 580 | QVERIFY(project->child(1)->text().contains("Bravo")); |
| 581 | |
| 582 | // Each has 1 field child |
| 583 | QCOMPARE(project->child(0)->rowCount(), 1); |
| 584 | QVERIFY(project->child(0)->child(0)->text().contains("flagsA")); |
| 585 | QCOMPARE(project->child(1)->rowCount(), 1); |
| 586 | QVERIFY(project->child(1)->child(0)->text().contains("flagsB")); |
| 587 | } |
| 588 | |
| 589 | void testWorkspace_richTree_rootCount() { |
| 590 | auto tree = makeRichTree(); |
nothing calls this directly
no test coverage detected