force double variable type for GLib testing for i386
authorLaszlo Boszormenyi (GCS) <gcs@debian.org>
Thu, 29 Feb 2024 18:11:37 +0000 (18:11 +0000)
committerBenjamin Drung <bdrung@debian.org>
Thu, 29 Feb 2024 18:11:37 +0000 (18:11 +0000)
Forwarded: no
Last-Update: 2023-09-05

GLib double testing fail on i386 probably due to its smaller variable width.
Make sure the numbers used as 'double' type.

Gbp-Pq: Name glib_double_type_i386.patch

lib/c_glib/test/testthrifttestclient.cpp
lib/c_glib/test/testthrifttestzlibclient.cpp

index 77daf3d37fae55ebd16e2927afb564b322eb07ef..cba392c9a9c9c7859706542444a4db6db4cbfc6f 100644 (file)
@@ -420,8 +420,8 @@ test_thrift_client (void)
   assert (i64 == 12345);
   assert (error == nullptr);
 
-  assert (t_test_thrift_test_client_test_double (iface, &dbl, 5.6, &error) == TRUE);
-  assert (dbl == 5.6);
+  assert (t_test_thrift_test_client_test_double (iface, &dbl, (double)5.6, &error) == TRUE);
+  assert (dbl == (double)5.6);
   assert (error == nullptr);
 
   xtruct_out = (TTestXtruct *) g_object_new (T_TEST_TYPE_XTRUCT, nullptr);
index 5c4b931570d389028ce3701994053334d747ac60..6e7858b99ca41830f7528e7136aff42947108950 100644 (file)
@@ -419,8 +419,8 @@ test_thrift_client (void)
   assert (i64 == 12345);
   assert (error == nullptr);
 
-  assert (t_test_thrift_test_client_test_double (iface, &dbl, 5.6, &error) == TRUE);
-  assert (dbl == 5.6);
+  assert (t_test_thrift_test_client_test_double (iface, &dbl, (double)5.6, &error) == TRUE);
+  assert (dbl == (double)5.6);
   assert (error == nullptr);
 
   xtruct_out = (TTestXtruct *) g_object_new (T_TEST_TYPE_XTRUCT, nullptr);