Kaydet (Commit) a8eb7a14 authored tarafından David Ostrovsky's avatar David Ostrovsky

Extend test to cover changed toString() conversion for bool types

Change-Id: I8becffd0c2f12c17495872a99192c7679380d05f
üst 02a11749
......@@ -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);
}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment