Back to index

unity  6.0.0
Functions
test_main.cpp File Reference
#include <gtest/gtest.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include <NuxCore/Logger.h>
#include <Nux/Nux.h>
#include "unity-shared/PluginAdapter.h"
#include "unity-shared/WindowManager.h"

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 10 of file test_main.cpp.

{
  ::testing::InitGoogleTest(&argc, argv);
  gtk_init(&argc, &argv);

  nux::NuxInitialize(0);
  std::unique_ptr<nux::WindowThread> win_thread(nux::CreateNuxWindow("Tests",
                                                300, 200, nux::WINDOWSTYLE_NORMAL,
                                                NULL, false, NULL, NULL));

  // Slightly higher as we're more likely to test things we know will fail
  nux::logging::configure_logging("<root>=error");

  // but you can still change it if you're debugging ;)
  nux::logging::configure_logging(::getenv("UNITY_LOG_SEVERITY"));

  // Setting the PluginAdapter to null, using the Standalone version at link time.
  PluginAdapter::Initialize(NULL);
  WindowManager::SetDefault(PluginAdapter::Default());

  int ret = RUN_ALL_TESTS();

  return ret;
}

Here is the call graph for this function: