summaryrefslogtreecommitdiff
path: root/tests/glibmm_interface_move
Commit message (Collapse)AuthorAgeFilesLines
* glibmm_interface_move test: Avoid warnings in test_IFace_get_type()Chun-wei Fan2020-03-021-0/+2
| | | | | | ...for Visual Studio builds, since we don't really get unused function warnings from the TEST_IFACE items. Plus, we don't have glib autoptr support in Visual Studio builds, either.
* tests: Avoid an unused function warnings from G_DECLARE_INTERFACE().Murray Cumming2017-05-261-0/+7
|
* Tests: Initialize a member variable.Murray Cumming2016-12-121-1/+1
| | | | Noticed by cppcheck.
* Tests: Make single-parameter constructors explicit.Murray Cumming2016-12-121-1/+1
| | | | Noticed by cppcheck.
* C++11: .h/.cc files: Replace typedefs with using.Murray Cumming2016-03-311-5/+5
|
* Re-run clang-format on some files.Murray Cumming2016-02-261-9/+9
| | | | | I need to make a subsequent commit to fix the now-unaligned trailing comments.
* Run clang-format on tests.Murray Cumming2016-02-261-84/+77
|
* Tests: More nullptr instead of 0Kjell Ahlstedt2015-11-231-4/+11
|
* ObjectBase, Object, Interface: Fix move constructors and move assignmentsKjell Ahlstedt2015-10-311-5/+13
| | | | | | | | | | | | | | | | * glib/glibmm/interface.cc: Don't call ObjectBase's move assignment operator from Interface's move assignment operator. * glib/glibmm/object.cc: Perform of job of sigc::trackable's move constructor in Object's move constructor. * glib/glibmm/objectbase.cc: Move constructor: Set gobject_ = nullptr. Fix the assignment of cpp_destruction_in_progress_. Move assignment: Add self-assignment guard. Avoid the risk of accidentally deleting *this. Let a call to initialize_move() do most of the job. * tests/glibmm_interface_move/main.cc: * tests/glibmm_object_move/main.cc: * tests/glibmm_objectbase_move/main.cc: Really test move assignment. Test that the wrapped C object has been moved, and not copied. Bug #756962.
* tests: Add glibmm_interface_move.Murray Cumming2015-08-221-0/+292
This code got unpleasantly big because I wanted to test a C++ class that wraps a GObject while also implementing a C++ Interface that wraps a GInterface that the GObject implements. But it seems to work. However, the code to test a raw TestInterface is commented out because the move constructor does not pass the test. I am not sure if this should even be expected to work: Interface interface = std::move(object); or: Base base = std::move(derived); Surely that would lose the data (and virtual method table) from the Derived class anyway?