basic/qa/cppunit/test_scanner.cxx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
New commits: commit 36b658d38930b8aca7e16f7a6b286ca1b3e7a215 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sun Nov 29 15:33:52 2015 +0100 generate better unit test assert message Change-Id: Ibba7f18fefb4f2851472a6ae0b41447237a6b97f Reviewed-on: https://gerrit.libreoffice.org/20270 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/basic/qa/cppunit/test_scanner.cxx b/basic/qa/cppunit/test_scanner.cxx index 2927e6e..ec5836e 100644 --- a/basic/qa/cppunit/test_scanner.cxx +++ b/basic/qa/cppunit/test_scanner.cxx @@ -67,12 +67,12 @@ namespace CPPUNIT_TEST_SUITE_END(); }; - static const char cr[] = "\n"; - static const char rem[] = "REM"; - static const char asdf[] = "asdf"; - static const char dot[] = "."; - static const char goto_[] = "goto"; - static const char excl[] = "!"; + static const OUString cr = "\n"; + static const OUString rem = "REM"; + static const OUString asdf = "asdf"; + static const OUString dot = "."; + static const OUString goto_ = "goto"; + static const OUString excl = "!"; std::vector<Symbol> getSymbols(const OUString& source, sal_Int32& errors, bool bCompatible = false) { @@ -118,14 +118,14 @@ namespace CPPUNIT_ASSERT(symbols.empty()); symbols = getSymbols(source2); - CPPUNIT_ASSERT(symbols.size() == 1); - CPPUNIT_ASSERT(symbols[0].text == cr); - CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); + CPPUNIT_ASSERT_EQUAL(symbols.size(), size_t(1)); + CPPUNIT_ASSERT_EQUAL(symbols[0].text, cr); + CPPUNIT_ASSERT_EQUAL(symbols[0].type, SbxVARIANT); symbols = getSymbols(source3); - CPPUNIT_ASSERT(symbols.size() == 1); - CPPUNIT_ASSERT(symbols[0].text == cr); - CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); + CPPUNIT_ASSERT_EQUAL(symbols.size(), size_t(1)); + CPPUNIT_ASSERT_EQUAL(symbols[0].text, cr); + CPPUNIT_ASSERT_EQUAL(symbols[0].type, SbxVARIANT); symbols = getSymbols(source4); CPPUNIT_ASSERT(symbols.size() == 1); @@ -579,7 +579,7 @@ namespace CPPUNIT_ASSERT(symbols.size() == 3); CPPUNIT_ASSERT(symbols[0].number == 1.2); CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE); - CPPUNIT_ASSERT(rtl::math::round( symbols[1].number, 12) == rtl::math::round( .3, 12)); + CPPUNIT_ASSERT_EQUAL(rtl::math::round( .3, 12), rtl::math::round( symbols[1].number, 12)); CPPUNIT_ASSERT(symbols[1].type == SbxDOUBLE); CPPUNIT_ASSERT(symbols[2].text == cr); CPPUNIT_ASSERT(errors == 1); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits