summaryrefslogtreecommitdiffstats
path: root/connectivity/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-12-12 15:31:35 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-12-12 18:02:57 +0000
commit385f6240278b38643894158d2eb7001f25fc965b (patch)
treef971df1481b714bd2f95c06bef997cf49e02243d /connectivity/qa
parentUpdated core (diff)
downloadcore-385f6240278b38643894158d2eb7001f25fc965b.tar.gz
core-385f6240278b38643894158d2eb7001f25fc965b.zip
Prevent use of ORowSetValue with sal_Bool as TINYINT
sal_Bool and sal_uInt8 are typedefs for the same underlying type, so any use of ORowSetValue with sal_Bool instead of bool, apparently intending to treat the value as a boolean, actually treated it as a TINYINT. (See e.g. recent 7b0c57b2faec875c790051d233d1e9abaed2a3bc "some compilers don't like implicit bool-to-ORowSetValue conversion".) Now that there's no way to create a sal_uInt8 ORowSetValue, getUInt8 and the m_uInt8 union member can probably go away, too. Change-Id: Ia27554f76e7e9edce6410284b578064573e54fd3 Reviewed-on: https://gerrit.libreoffice.org/31909 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity/qa')
-rw-r--r--connectivity/qa/connectivity/commontools/FValue_test.cxx23
1 files changed, 0 insertions, 23 deletions
diff --git a/connectivity/qa/connectivity/commontools/FValue_test.cxx b/connectivity/qa/connectivity/commontools/FValue_test.cxx
index c90fa588fa5b..036fbbc3ca5f 100644
--- a/connectivity/qa/connectivity/commontools/FValue_test.cxx
+++ b/connectivity/qa/connectivity/commontools/FValue_test.cxx
@@ -34,7 +34,6 @@ public:
void test_Bool();
void test_Int8();
- void test_uInt8();
void test_Int16();
void test_uInt16();
@@ -58,7 +57,6 @@ public:
CPPUNIT_TEST(test_Bool);
CPPUNIT_TEST(test_Int8);
- CPPUNIT_TEST(test_uInt8);
CPPUNIT_TEST(test_Int16);
CPPUNIT_TEST(test_uInt16);
@@ -120,27 +118,6 @@ void FValueTest::test_Int8()
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8 conversion from Any didn't work", trg_salInt8, src_salInt8);
}
-void FValueTest::test_uInt8()
-{
- sal_uInt8 src_saluInt8 = 255;
- ORowSetValue v(src_saluInt8);
- sal_uInt8 trg_saluInt8 = v.getUInt8();
-
- std::cerr << "src_saluInt8: " << static_cast<short>(src_saluInt8) << std::endl;
- std::cerr << "trg_saluInt8: " << static_cast<short>(trg_saluInt8) << std::endl;
-
- CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt8 conversion to ORowSetValue didn't work", trg_saluInt8, src_saluInt8);
-
- Any any_uInt8 = v.makeAny();
- ORowSetValue t;
- t.fill(any_uInt8);
- trg_saluInt8 = t.getUInt8();
-
- std::cerr << "trg_saluInt8: " << static_cast<short>(trg_saluInt8) << std::endl;
-
- CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt8 conversion from Any didn't work", trg_saluInt8, src_saluInt8);
-}
-
void FValueTest::test_Int16()
{
sal_Int16 src_salInt16 = -10001;