diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-10-14 17:59:10 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-21 13:18:47 +0000 |
commit | 1129d2bfa825a73dc0a619fa3e45a277eaffcb86 (patch) | |
tree | c60e5c615a267444103a2651b5cb02ca89c8f1bc /connectivity/qa | |
parent | 11726693c3d57e86e391f60370f1b42030ef69ea (diff) |
fdo#68657 bool->string conversion to 1/0, not "true"/"false
This matches what OO.org / older versions of LibreOffice did, and which was inadvertently changed in 2bd856e6
Change-Id: I1d45ea975a096c599a996caafc41e4aa06d35fcd
Reviewed-on: https://gerrit.libreoffice.org/6274
Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'connectivity/qa')
-rw-r--r-- | connectivity/qa/connectivity/commontools/FValue_test.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/connectivity/qa/connectivity/commontools/FValue_test.cxx b/connectivity/qa/connectivity/commontools/FValue_test.cxx index b460f646ded5..73b8af5f821f 100644 --- a/connectivity/qa/connectivity/commontools/FValue_test.cxx +++ b/connectivity/qa/connectivity/commontools/FValue_test.cxx @@ -46,6 +46,8 @@ public: void test_float(); void test_double(); + void test_getString(); + CPPUNIT_TEST_SUITE(FValueTest); CPPUNIT_TEST(test_Bool); @@ -65,6 +67,7 @@ public: CPPUNIT_TEST(test_float); CPPUNIT_TEST(test_double); + CPPUNIT_TEST(test_getString); CPPUNIT_TEST_SUITE_END(); }; @@ -283,6 +286,27 @@ void FValueTest::test_double() CPPUNIT_ASSERT_MESSAGE("double conversion from Any didn't work", src_double == trg_double); } +void FValueTest::test_getString() +{ + bool src_bool_1 = true; + ORowSetValue v_1(src_bool_1); + OUString trg_bool_1 = v_1.getString(); + + std::cerr << "src_bool_1" << src_bool_1 << std::endl; + std::cerr << "trg_bool_1: " << trg_bool_1 << std::endl; + + CPPUNIT_ASSERT_MESSAGE("bool to string conversion to ORowSetValue didn't work", trg_bool_1 == "1"); + + bool src_bool_0 = false; + ORowSetValue v_0(src_bool_0); + OUString trg_bool_0 = v_0.getString(); + + std::cerr << "src_bool_0" << src_bool_0 << std::endl; + std::cerr << "trg_bool_0: " << trg_bool_0 << std::endl; + + CPPUNIT_ASSERT_MESSAGE("bool to string conversion to ORowSetValue didn't work", trg_bool_0 == "0"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(FValueTest); }} |