[Libreoffice-commits] core.git: cppu/qa

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Mon Feb 8 14:59:51 UTC 2021


 cppu/qa/test_any.cxx |   37 ++++++++-----------------------------
 1 file changed, 8 insertions(+), 29 deletions(-)

New commits:
commit 896800a7091c2f7d7fc70efaf87b0741dead33bb
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Feb 8 15:04:13 2021 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Feb 8 15:59:10 2021 +0100

    sal_Unicode is always char16_t in LIBO_INTERNAL_ONLY code now
    
    ...since 9ac98e6e3488e434bf4864ecfb13a121784f640b "Finally switch MSVC to
    sal_Unicode = char16_t, too"
    
    Change-Id: I0df169307618aba3f609400312737c6e1e1d3aaf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110581
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx
index 06fa51168b64..de640099f1dc 100644
--- a/cppu/qa/test_any.cxx
+++ b/cppu/qa/test_any.cxx
@@ -20,7 +20,6 @@
 #include <sal/types.h>
 
 #include <stdlib.h>
-#include <type_traits>
 
 #include <cppunit/TestFixture.h>
 #include <cppunit/plugin/TestPlugIn.h>
@@ -498,13 +497,8 @@ void Test::testByte() {
     }
     {
         sal_Unicode b = '2';
-        if (std::is_same< sal_Unicode, sal_uInt16 >::value) {
-            CPPUNIT_ASSERT_MESSAGE("@sal_Unicode", (a >>= b));
-            CPPUNIT_ASSERT_EQUAL_MESSAGE("@sal_Unicode", u'\u0001', b);
-        } else {
-            CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b));
-            CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
-        }
+        CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b));
+        CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
     }
     {
         OUString b("2");
@@ -613,13 +607,8 @@ void Test::testShort() {
     }
     {
         sal_Unicode b = '2';
-        if (std::is_same< sal_Unicode, sal_uInt16 >::value) {
-            CPPUNIT_ASSERT_MESSAGE("@sal_Unicode", (a >>= b));
-            CPPUNIT_ASSERT_EQUAL_MESSAGE("@sal_Unicode", u'\u0001', b);
-        } else {
-            CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b));
-            CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
-        }
+        CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b));
+        CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
     }
     {
         OUString b("2");
@@ -730,13 +719,8 @@ void Test::testUnsignedShort() {
     }
     {
         sal_Unicode b = '2';
-        if (std::is_same< sal_Unicode, sal_uInt16 >::value) {
-            CPPUNIT_ASSERT_MESSAGE("@sal_Unicode", (a >>= b));
-            CPPUNIT_ASSERT_EQUAL_MESSAGE("@sal_Unicode", u'\u0001', b);
-        } else {
-            CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b));
-            CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
-        }
+        CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b));
+        CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
     }
     {
         OUString b("2");
@@ -1506,13 +1490,8 @@ void Test::testChar() {
     }
     {
         sal_Unicode b = '2';
-        if (std::is_same< sal_Unicode, sal_uInt16 >::value) {
-            CPPUNIT_ASSERT_MESSAGE("@sal_Unicode", !(a >>= b));
-            CPPUNIT_ASSERT_EQUAL_MESSAGE("@sal_Unicode", u'2', b);
-        } else {
-            CPPUNIT_ASSERT_MESSAGE("sal_Unicode", (a >>= b));
-            CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'1', b);
-        }
+        CPPUNIT_ASSERT_MESSAGE("sal_Unicode", (a >>= b));
+        CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'1', b);
     }
     {
         OUString b("2");


More information about the Libreoffice-commits mailing list