Back to index

nux  3.0.0
Classes | Functions
nux::testing Namespace Reference

Classes

class  TestCallback

Functions

std::string ReadFile (std::string const &filename)
void PumpGObjectMainLoop ()

Function Documentation

Definition at line 42 of file Helpers.cpp.

{
  GMainContext* context(g_main_context_get_thread_default());
  while (g_main_context_pending(context)) {
    g_main_context_iteration(context, false);
  }
}
std::string nux::testing::ReadFile ( std::string const &  filename)

Definition at line 33 of file Helpers.cpp.

{
  std::ifstream input(filename.c_str());
  if (input.bad())
    throw std::runtime_error("bad file");
  return std::string((std::istreambuf_iterator<char>(input)),
                     std::istreambuf_iterator<char>());
}