~robertcarr/unity/rightalign-filter

« back to all changes in this revision

Viewing changes to tests/test_main.cpp

  • Committer: Neil Jagdish Patel
  • Author(s): Tim Penhey
  • Date: 2011-09-05 14:57:56 UTC
  • mfrom: (1468.2.14 texture-from-bitmap)
  • Revision ID: neil.patel@canonical.com-20110905145756-m5vnc7jumubxtp04
I noticed that quite a few of the memory leaks were do to
making a texture from a CairoGraphics object. Instead of having
to remember at all the call sites, I've created a couple of helper
methods.

I had to control myself a lot during this change to not change too
many other things at once. Sometimes I couldn't help myself though.

In particular I changed the TextureContainer to use smart pointers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include <gtest/gtest.h>
2
2
#include <gio/gio.h>
3
3
#include <NuxCore/Logger.h>
 
4
#include <Nux/Nux.h>
4
5
 
5
6
static bool wait_until_test_service_appears();
6
7
static void tell_service_to_exit();
10
11
  ::testing::InitGoogleTest(&argc, argv);
11
12
  g_type_init();
12
13
  g_thread_init(NULL);
 
14
  nux::NuxInitialize (0);
13
15
 
14
16
  // We need the service to be ready before we are
15
17
  if (!wait_until_test_service_appears())