Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
gtkhelper-tests.cc File Reference
#include <memory>
#include <gtest/gtest.h>
#include <gtk/gtk.h>
#include <scroom/gtk-helpers.hh>
#include <scroom/gtk-test-helpers.hh>
Include dependency graph for gtkhelper-tests.cc:

Classes

class  anonymous_namespace{gtkhelper-tests.cc}::B
 

Namespaces

namespace  anonymous_namespace{gtkhelper-tests.cc}
 

Functions

static void b (const B::Ptr &)
 
 EXPECT_TRUE (wb.lock())
 
 EXPECT_EQ (false, result)
 
 EXPECT_FALSE (wb.lock())
 
 ASSERT_FALSE (on_ui_thread())
 
 sync_on_ui_thread ([] { EXPECT_TRUE(on_ui_thread());})
 

Variables

gpointer data = nullptr
 
B::WeakPtr wb = sb
 
std::pair< GSourceFunc, gpointer > const w = wrap([sb] { return b(sb); })
 
 f = w.first
 
bool const result = (*f)(data)
 

Function Documentation

◆ ASSERT_FALSE()

ASSERT_FALSE ( on_ui_thread()  )

◆ b()

static void b ( const B::Ptr )
static
31{}

◆ EXPECT_EQ()

EXPECT_EQ ( false  ,
result   
)

◆ EXPECT_FALSE()

EXPECT_FALSE ( wb.  lock())

◆ EXPECT_TRUE()

EXPECT_TRUE ( wb.  lock())

Referenced by sync_on_ui_thread().

Here is the caller graph for this function:

◆ sync_on_ui_thread()

sync_on_ui_thread ( [] { EXPECT_TRUE(on_ui_thread());}  )
Here is the call graph for this function:

Variable Documentation

◆ data

data = nullptr

◆ f

◆ result

bool const result = (*f)(data)

◆ w

◆ wb

wb = sb