From 07fbd1f0e0a68fb3b130fe9d0b0f5f338346746a Mon Sep 17 00:00:00 2001 From: Kjell Ahlstedt Date: Fri, 31 Mar 2023 19:00:02 +0200 Subject: Glib: value_custom: Use callback functions with C linkage * glib/glibmm/value_custom.[cc|h]: Add custom_boxed_type_cpp_register(). * tests/glibmm_value/main.cc: Add test of copying custom Value. Part of issue #1 --- tests/glibmm_value/main.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/glibmm_value/main.cc b/tests/glibmm_value/main.cc index a824f948..4aea37cc 100644 --- a/tests/glibmm_value/main.cc +++ b/tests/glibmm_value/main.cc @@ -28,6 +28,13 @@ test() const auto v = value.get(); assert(v.bar == 1); + + // Make a copy + Glib::Value value2; + value2.init(Glib::Value::value_type()); // TODO: Avoid this step? + value2 = value; + const auto v2 = value2.get(); + assert(v2.bar == 1); } { -- cgit v1.2.1