From 005edf7370da51ce567429dbca4da64d77a1de55 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sat, 15 Aug 2026 14:42:06 +0200 Subject: [PATCH] Maybe fixing tests for Windows --- src/gsi/gsi_test/gsiTest.cc | 3 ++- src/gsi/gsi_test/gsiTest.h | 3 ++- testdata/python/basic.py | 2 +- testdata/ruby/basic_testcore.rb | 2 +- testdata/ruby/layLayoutView.rb | 1 + 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gsi/gsi_test/gsiTest.cc b/src/gsi/gsi_test/gsiTest.cc index cc0386946..e48593e45 100644 --- a/src/gsi/gsi_test/gsiTest.cc +++ b/src/gsi/gsi_test/gsiTest.cc @@ -1280,7 +1280,8 @@ static gsi::Class decl_a ("", "A", gsi::method ("ft_cptr", &A::ft_cptr) + gsi::method ("ft_var", &A::ft_var) + gsi::method ("var2s", &A::var2s) + - gsi::method ("ll_size", &A::ll_size) + gsi::method ("ll_size", &A::ll_size) + + gsi::method ("l_size", &A::l_size) ); static gsi::Class decl_a_nc (decl_a, "", "A_NC"); diff --git a/src/gsi/gsi_test/gsiTest.h b/src/gsi/gsi_test/gsiTest.h index 519f7475b..40a8ac39e 100644 --- a/src/gsi/gsi_test/gsiTest.h +++ b/src/gsi/gsi_test/gsiTest.h @@ -421,8 +421,9 @@ struct A // Variant to parsable string for Variant generation tests static std::string var2s (const tl::Variant &v) { return v.to_parsable_string (); } - // platform specifics: length of "long long" + // platform specifics: length of "long long" and "long" static size_t ll_size () { return sizeof (long long); } + static size_t l_size () { return sizeof (long); } // feed-through values for full cycle tests // (mainly for string encoding and binary strings) diff --git a/testdata/python/basic.py b/testdata/python/basic.py index 9a0c95cb0..bda4dff14 100644 --- a/testdata/python/basic.py +++ b/testdata/python/basic.py @@ -3222,7 +3222,7 @@ class BasicTest(unittest.TestCase): self.assertEqual(pya.A.var2s(( 0.5, "hello" )), "(##0.5,'hello')") self.assertEqual(pya.A.var2s([ 0.5, [ 1, 2 ] ]), "(##0.5,(#1,#2))") self.assertEqual(pya.A.var2s({ 1: 'one', 'two': 17 }), "{#1=>'one','two'=>#17}") - if pya.A.ll_size() == 4: + if pya.A.l_size() == 4: self.assertEqual(pya.A.var2s(100000000000), "#l100000000000") else: self.assertEqual(pya.A.var2s(100000000000), "#100000000000") diff --git a/testdata/ruby/basic_testcore.rb b/testdata/ruby/basic_testcore.rb index 18696086c..cf31ca417 100644 --- a/testdata/ruby/basic_testcore.rb +++ b/testdata/ruby/basic_testcore.rb @@ -3177,7 +3177,7 @@ class Basic_TestClass < TestBase assert_equal(RBA::A::var2s([ 0.5, "hello" ]), "(##0.5,'hello')") assert_equal(RBA::A::var2s([ 0.5, [ 1, 2 ] ]), "(##0.5,(#1,#2))") assert_equal(RBA::A::var2s({ 1 => 'one', 'two' => 17 }), "{#1=>'one','two'=>#17}") - if RBA::A::ll_size == 4 + if RBA::A::l_size == 4 assert_equal(RBA::A::var2s(100000000000), "#l100000000000") else assert_equal(RBA::A::var2s(100000000000), "#100000000000") diff --git a/testdata/ruby/layLayoutView.rb b/testdata/ruby/layLayoutView.rb index e6aa49093..dbeb4e30c 100644 --- a/testdata/ruby/layLayoutView.rb +++ b/testdata/ruby/layLayoutView.rb @@ -450,6 +450,7 @@ class LAYLayoutView_TestClass < TestBase img = lv.get_pixels_with_options(500, 500, 1, 1, 1.0, RBA::DBox::new) au = RBA::PixelBuffer.read_png(File.join($ut_testsrc, "testdata/lay/au_lv1.png")) + img.write_png("/home/matthias/tmp.png") if au assert_equal(au == img, true) end