Commit 067598eb authored by Guillaume Pasero's avatar Guillaume Pasero

ENH: support tolerance ratio in test kernel, small refac

parent 87904a08
...@@ -60,38 +60,45 @@ public: ...@@ -60,38 +60,45 @@ public:
typedef std::vector<std::string> StringList; typedef std::vector<std::string> StringList;
typedef StringList::const_iterator StringListIt; typedef StringList::const_iterator StringListIt;
typedef std::vector<double> EpsilonList;
typedef EpsilonList::const_iterator EpsilonListIt;
TestHelper(); TestHelper();
~TestHelper() override; ~TestHelper() override;
int RegressionTestAllImages(const StringList& baselineFilenamesImage, int RegressionTestAllImages(const StringList& baselineFilenamesImage,
const StringList& testFilenamesImage); const StringList& testFilenamesImage,
const EpsilonList& epsilons);
int RegressionTestAllMetaData(const StringList& baselineFilenamesMetaData, int RegressionTestAllMetaData(const StringList& baselineFilenamesMetaData,
const StringList& testFilenamesMetaData); const StringList& testFilenamesMetaData,
const EpsilonList& epsilons);
int RegressionTestAllAscii(const StringList& baselineFilenamesAscii, int RegressionTestAllAscii(const StringList& baselineFilenamesAscii,
const StringList& testFilenamesAscii, const StringList& testFilenamesAscii,
const EpsilonList& epsilons,
const StringList& ignoredLines); const StringList& ignoredLines);
int RegressionTestAllDiff(const StringList& baselineFilenamesAscii, int RegressionTestAllDiff(const StringList& baselineFilenamesAscii,
const StringList& testFilenamesAscii, const StringList& testFilenamesAscii,
const EpsilonList& epsilons,
const StringList& ignoredLines); const StringList& ignoredLines);
int RegressionTestAllBinary(const StringList& baselineFilenamesBinary, int RegressionTestAllBinary(const StringList& baselineFilenamesBinary,
const StringList& testFilenamesBinary); const StringList& testFilenamesBinary);
int RegressionTestAllOgr(const StringList& baselineFilenamesOgr, int RegressionTestAllOgr(const StringList& baselineFilenamesOgr,
const StringList& testFilenamesOgr); const StringList& testFilenamesOgr,
const EpsilonList& epsilons);
itkSetMacro(ReportErrors, bool); itkSetMacro(ReportErrors, bool);
itkBooleanMacro(ReportErrors); itkBooleanMacro(ReportErrors);
itkSetMacro(IgnoreLineOrder, bool); itkSetMacro(IgnoreLineOrder, bool);
itkBooleanMacro(IgnoreLineOrder); itkBooleanMacro(IgnoreLineOrder);
itkSetMacro(ToleranceDiffValue, double);
itkSetMacro(Epsilon, double);
itkSetMacro(EpsilonBoundaryChecking, double); itkSetMacro(EpsilonBoundaryChecking, double);
itkSetMacro(ToleranceRatio, double);
private: private:
...@@ -157,8 +164,7 @@ private: ...@@ -157,8 +164,7 @@ private:
static void DumpOGRFeature(FILE* fileid, OGRFeature* feature, char** papszOptions = nullptr); static void DumpOGRFeature(FILE* fileid, OGRFeature* feature, char** papszOptions = nullptr);
static void DumpOGRGeometry(FILE* fileid, OGRGeometry* geometry, const char * pszPrefix, char** papszOptions = nullptr); static void DumpOGRGeometry(FILE* fileid, OGRGeometry* geometry, const char * pszPrefix, char** papszOptions = nullptr);
double m_ToleranceDiffValue; double m_ToleranceRatio;
double m_Epsilon;
double m_EpsilonBoundaryChecking; double m_EpsilonBoundaryChecking;
bool m_ReportErrors; bool m_ReportErrors;
bool m_IgnoreLineOrder; bool m_IgnoreLineOrder;
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment