[Libreoffice-commits] core.git: connectivity/qa
David Ostrovsky
david at ostrovsky.org
Sun Oct 20 00:03:45 PDT 2013
connectivity/qa/connectivity/commontools/FValue_test.cxx | 24 +++++++++++++++
1 file changed, 24 insertions(+)
New commits:
commit a8eb7a14ff4eb5adcaf169c666ff6000822670c8
Author: David Ostrovsky <david at ostrovsky.org>
Date: Sun Oct 20 11:02:33 2013 +0200
Extend test to cover changed toString() conversion for bool types
Change-Id: I8becffd0c2f12c17495872a99192c7679380d05f
diff --git a/connectivity/qa/connectivity/commontools/FValue_test.cxx b/connectivity/qa/connectivity/commontools/FValue_test.cxx
index b460f64..73b8af5 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);
}}
More information about the Libreoffice-commits
mailing list