Lumiera  0.pre.03
»edit your freedom«
test-interfaces.c File Reference

Go to the source code of this file.

Description

C unit test to cover the basics of our interface and plugin-loading system.

See also
interface.h
interfaceregistry.h

Definition in file test-interfaces.c.

Functions

 LUMIERA_EXPORT (LUMIERA_INTERFACE_DEFINE(lumieraorg_testexample_one, 0, lumieraorg_first_test, LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor), testacquire, testrelease, LUMIERA_INTERFACE_MAP(foo1, testfunc), LUMIERA_INTERFACE_MAP(bar1, testfunc)), LUMIERA_INTERFACE_DEFINE(lumieraorg_testexample_two, 0, lumieraorg_second_test, LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor), testacquire, testrelease, LUMIERA_INTERFACE_MAP(foo2, testfunc), LUMIERA_INTERFACE_MAP(bar2, testfunc)), LUMIERA_INTERFACE_DEFINE(lumieraorg_testexample_void, 0, lumieraorg_dependencytest_one, LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor), testacquire_one, testrelease_one), LUMIERA_INTERFACE_DEFINE(lumieraorg_testexample_void, 0, lumieraorg_dependencytest_two, LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor), testacquire_two, testrelease_two), LUMIERA_INTERFACE_DEFINE(lumieraorg_testexample_void, 0, lumieraorg_dependencytest_three, LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor), testacquire_three, testrelease_three), LUMIERA_INTERFACE_DEFINE(lumieraorg_testexample_void, 0, lumieraorg_dependencytest_four, LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor), testacquire_four, testrelease_four))
 
 LUMIERA_INTERFACE_DECLARE (lumieraorg_testexample_one, 0, LUMIERA_INTERFACE_SLOT(void, foo1,(const char *)), LUMIERA_INTERFACE_SLOT(void, bar1,(const char *)),)
 
 LUMIERA_INTERFACE_DECLARE (lumieraorg_testexample_two, 0, LUMIERA_INTERFACE_SLOT(void, foo2,(const char *)), LUMIERA_INTERFACE_SLOT(void, bar2,(const char *)),)
 
 LUMIERA_INTERFACE_DECLARE (lumieraorg_testexample_void, 0)
 
static LUMIERA_INTERFACE_HANDLE (static LUMIERA_INTERFACE_HANDLE(lumieraorg_testexample_void, 0)
 
 LUMIERA_INTERFACE_INSTANCE (lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor, LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_tests_descriptor), testacquire, testrelease, LUMIERA_INTERFACE_INLINE(name, const char *,(LumieraInterface iface), {(void) iface;return "LumieraTest";}), LUMIERA_INTERFACE_INLINE(brief, const char *,(LumieraInterface iface), {(void) iface;return "Lumiera Test suite examples";}), LUMIERA_INTERFACE_INLINE(homepage, const char *,(LumieraInterface iface), {(void) iface;return "http://www.lumiera.org/develompent.html";}), LUMIERA_INTERFACE_INLINE(version, const char *,(LumieraInterface iface), {(void) iface;return "No Version";}), LUMIERA_INTERFACE_INLINE(author, const char *,(LumieraInterface iface), {(void) iface;return "Christian Thaeter";}), LUMIERA_INTERFACE_INLINE(email, const char *,(LumieraInterface iface), {(void) iface;return "ct@pipapo.org";}), LUMIERA_INTERFACE_INLINE(copyright, const char *,(LumieraInterface iface), {(void) iface;return "Copyright (C) Lumiera.org\ " 2008 Christian Thaeter< ct @pipapo.org >"; }), LUMIERA_INTERFACE_INLINE(license, const char *,(LumieraInterface iface), {(void) iface; return "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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA"; }), LUMIERA_INTERFACE_INLINE(state, int,(LumieraInterface iface), {(void) iface;return LUMIERA_INTERFACE_EXPERIMENTAL;}), LUMIERA_INTERFACE_INLINE(versioncmp, int,(const char *a, const char *b), {(void) a;(void) b; return 0;}))
 
TESTS_BEGIN TEST (basic)
 
 TEST (open_close)
 
 TEST (dependencies_one)
 
 TEST (dependencies_two)
 
 TEST (dependencies_three)
 
 TEST (dependencies_four)
 
 TEST (dependencies_all)
 
 TEST (plugin_discover)
 
 TEST (plugin_unload)
 
 TEST (plugin_exampleplugin)
 
 TEST (plugin_exampleplugin_nested)
 
 TEST (plugin_exampleplugin_cpp)
 
LumieraInterface testacquire (LumieraInterface self, LumieraInterface interface)
 
void testfunc (const char *message)
 
void testrelease (LumieraInterface self)
 
void testrelease_four (LumieraInterface self)
 
void testrelease_one (LumieraInterface self)
 
void testrelease_three (LumieraInterface self)
 
void testrelease_two (LumieraInterface self)