~pitti/autopilot-gtk/add-tests

« back to all changes in this revision

Viewing changes to lib/GtkNode.cpp

  • Committer: Allan LeSage
  • Date: 2013-05-22 23:29:06 UTC
  • mto: (40.1.4 matching-fix)
  • mto: This revision was merged to the branch mainline in revision 41.
  • Revision ID: allan.lesage@canonical.com-20130522232906-m15rdjdr6xh5mgq4
Add autopilot tests, switch to g_debug logging, move test dir to tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#include <string>
21
21
#include <gdk/gdk.h>
22
 
#include <iostream>
23
22
#include <sstream>
24
23
 
25
24
#include "GtkNode.h"
183
182
                            const std::string& value) const {
184
183
 
185
184
  // g_debug("attempting to match a node's property");
186
 
  // yes we're transforming to strings and comparing there
187
185
 
188
186
  if (name == "id") {
189
187
    return value == std::to_string(GetObjectId());
194
192
    if (pspec == NULL)
195
193
      return false;
196
194
 
197
 
    // std::cout << " (" << g_type_name(G_PARAM_SPEC_VALUE_TYPE(pspec)) << ")" << std::endl;
 
195
    g_debug("Matching a property of type (%s).", g_type_name(G_PARAM_SPEC_VALUE_TYPE(pspec)));
198
196
 
199
197
    if (pspec && G_PARAM_SPEC_VALUE_TYPE(pspec) == G_TYPE_INT) {
200
198
      GValue dest_value = G_VALUE_INIT;