diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-04-27 13:50:37 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-04-27 13:52:10 +0200 |
commit | 60d39b758dc9308d6ce7464875b3a17f26be3d79 (patch) | |
tree | b0708313ae88484eff0ddf1960bf77af2dc31d9c /sc/qa/extras/regression-test.cxx | |
parent | 7fd546207223f3a5d86f4d9399df52da9fbb9c23 (diff) |
add tolerance to chart regression test
Change-Id: I5e7694571815df48e54488a33435bb7d022e6889
Diffstat (limited to 'sc/qa/extras/regression-test.cxx')
-rw-r--r-- | sc/qa/extras/regression-test.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/qa/extras/regression-test.cxx b/sc/qa/extras/regression-test.cxx index 77a7557baa53..2c281058b864 100644 --- a/sc/qa/extras/regression-test.cxx +++ b/sc/qa/extras/regression-test.cxx @@ -65,14 +65,15 @@ using namespace ::com::sun::star::uno; namespace { -bool checkDumpAgainstFile( const rtl::OUString& rDump, const rtl::OUString aFilePath ) +bool checkDumpAgainstFile( const rtl::OUString& rDump, const rtl::OUString aFilePath, const rtl::OUString& rToleranceFile) { rtl::OString aOFile = rtl::OUStringToOString(aFilePath, RTL_TEXTENCODING_UTF8); + rtl::OString aToleranceFile = rtl::OUStringToOString(rToleranceFile, RTL_TEXTENCODING_UTF8); CPPUNIT_ASSERT_MESSAGE("dump is empty", !rDump.isEmpty()); rtl::OString aDump = rtl::OUStringToOString(rDump, RTL_TEXTENCODING_UTF8); - XMLDiff aDiff(aOFile.getStr(), aDump.getStr(),static_cast<int>(rDump.getLength())); + XMLDiff aDiff(aOFile.getStr(), aDump.getStr(),static_cast<int>(rDump.getLength()), aToleranceFile.getStr()); return aDiff.compare(); } @@ -148,7 +149,7 @@ void ScChartRegressionTest::test() rtl::OUString aDump = xDumper->dump(); std::cout << aDump; - bool bCompare = checkDumpAgainstFile( aDump, getPathFromSrc("/chart2/qa/unit/data/reference/testChart.xml") ); + bool bCompare = checkDumpAgainstFile( aDump, getPathFromSrc("/chart2/qa/unit/data/reference/testChart.xml"), getPathFromSrc("/chart2/qa/unit/data/tolerance.xml") ); CPPUNIT_ASSERT(bCompare); } |