D14978: Add unit test that checks Format data

Christoph Cullmann noreply at phabricator.kde.org
Tue Aug 21 20:02:34 BST 2018


cullmann added a comment.


  Btw., the test is a bit easier to read with:
  
    // collect all formats, shall be numbered from 1..
    QSet<int> formatIds;
    for (auto d : qAsConst(includedDefs)) {
        const auto formats = d.formats();
        for (const auto format : formats) {
            // no duplicates
            QVERIFY(!formatIds.contains(format.id()));
            formatIds.insert(format.id());
        }
    }
    
    // ensure all ids are there from 1..size
    for (int i = 1; i <= formatIds.size(); ++i) {
        printf ("id %d\n", i);
        QVERIFY(formatIds.contains(i));
    }

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D14978

To: dhaumann, cullmann
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20180821/378ac2fc/attachment.html>


More information about the KWrite-Devel mailing list