/*
Copyright (C) 2015 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 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, see <http://www.gnu.org/licenses/>.
*/
#include <talloc.h>
#include <tevent.h>
#include <errno.h>
#include <popt.h>
#include "providers/data_provider/dp_private.h"
#include "tests/cmocka/common_mock.h"
struct test_ctx {
};
{
return 0;
}
{
return 0;
}
{
const char *req_name;
"custom_part");
return req_name;
}
{
bool is_present;
const char *key;
}
{
bool is_present;
const char *key;
}
{
bool is_present;
const char *key;
/* Add 1st requset */
/* Add 2nd request */
/* Del req */
/* Free memory */
}
/* This test is aimed to test 'dp_sbus_req_item_destructor()' */
{
bool is_present;
const char *key;
const int N = 5;
/* Insert N sbus_requests for req_name */
for (int i = 0; i < N; i++) {
assert_non_null(sbus_req[i]);
}
/* Check */
for (int i = 0; i < N; i++) {
}
/* Del one req */
/* Check that only magic is missing */
/* Skip deleted MAGIC request */
/* misc */
/* Free memory */
for (int i = 0; i < N; i++) {
if (i != MAGIC) {
talloc_free(sbus_req[i]);
}
}
}
{
int opt;
int no_cleanup = 0;
_("Do not delete the test database after a test run"), NULL },
};
};
/* Set debug level to invalid value so we can deside if -d 0 was used. */
switch(opt) {
default:
return 1;
}
}
}