diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-03-04 13:26:48 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-03-04 13:27:11 -0500 |
commit | 02c94d293d3babfad45321d89a71315df491dd90 (patch) | |
tree | 61246fef04efee8ab9ae620284b8ece3ad3cb8b3 | |
parent | 58310ae426a3211746dc91656527afefc740b795 (diff) |
Better error output in case something goes wrong during unit test.
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 5b9a2d26ad56..358c4f10784c 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -99,6 +99,7 @@ using namespace ::com::sun::star; using ::rtl::OUString; using ::rtl::OUStringBuffer; using ::std::cout; +using ::std::cerr; using ::std::endl; using ::std::vector; @@ -796,7 +797,12 @@ void Test::testDataPilot() if (p) { OUString aCheckVal = OUString::createFromAscii(p); - CPPUNIT_ASSERT_MESSAGE("Unexpected cell content.", aCheckVal.equals(aVal)); + bool bEqual = aCheckVal.equals(aVal); + if (!bEqual) + { + cerr << "Expected: " << aCheckVal << " Actual: " << aVal << endl; + CPPUNIT_ASSERT_MESSAGE("Unexpected cell content.", false); + } } else CPPUNIT_ASSERT_MESSAGE("Empty cell expected.", aVal.Len() == 0); |