[glibmm/wip/dboles/Binding-Issue#62: 1/3] Binding: Test that unbind() stops props syncing



commit bacd92c6cce1f78a8eb95354c626cb78b1cee76f
Author: Daniel Boles <dboles src gnome org>
Date:   Fri Nov 15 18:30:00 2019 +0000

    Binding: Test that unbind() stops props syncing

 tests/glibmm_binding/main.cc | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/tests/glibmm_binding/main.cc b/tests/glibmm_binding/main.cc
index 9b727e51..1f86cea2 100644
--- a/tests/glibmm_binding/main.cc
+++ b/tests/glibmm_binding/main.cc
@@ -80,6 +80,11 @@ test()
     // Ensure no change when invalid source results in false return
     source.property_string() = "six six six";
     g_assert_cmpint(target.property_int(), ==, 47);
+
+    // or when we manually unbind
+    binding->unbind();
+    source.property_string() = "666";
+    g_assert_cmpint(target.property_int(), ==, 47);
   }
 
   // Ensure the binding was released when its RefPtr went out of scope


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]