mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-07 22:02:12 +08:00
nothing
This commit is contained in:
@ -39,6 +39,10 @@ AC_CONFIG_FILES([src/Makefile \
|
||||
src/dbus/Makefile \
|
||||
src/zeroconf/Makefile])
|
||||
|
||||
dnl Unitary test section
|
||||
dnl AC_CONFIG_FILES([src/test/Makefile])
|
||||
|
||||
|
||||
AC_CONFIG_FILES([po/Makefile \
|
||||
ringtones/Makefile])
|
||||
|
||||
|
@ -69,4 +69,4 @@ noinst_HEADERS = managerimpl.h manager.h global.h observer.h eventthread.h user_
|
||||
#./contact/libcontact.la \
|
||||
# ./memmanager/libmemmanager.la \
|
||||
# ./mixer/libmixer.la \
|
||||
# ./video/libvideo.la
|
||||
# ./video/libvideo.la
|
||||
|
9
src/test/Makefile.am
Normal file
9
src/test/Makefile.am
Normal file
@ -0,0 +1,9 @@
|
||||
bin_PROGRAMS = configurationTester
|
||||
|
||||
CPPUNIT_LDFLAG = `pkg-config --libs cppunit`
|
||||
|
||||
configurationTester_SOURCES = configurationTest.cpp
|
||||
configurationTester_LDADD = ../.libs/libsflphone.a ../config/.libs/libconfig.a
|
||||
configurationTester_LDFLAGS = $(CPPUNIT_LDFLAG)
|
||||
configurationTester_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libs $(libccext2_CFLAGS) $(libccgnu2_CFLAGS) $(IAX_CFLAGS) $(USER_INCLUDES) $(libdbuscpp_CFLAGS)
|
||||
|
49
src/test/configurationTest.cpp
Normal file
49
src/test/configurationTest.cpp
Normal file
@ -0,0 +1,49 @@
|
||||
#include "../manager.h"
|
||||
#include "../global.h"
|
||||
|
||||
// Cppunit import
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
#include <cppunit/ui/text/TestRunner.h>
|
||||
#include <cppunit/CompilerOutputter.h>
|
||||
|
||||
class ConfigurationTest : public CppUnit::TestFixture {
|
||||
|
||||
CPPUNIT_TEST_SUITE( ConfigurationTest );
|
||||
CPPUNIT_TEST( testDefaultValueAudio );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
void setUp(){
|
||||
Manager::instance().initConfigFile();
|
||||
}
|
||||
|
||||
void tearDown(){
|
||||
|
||||
}
|
||||
|
||||
void testDefaultValueAudio(){
|
||||
CPPUNIT_ASSERT( Manager::instance().getConfigString( AUDIO, ALSA_PLUGIN ) == "default" );
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION( ConfigurationTest );
|
||||
|
||||
int main(){
|
||||
|
||||
CppUnit::TextUi::TestRunner runner;
|
||||
CppUnit::TestFactoryRegistry ®istry =
|
||||
CppUnit::TestFactoryRegistry::getRegistry() ;
|
||||
runner.addTest( registry.makeTest() ) ;
|
||||
runner.setOutputter( CppUnit::CompilerOutputter::defaultOutputter(
|
||||
&runner.result(),
|
||||
std::cerr ) );
|
||||
bool wasSuccessful = runner.run( "", false ) ;
|
||||
return wasSuccessful ? 0 : 1;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user