6a988b7
From 7c15ffd4e3bf002c3d4edd758bb3af27b1f6a34e Mon Sep 17 00:00:00 2001
6a988b7
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
6a988b7
Date: Tue, 22 Nov 2022 13:09:17 +0000
6a988b7
Subject: [PATCH] Related: rhbz#2136459 use a value which is exactly
6a988b7
 representable as a float
6a988b7
MIME-Version: 1.0
6a988b7
Content-Type: text/plain; charset=UTF-8
6a988b7
Content-Transfer-Encoding: 8bit
6a988b7
6a988b7
20 builds in a row with the old value all succeeded for me on F38 anyway,
6a988b7
so if the problem still exists this almost certainly doesn't do anything.
6a988b7
But it's nice for debugging to use something that is printed the same by a debugger as seen in the source.
6a988b7
6a988b7
also see: tdf#125978
6a988b7
6a988b7
Change-Id: I42dc5f18c22acc006bffb57578bacb65dbc16013
6a988b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143116
6a988b7
Tested-by: Jenkins
6a988b7
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
6a988b7
---
6a988b7
 stoc/test/testiadapter.cxx                             | 2 +-
6a988b7
 testtools/source/bridgetest/bridgetest.cxx             | 8 ++++----
6a988b7
 testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx | 8 ++++----
6a988b7
 testtools/source/bridgetest/cli/cli_cs_bridgetest.cs   | 8 ++++----
6a988b7
 testtools/source/bridgetest/cli/cli_vb_bridgetest.vb   | 8 ++++----
6a988b7
 5 files changed, 17 insertions(+), 17 deletions(-)
6a988b7
6a988b7
diff --git a/stoc/test/testiadapter.cxx b/stoc/test/testiadapter.cxx
6a988b7
index d9fd9560c13a..ca5afc4029f4 100644
6a988b7
--- a/stoc/test/testiadapter.cxx
6a988b7
+++ b/stoc/test/testiadapter.cxx
6a988b7
@@ -750,7 +750,7 @@ sal_Bool performTest( const Reference<XLanguageBindingTest > & xLBT )
6a988b7
                 sal_True, '@', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
6a988b7
                 SAL_CONST_INT64(0x123456789abcdef0),
6a988b7
                 SAL_CONST_UINT64(0xfedcba9876543210),
6a988b7
-                (float)17.0815, M_PI, TestEnum_LOLA, OUString("dumdidum"), xI,
6a988b7
+                (float)17.03125, M_PI, TestEnum_LOLA, OUString("dumdidum"), xI,
6a988b7
                 Any( &xI, cppu::UnoType<XInterface>::get()) );
6a988b7
 
6a988b7
         OSL_ENSURE( aData.Any == xI, "### unexpected any!" );
