components-tests.h

Go to the documentation of this file.
00001 /**
00002  *  @file
00003  *
00004  *  Header file for libpoldiff's correctness of components.
00005  *
00006  *  @author Paul Rosenfeld prosenfeld@tresys.com
00007  *
00008  *  Copyright (C) 2007 Tresys Technology, LLC
00009  *
00010  *  This library is free software; you can redistribute it and/or
00011  *  modify it under the terms of the GNU Lesser General Public
00012  *  License as published by the Free Software Foundation; either
00013  *  version 2.1 of the License, or (at your option) any later version.
00014  *
00015  *  This library is distributed in the hope that it will be useful,
00016  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  *  Lesser General Public License for more details.
00019  *
00020  *  You should have received a copy of the GNU Lesser General Public
00021  *  License along with this library; if not, write to the Free Software
00022  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00023  */
00024 
00025 #ifndef COMPONENTS_TEST
00026 #define COMPONENTS_TEST
00027 
00028 #define WRAP_NAME_FUNC(component) const char *poldiff_##component##_get_name_w(const void *arg) { \
00029         const poldiff_##component##_t *cls = (const poldiff_##component##_t *)arg; \
00030         return poldiff_##component##_get_name(cls); }
00031 
00032 #define WRAP_MOD_FUNC(component,mod_component,mod_type) const apol_vector_t* poldiff_##component##_get_##mod_type##_##mod_component##_w(const void* arg) { \
00033         const poldiff_##component##_t *cls = (const poldiff_##component##_t *)arg; \
00034         return poldiff_##component##_get_##mod_type##_##mod_component(cls); }
00035 
00036 void build_component_vecs(component_funcs_t *);
00037 
00038 int components_test_init();
00039 int components_test_cleanup();
00040 
00041 void components_attributes_tests();
00042 void components_bools_tests();
00043 void components_commons_tests();
00044 void components_roles_tests();
00045 void components_users_tests();
00046 void components_class_tests();
00047 void components_types_tests();
00048 
00049 #endif