blob: ec12765b3cd2104ee9792eabdfbf29eb139f6760 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/* Copyright 2019, The libsigc++ Development Team
* Assigned to public domain. Use as you wish without restriction.
*/
#include "testutilities.h"
#include <sigc++/trackable.h>
#include <sigc++/signal.h>
#include <iostream>
namespace
{
TestUtilities* util = nullptr;
std::ostringstream result_stream;
void
test_connection_copy_empty()
{
sigc::connection con1;
// Try to prevent the compiler from optimising away the copy.
std::cout << &con1 << std::endl;
sigc::connection con2(con1);
// Try to prevent the compiler from optimising away the copy.
std::cout << &con2 << std::endl;
}
} // end anonymous namespace
int
main(int argc, char* argv[])
{
util = TestUtilities::get_instance();
if (!util->check_command_args(argc, argv))
return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
test_connection_copy_empty();
// See also test_disconnection.cc
return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
}
|