MCPcopy Create free account
hub / github.com/Dobiasd/FunctionalPlus / test

Class test

test/shared_ref_test.cpp:18–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18struct test {
19 int m_x;
20
21 test(int x)
22 : m_x(x)
23 {
24 log("test(" + fplus::show(m_x) + ")");
25 }
26 test(const test& t)
27 : m_x(t.m_x)
28 {
29 log("test(const test& " + fplus::show(m_x) + ")");
30 }
31 test(test&& t)
32 : m_x(std::move(t.m_x))
33 {
34 log("test(test&& " + fplus::show(m_x) + ")");
35 }
36
37 test& operator=(int x)
38 {
39 m_x = x;
40 log("test::operator=(" + fplus::show(m_x) + ")");
41 return *this;
42 }
43 test& operator=(const test& t)
44 {
45 m_x = t.m_x;
46 log("test::operator=(const test& " + fplus::show(m_x) + ")");
47 return *this;
48 }
49 test& operator=(test&& t)
50 {
51 m_x = std::move(t.m_x);
52 log("test::operator=(test&& " + fplus::show(m_x) + ")");
53 return *this;
54 }
55
56 ~test() { log("~test(" + fplus::show(m_x) + ")"); }
57};
58}
59
60TEST_CASE("shared_ref_test - full")

Callers 1

Calls 2

logFunction · 0.85
showFunction · 0.50

Tested by

no test coverage detected