Maybe fixing tests for Windows

This commit is contained in:
Matthias Koefferlein 2026-08-15 14:42:06 +02:00
parent e5422b9a0f
commit 005edf7370
5 changed files with 7 additions and 4 deletions

View File

@ -1280,7 +1280,8 @@ static gsi::Class<A> 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<A_NC> decl_a_nc (decl_a, "", "A_NC");

View File

@ -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)

View File

@ -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")

View File

@ -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")

View File

@ -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