simplersble 1.0.1-dev23

The all-in-one Bluetooth library that makes it easy to add wireless connectivity to your projects.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <gtest/gtest.h>

#include <simpledbus/advanced/Proxy.h>

using namespace SimpleDBus;

TEST(ProxyLifetime, Validity) {
    Proxy p = Proxy(nullptr, "", "/");

    // A newly created proxy should always be valid.
    ASSERT_TRUE(p.valid());

    // Should notify that the proxy can be safely deleted, as nothing worth keeping is left
    ASSERT_TRUE(p.path_remove("/", Holder::create<std::vector<Holder>>()));

    // A proxy that has been removed is no longer valid.
    ASSERT_FALSE(p.valid());
}