Source
zbx_snprintf(value, ZBX_VALUEMAP_STRING_LEN, "%s", zbx_mock_get_parameter_string("in.value"));
/*
** Zabbix
** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
typedef struct
{
char value[ZBX_VALUEMAP_STRING_LEN];
char newvalue[ZBX_VALUEMAP_STRING_LEN];
int type;
}
zbx_valuemaps_t;
ZBX_PTR_VECTOR_DECL(valuemaps_ptr, zbx_valuemaps_t *)
static void zbx_valuemaps_free(zbx_valuemaps_t *valuemap)
{
zbx_free(valuemap);
}
void zbx_mock_test_entry(void **state)
{
int ret, expected_ret;
char value[ZBX_VALUEMAP_STRING_LEN], *newvalue;
unsigned char value_type;
zbx_vector_valuemaps_ptr_t valuemaps;
zbx_valuemaps_t *valuemap;
zbx_mock_handle_t hvaluemaps, handle;
zbx_mock_error_t err;
zbx_vector_valuemaps_ptr_create(&valuemaps);
hvaluemaps = zbx_mock_get_parameter_handle("in.valuemaps");