#include "testing.h"
#include "utils_vl_lookup.h"
static _Bool expect_new_obj = 0;
static _Bool have_new_obj = 0;
#include "testing.h"
#include "utils_vl_lookup.h"
static _Bool expect_new_obj = 0;
static _Bool have_new_obj = 0;
static data_source_t dsrc_test = { "value", DS_TYPE_DERIVE, 0.0, NAN };
static data_set_t const ds_test = { "test", 1, &dsrc_test };
static data_source_t dsrc_test = { "value", DS_TYPE_DERIVE, 0.0, NAN };
static data_set_t const ds_test = { "test", 1, &dsrc_test };
OK1(expect_new_obj == have_new_obj,
(expect_new_obj ? "New obj is created." : "Updating existing obj."));
OK1(expect_new_obj == have_new_obj,
(expect_new_obj ? "New obj is created." : "Updating existing obj."));
static void *lookup_class_callback (data_set_t const *ds,
value_list_t const *vl, void *user_class)
{
static void *lookup_class_callback (data_set_t const *ds,
value_list_t const *vl, void *user_class)
{
obj = malloc (sizeof (*obj));
strncpy (obj->host, vl->host, sizeof (obj->host));
strncpy (obj->plugin, vl->plugin, sizeof (obj->plugin));
obj = malloc (sizeof (*obj));
strncpy (obj->host, vl->host, sizeof (obj->host));
strncpy (obj->plugin, vl->plugin, sizeof (obj->plugin));
strncpy (ident.host, host, sizeof (ident.host));
strncpy (ident.plugin, plugin, sizeof (ident.plugin));
strncpy (ident.plugin_instance, plugin_instance, sizeof (ident.plugin_instance));
strncpy (ident.host, host, sizeof (ident.host));
strncpy (ident.plugin, plugin, sizeof (ident.plugin));
strncpy (ident.plugin_instance, plugin_instance, sizeof (ident.plugin_instance));
data_set_t const *ds = &ds_unknown;
strncpy (vl.host, host, sizeof (vl.host));
data_set_t const *ds = &ds_unknown;
strncpy (vl.host, host, sizeof (vl.host));