summaryrefslogtreecommitdiff
path: root/tests/glibmm_object/main.cc
blob: 925b875f6633f503d8e7e3506251280a7c402a81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "test_derived_object.h"
#include <glibmm.h>
#include <iostream>
#include <stdlib.h>

static void
test_object()
{
  GObject* gobject = G_OBJECT(g_object_new(TEST_TYPE_DERIVED, nullptr));
  DerivedObject derived(gobject, 5);
  // std::cout << "debug: gobj(): " << derived.gobj() << std::endl;
  g_assert(derived.gobj() == gobject);
}

int
main(int, char**)
{
  Glib::init();

  test_object();

  return EXIT_SUCCESS;
}