diff options
Diffstat (limited to 'tests/glibmm_refptr/main.cc')
-rw-r--r-- | tests/glibmm_refptr/main.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/glibmm_refptr/main.cc b/tests/glibmm_refptr/main.cc index 53a74492..4caea0c5 100644 --- a/tests/glibmm_refptr/main.cc +++ b/tests/glibmm_refptr/main.cc @@ -91,6 +91,11 @@ test_initial_refcount() Glib::RefPtr<Something> refSomething(new Something()); g_assert_cmpint(refSomething->ref_count(), ==, 1); g_assert_cmpint(refSomething->max_ref_count(), ==, 1); + + // Test the get() method: + g_assert_cmpint(refSomething.get()->ref_count(), ==, 1); + refSomething.reset(); + g_assert(refSomething.get() == nullptr); } static void |