Skip to content

Commit

Permalink
Apply the Cluetrust GPXData 1.0 schema (#29)
Browse files Browse the repository at this point in the history
Also corrected the name of the diagnostic output files from the
Garmin Acceleration Extension tests.
  • Loading branch information
pcolby committed Jan 5, 2015
1 parent 7daab96 commit e63426f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/polar/v2/testtrainingsession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -925,14 +925,12 @@ void TestTrainingSession::toGPX_Cluetrust()

// Validate the generated document against the relevant XML schema.
gpx.documentElement().removeAttribute(QLatin1String("xsi:schemaLocation"));
QFile xsd(QFINDTESTDATA("schemata/gpx.xsd"));
QFile xsd(QFINDTESTDATA("schemata/gpxdata10.xsd")); // Imports gpx.xsd too.
QVERIFY(xsd.open(QIODevice::ReadOnly));
QXmlSchema schema;
QVERIFY(schema.load(&xsd, QUrl::fromLocalFile(xsd.fileName())));
QXmlSchemaValidator validator(schema);
QVERIFY(validator.validate(gpx.toByteArray()));

/// @todo Validate against Cluetrust GPXData schema.
}

void TestTrainingSession::toGPX_GarminAcceleration_data()
Expand Down Expand Up @@ -972,7 +970,7 @@ void TestTrainingSession::toGPX_GarminAcceleration()

// Write the result to an XML file for optional post-mortem investigations.
#ifdef Q_OS_WIN
QFile file(QString::fromLatin1("polar/v2/testdata/%1.garmin-acceleration.gpx")
QFile file(QString::fromLatin1("polar/v2/testdata/%1.result.garmin-acceleration.gpx")
#else
QFile file(QString::fromLatin1("../polar/v2/testdata/%1.result.garmin-acceleration.gpx")
#endif
Expand Down

0 comments on commit e63426f

Please sign in to comment.