diff options
author | David Ostrovsky <david@ostrovsky.org> | 2013-10-20 11:02:33 +0200 |
---|---|---|
committer | David Ostrovsky <david@ostrovsky.org> | 2013-10-20 11:02:37 +0200 |
commit | a8eb7a14ff4eb5adcaf169c666ff6000822670c8 (patch) | |
tree | e012ba25311d37d30305bcfb6957db770e08bf24 /connectivity/qa | |
parent | 02a11749da521e8e2099b464c0fcbebce9e95e22 (diff) |
Extend test to cover changed toString() conversion for bool types
Change-Id: I8becffd0c2f12c17495872a99192c7679380d05f
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); }} |