6a988b7
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
6a988b7
index 6067e3a5235a..7de0ee794720 100644
6a988b7
--- a/testtools/source/bridgetest/bridgetest.cxx
6a988b7
+++ b/testtools/source/bridgetest/bridgetest.cxx
6a988b7
@@ -376,7 +376,7 @@ static bool performTest(
6a988b7
         assign(
6a988b7
             static_cast<TestElement &>(aData), true, '@', 17, 0x1234, 0xFEDC,
6a988b7
             0x12345678, 0xFEDCBA98, SAL_CONST_INT64(0x123456789ABCDEF0),
6a988b7
-            SAL_CONST_UINT64(0xFEDCBA9876543210), 17.0815f, M_PI,
6a988b7
+            SAL_CONST_UINT64(0xFEDCBA9876543210), 17.03125f, M_PI,
6a988b7
             TestEnum_LOLA, STRING_TEST_CONSTANT, 18, 0x5678, xI,
6a988b7
             Any(&xI, cppu::UnoType<XInterface>::get()));
6a988b7
         bRet &= check(aData.Any == xI, "### unexpected any!");
6a988b7
@@ -732,19 +732,19 @@ static bool performTest(
6a988b7
         assign(
6a988b7
             _arStruct[0], true, '@', 17, 0x1234, 0xFEDC, 0x12345678, 0xFEDCBA98,
6a988b7
             SAL_CONST_INT64(0x123456789ABCDEF0),
6a988b7
-            SAL_CONST_UINT64(0xFEDCBA9876543210), 17.0815f, M_PI,
6a988b7
+            SAL_CONST_UINT64(0xFEDCBA9876543210), 17.03125f, M_PI,
6a988b7
             TestEnum_LOLA, STRING_TEST_CONSTANT, 18, 0x5678, _arObj[0],
6a988b7
             Any(&_arObj[0], cppu::UnoType<XInterface>::get()));
6a988b7
         assign(
6a988b7
             _arStruct[1], true, 'A', 17, 0x1234, 0xFEDC, 0x12345678, 0xFEDCBA98,
6a988b7
             SAL_CONST_INT64(0x123456789ABCDEF0),
6a988b7
-            SAL_CONST_UINT64(0xFEDCBA9876543210), 17.0815f, M_PI,
6a988b7
+            SAL_CONST_UINT64(0xFEDCBA9876543210), 17.03125f, M_PI,
6a988b7
             TestEnum_TWO, STRING_TEST_CONSTANT, 18, 0x5678, _arObj[1],
6a988b7
             Any(&_arObj[1], cppu::UnoType<XInterface>::get()));
6a988b7
         assign(
6a988b7
             _arStruct[2], true, 'B', 17, 0x1234, 0xFEDC, 0x12345678, 0xFEDCBA98,
6a988b7
             SAL_CONST_INT64(0x123456789ABCDEF0),
6a988b7
-            SAL_CONST_UINT64(0xFEDCBA9876543210), 17.0815f, M_PI,
6a988b7
+            SAL_CONST_UINT64(0xFEDCBA9876543210), 17.03125f, M_PI,
6a988b7
             TestEnum_CHECK, STRING_TEST_CONSTANT, 18, 0x5678, _arObj[2],
6a988b7
             Any(&_arObj[2], cppu::UnoType<XInterface>::get()));
6a988b7
         {
6a988b7
diff --git a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx
6a988b7
index 04d9b3066f62..8f2f1a0cf675 100644
6a988b7
--- a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx
6a988b7
+++ b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx
6a988b7
@@ -376,7 +376,7 @@ static bool performTest(XBridgeTest* xLBT)
6a988b7
         assign( static_cast<TestElement*>(aData),
6a988b7
                 true, '@', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
6a988b7
                 0x123456789abcdef0, 0xfedcba9876543210,
6a988b7
-                17.0815f, M_PI, TestEnum::LOLA,
6a988b7
+                17.03125f, M_PI, TestEnum::LOLA,
6a988b7
                 Constants::STRING_TEST_CONSTANT, xI,
6a988b7
                 aAny);
6a988b7
 
6a988b7
@@ -651,15 +651,15 @@ static bool performSequenceTest(XBridgeTest* xBT)
6a988b7
     arStruct[0] = new TestElement(); arStruct[1] = new TestElement();
6a988b7
     arStruct[2] = new TestElement();
6a988b7
     assign( arStruct[0], true, '@', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
6a988b7
-             0x123456789abcdef0, 0xfedcba9876543210, 17.0815f, M_PI,
6a988b7
+             0x123456789abcdef0, 0xfedcba9876543210, 17.03125f, M_PI,
6a988b7
             TestEnum::LOLA, Constants::STRING_TEST_CONSTANT, 18, 0x5678, arObject[0],
6a988b7
             Any( __typeof(Object),  arObject[0]) );
6a988b7
     assign( arStruct[1], true, 'A', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
6a988b7
-            0x123456789abcdef0, 0xfedcba9876543210, 17.0815f, M_PI,
6a988b7
+            0x123456789abcdef0, 0xfedcba9876543210, 17.03125f, M_PI,
6a988b7
             TestEnum::TWO, Constants::STRING_TEST_CONSTANT, 18, 0x5678, arObject[1],
6a988b7
             Any( __typeof(Object), arObject[1]) );
6a988b7
     assign( arStruct[2], true, 'B', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
6a988b7
-            0x123456789abcdef0, 0xfedcba9876543210, 17.0815f, M_PI,
6a988b7
+            0x123456789abcdef0, 0xfedcba9876543210, 17.03125f, M_PI,
6a988b7
             TestEnum::CHECK, Constants::STRING_TEST_CONSTANT, 18, 0x5678, arObject[2],
6a988b7
             Any( __typeof(Object), arObject[2] ) );
6a988b7
     {
6a988b7
diff --git a/testtools/source/bridgetest/cli/cli_cs_bridgetest.cs b/testtools/source/bridgetest/cli/cli_cs_bridgetest.cs
6a988b7
index 3552f3f730af..6774821c378e 100644
6a988b7
--- a/testtools/source/bridgetest/cli/cli_cs_bridgetest.cs
6a988b7
+++ b/testtools/source/bridgetest/cli/cli_cs_bridgetest.cs
6a988b7
@@ -366,7 +366,7 @@ bool performTest(XBridgeTest xLBT)
6a988b7
     assign( (TestElement)aData,
6a988b7
             true, '@', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
6a988b7
             0x123456789abcdef0, 0xfedcba9876543210,
6a988b7
-            17.0815f, 3.1415926359, TestEnum.LOLA,
6a988b7
+            17.03125f, 3.1415926359, TestEnum.LOLA,
6a988b7
             Constants.STRING_TEST_CONSTANT, xI,
6a988b7
             aAny);
6a988b7
 
6a988b7
@@ -719,15 +719,15 @@ static bool performSequenceTest(XBridgeTest xBT)
6a988b7
     TestElement[] arStruct = {new TestElement(), new TestElement(),
6a988b7
                                new TestElement()};
6a988b7
     assign( arStruct[0], true, '@', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
6a988b7
- 			0x123456789abcdef0, 0xfedcba9876543210, 17.0815f, 3.1415926359,
6a988b7
+ 			0x123456789abcdef0, 0xfedcba9876543210, 17.03125f, 3.1415926359,
6a988b7
             TestEnum.LOLA, Constants.STRING_TEST_CONSTANT, arObject[0],
6a988b7
             new Any( typeof(Object),  arObject[0]) );
6a988b7
     assign( arStruct[1], true, 'A', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
6a988b7
-			0x123456789abcdef0, 0xfedcba9876543210, 17.0815f, 3.1415926359,
6a988b7
+			0x123456789abcdef0, 0xfedcba9876543210, 17.03125f, 3.1415926359,
6a988b7
             TestEnum.TWO, Constants.STRING_TEST_CONSTANT, arObject[1],
6a988b7
             new Any( typeof(Object), arObject[1]) );
6a988b7
     assign( arStruct[2], true, 'B', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
6a988b7
-			0x123456789abcdef0, 0xfedcba9876543210, 17.0815f, 3.1415926359,
6a988b7
+			0x123456789abcdef0, 0xfedcba9876543210, 17.03125f, 3.1415926359,
6a988b7
             TestEnum.CHECK, Constants.STRING_TEST_CONSTANT, arObject[2],
6a988b7
             new Any( typeof(Object), arObject[2] ) );
6a988b7
 
6a988b7
diff --git a/testtools/source/bridgetest/cli/cli_vb_bridgetest.vb b/testtools/source/bridgetest/cli/cli_vb_bridgetest.vb
6a988b7
index 18abd584bbab..9e095a33a15d 100644
6a988b7
--- a/testtools/source/bridgetest/cli/cli_vb_bridgetest.vb
6a988b7
+++ b/testtools/source/bridgetest/cli/cli_vb_bridgetest.vb
6a988b7
@@ -243,17 +243,17 @@ Public Class BridgeTest
6a988b7
                                New TestElement()}
6a988b7
         assign( arStruct(0), True, "@"C, 17, &H1234, Convert.ToUInt16(&Hfedc), _
6a988b7
             &H12345678, Convert.ToUInt32(&H123456), &H123456789abcdef0, _
6a988b7
-            Convert.ToUInt64(123456788), 17.0815F, 3.1415926359, _
6a988b7
+            Convert.ToUInt64(123456788), 17.03125F, 3.1415926359, _
6a988b7
             TestEnum.LOLA, CONSTANTS.STRING_TEST_CONSTANT, 18, &H5678, arObject(0), _
6a988b7
             New Any(GetType(System.Object), arObject(0)))
6a988b7
         assign( arStruct(1), True, "A"C, 17, &H1234, Convert.ToUInt16(&Hfedc), _
6a988b7
             &H12345678, Convert.ToUInt32(&H123456), &H123456789abcdef0, _
6a988b7
-            Convert.ToUInt64(12345678), 17.0815F, 3.1415926359, _
6a988b7
+            Convert.ToUInt64(12345678), 17.03125F, 3.1415926359, _
6a988b7
             TestEnum.TWO, CONSTANTS.STRING_TEST_CONSTANT, 18, &H5678, arObject(1), _
6a988b7
             New Any(GetType(System.Object), arObject(1)) )
6a988b7
         assign( arStruct(2), True, "B"C, 17, &H1234, Convert.ToUInt16(&Hfedc), _ 
6a988b7
             &H12345678, Convert.ToUInt32(654321), &H123456789abcdef0, _
6a988b7
-            Convert.ToUInt64(87654321), 17.0815F, 3.1415926359, _ 
6a988b7
+            Convert.ToUInt64(87654321), 17.03125F, 3.1415926359, _ 
6a988b7
             TestEnum.CHECK, Constants.STRING_TEST_CONSTANT, 18, &H5678, arObject(2), _
6a988b7
             New Any(GetType(System.Object), arObject(2)))
6a988b7
 
6a988b7
@@ -561,7 +561,7 @@ Public Class BridgeTest
6a988b7
 			True, "@"C, 17, &H1234, Convert.ToUInt16(&HdcS), &H12345678, _
6a988b7
             Convert.ToUInt32(4294967294), _
6a988b7
 			&H123456789abcdef0, Convert.ToUInt64(14294967294), _
6a988b7
-			17.0815f, 3.1415926359, TestEnum.LOLA, _
6a988b7
+			17.03125f, 3.1415926359, TestEnum.LOLA, _
6a988b7
 			CONSTANTS.STRING_TEST_CONSTANT, xI, _
6a988b7
 			aAny)
6a988b7
 
6a988b7
-- 
6a988b7
2.39.1
6a988b7