summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2023-03-31 19:00:02 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2023-03-31 19:00:02 +0200
commit07fbd1f0e0a68fb3b130fe9d0b0f5f338346746a (patch)
tree4d3182fa5e2e9c99b6fd31519f0c6594ef291041 /tests
parent7ff8b74a47059edbba7a9f9424fa0022943bc6ec (diff)
downloadglibmm-07fbd1f0e0a68fb3b130fe9d0b0f5f338346746a.tar.gz
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
Diffstat (limited to 'tests')
-rw-r--r--tests/glibmm_value/main.cc7
1 files changed, 7 insertions, 0 deletions
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<Foo> value2;
+ value2.init(Glib::Value<Foo>::value_type()); // TODO: Avoid this step?
+ value2 = value;
+ const auto v2 = value2.get();
+ assert(v2.bar == 1);
}
{