Changeset ec20d36f in subsurface


Ignore:
Timestamp:
Feb 9, 2017, 10:22:12 PM (5 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
032c325
Parents:
e8923a9
git-author:
Dirk Hohndel <dirk@…> (02/09/17 22:16:08)
git-committer:
Dirk Hohndel <dirk@…> (02/09/17 22:22:12)
Message:

Add test for merging multiple cylinders

Signed-off-by: Dirk Hohndel <dirk@…>

Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • tests/testparse.cpp

    r8f97c4a8 rec20d36f  
    420420}
    421421
     422void TestParse::testParseMerge()
     423{
     424        /*
     425         * check that we correctly merge mixed cylinder dives
     426         */
     427        QCOMPARE(parse_file(SUBSURFACE_SOURCE "/dives/ostc.xml"), 0);
     428        QCOMPARE(parse_file(SUBSURFACE_SOURCE "/dives/vyper.xml"), 0);
     429        QCOMPARE(save_dives("./testmerge.ssrf"), 0);
     430        QFile org(SUBSURFACE_SOURCE "/dives/mergedVyperOstc.xml");
     431        org.open(QFile::ReadOnly);
     432        QFile out("./testmerge.ssrf");
     433        out.open(QFile::ReadOnly);
     434        QTextStream orgS(&org);
     435        QTextStream outS(&out);
     436        QStringList readin = orgS.readAll().split("\n");
     437        QStringList written = outS.readAll().split("\n");
     438        while(readin.size() && written.size()){
     439                QCOMPARE(readin.takeFirst(), written.takeFirst());
     440        }
     441        clear_dive_file_data();
     442}
     443
    422444QTEST_GUILESS_MAIN(TestParse)
  • tests/testparse.h

    r27b4ef32 rec20d36f  
    2121        void testParseDLD();
    2222        void testParseCompareDLDOutput();
     23        void testParseMerge();
    2324};
    2425
Note: See TracChangeset for help on using the changeset viewer.