if (comp)
{
/* client must be created with a valid wl_client ptr later. */
- DSWaylandClient *client = new DSWaylandClient(comp, (wl_client *)nullptr);
+ auto client = new DSWaylandClient(comp, (wl_client *)nullptr);
EXPECT_TRUE(client != nullptr);
if (client)
{
DSWaylandClient *client2 = client->fromWlClient((wl_client *)nullptr);
- EXPECT_TRUE(client2 == client);
-
- delete client;
+ EXPECT_TRUE(client2 == nullptr);
}
DSWaylandCompositor::releaseInstance();
if (comp)
{
/* client must be created with a valid wl_client ptr later. */
- DSWaylandClient *client = new DSWaylandClient(comp, (wl_client *)nullptr);
+ auto client = new DSWaylandClient(comp, (wl_client *)nullptr);
EXPECT_TRUE(client != nullptr);
if (client)
{
wl_client *wclient = client->wlClient();
- EXPECT_TRUE(wclient != nullptr);
-
- delete client;
+ EXPECT_TRUE(wclient == nullptr);
}
DSWaylandCompositor::releaseInstance();
if (comp)
{
/* client must be created with a valid wl_client ptr later. */
- DSWaylandClient *client = new DSWaylandClient(comp, (wl_client *)nullptr);
+ auto client = new DSWaylandClient(comp, (wl_client *)nullptr);
EXPECT_TRUE(client != nullptr);
if (client)
uID = client->uid();
gID = client->gid();
- EXPECT_TRUE(pID != 0);
- EXPECT_TRUE(uID != 0);
- EXPECT_TRUE(gID != 0);
+ EXPECT_TRUE(pID == 0);
+ EXPECT_TRUE(uID == 0);
+ EXPECT_TRUE(gID == 0);
delete client;
}