summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-01-18 16:49:46 +0100
committerLuboš Luňák <l.lunak@suse.cz>2013-01-28 18:28:39 +0100
commitdba8280c5667cddfd71562dc603c46c34339e685 (patch)
tree3e29e575d814acce51bc2677e2540de8c185257d /sal
parent98bb5d242ad8360ec02fd0f4dbb4d19dec59dedd (diff)
consolidate the float number tests
And remove some unneeded ones (the float actually didn't have the necessary precision on 32bit anyway). Change-Id: I52dd387fd319dd6a5b44333a71d012ebaaecbf18
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/rtl/strings/test_strings_valuex.cxx27
1 files changed, 2 insertions, 25 deletions
diff --git a/sal/qa/rtl/strings/test_strings_valuex.cxx b/sal/qa/rtl/strings/test_strings_valuex.cxx
index 9573b1970592..cbd12c5ff94f 100644
--- a/sal/qa/rtl/strings/test_strings_valuex.cxx
+++ b/sal/qa/rtl/strings/test_strings_valuex.cxx
@@ -21,16 +21,12 @@ public:
void testOInt();
void testOUFloat();
void testOFloat();
- void testOUDouble();
- void testODouble();
CPPUNIT_TEST_SUITE(valueX);
CPPUNIT_TEST(testOUInt);
CPPUNIT_TEST(testOInt);
CPPUNIT_TEST(testOUFloat);
CPPUNIT_TEST(testOFloat);
- CPPUNIT_TEST(testOUDouble);
- CPPUNIT_TEST(testODouble);
CPPUNIT_TEST_SUITE_END();
};
@@ -82,11 +78,9 @@ void test::strings::valueX::testOInt() {
template< typename T >
void testFloat() {
- T val1 = T::valueOf( 30039062.0f );
- T val2 = T::number( 30039062.0f );
- CPPUNIT_ASSERT_EQUAL( val1, val2 );
-
CPPUNIT_ASSERT_EQUAL( T( "39062.2" ), T::number( 39062.2f ));
+ CPPUNIT_ASSERT_EQUAL( T( "30039062.2" ), T::number( 30039062.2 ));
+ // long double not supported
}
void test::strings::valueX::testOUFloat() {
@@ -96,21 +90,4 @@ void test::strings::valueX::testOUFloat() {
void test::strings::valueX::testOFloat() {
testFloat<rtl::OString>();
}
-
-template< typename T >
-void testDouble() {
- T val1 = T::valueOf( 30039062.0 );
- T val2 = T::number( 30039062.0 );
- CPPUNIT_ASSERT_EQUAL( val1, val2 );
-
- CPPUNIT_ASSERT_EQUAL( T( "30039062.2" ), T::number( 30039062.2 ));
-}
-
-void test::strings::valueX::testOUDouble() {
- testDouble<rtl::OUString>();
-}
-
-void test::strings::valueX::testODouble() {
- testDouble<rtl::OString>();
-}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */