Generate 3 problems, all with different paths, different severity Also generates a problem with diagnostics
| 588 | // Generate 3 problems, all with different paths, different severity |
| 589 | // Also generates a problem with diagnostics |
| 590 | void TestFilteredProblemStore::generateProblems() |
| 591 | { |
| 592 | IProblem::Ptr p1(new DetectedProblem()); |
| 593 | IProblem::Ptr p2(new DetectedProblem()); |
| 594 | IProblem::Ptr p3(new DetectedProblem()); |
| 595 | IProblem::Ptr p4(new DetectedProblem()); |
| 596 | IProblem::Ptr p5(new DetectedProblem()); |
| 597 | IProblem::Ptr p6(new DetectedProblem()); |
| 598 | |
| 599 | DocumentRange r1; |
| 600 | r1.document = IndexedString("/just/a/random/path"); |
| 601 | |
| 602 | p1->setDescription(QStringLiteral("PROBLEM1")); |
| 603 | p1->setSeverity(IProblem::Error); |
| 604 | p1->setFinalLocation(r1); |
| 605 | |
| 606 | DocumentRange r2; |
| 607 | r2.document = IndexedString("/just/another/path"); |
| 608 | |
| 609 | p2->setDescription(QStringLiteral("PROBLEM2")); |
| 610 | p2->setSeverity(IProblem::Warning); |
| 611 | p2->setFinalLocation(r2); |
| 612 | |
| 613 | DocumentRange r3; |
| 614 | r3.document = IndexedString("/just/another/pathy/patha"); |
| 615 | |
| 616 | p3->setDescription(QStringLiteral("PROBLEM3")); |
| 617 | p3->setSeverity(IProblem::Warning); |
| 618 | p3->setFinalLocation(r3); |
| 619 | |
| 620 | DocumentRange r4; |
| 621 | r4.document = IndexedString("/yet/another/test/path"); |
| 622 | |
| 623 | p4->setDescription(QStringLiteral("PROBLEM4")); |
| 624 | p4->setSeverity(IProblem::Hint); |
| 625 | p4->setFinalLocation(r4); |
| 626 | |
| 627 | DocumentRange r5; |
| 628 | r5.document = IndexedString("/yet/another/pathy/test/path"); |
| 629 | |
| 630 | p5->setDescription(QStringLiteral("PROBLEM5")); |
| 631 | p5->setSeverity(IProblem::Hint); |
| 632 | p5->setFinalLocation(r5); |
| 633 | |
| 634 | DocumentRange r6; |
| 635 | r6.document = IndexedString("/yet/another/test/pathy/path"); |
| 636 | |
| 637 | p6->setDescription(QStringLiteral("PROBLEM6")); |
| 638 | p6->setSeverity(IProblem::Hint); |
| 639 | p6->setFinalLocation(r6); |
| 640 | |
| 641 | |
| 642 | m_problems.push_back(p1); |
| 643 | m_problems.push_back(p2); |
| 644 | m_problems.push_back(p3); |
| 645 | m_problems.push_back(p4); |
| 646 | m_problems.push_back(p5); |
| 647 | m_problems.push_back(p6); |
nothing calls this directly
no test coverage detected