Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
1c740fa5
Commit
1c740fa5
authored
16 years ago
by
Emmanuel Milou
Browse files
Options
Downloads
Patches
Plain Diff
commented out the configuration test class
parent
33923e5a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/configurationTest.cpp
+48
-2
48 additions, 2 deletions
test/configurationTest.cpp
with
48 additions
and
2 deletions
test/configurationTest.cpp
+
48
−
2
View file @
1c740fa5
/*
* Copyright (C) 2008 Savoir-Faire Linux inc.
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
*
* 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 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, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
// Cppunit import
#include
<cppunit/extensions/HelperMacros.h>
#include
<cppunit/TestCaller.h>
#include
<cppunit/TestCase.h>
#include
<cppunit/TestSuite.h>
#include
<assert.h>
#include
<stdio.h>
// Application import
#include
"manager.h"
#include
"global.h"
#include
"user_cfg.h"
#include
<stdio.h>
/*
* @file configurationTest.cpp
* @brief Regroups unitary tests related to the user configuration.
* Check if the default configuration has been successfully loaded
*/
using
std
::
cout
;
using
std
::
endl
;
// Cppunit import
class
ConfigurationTest
:
public
CppUnit
::
TestCase
{
/*
* Use cppunit library macros to add unit test the factory
*/
CPPUNIT_TEST_SUITE
(
ConfigurationTest
);
CPPUNIT_TEST
(
testDefaultValueAudio
);
CPPUNIT_TEST
(
testDefaultValuePreferences
);
...
...
@@ -25,6 +54,9 @@ class ConfigurationTest : public CppUnit::TestCase {
public:
ConfigurationTest
()
:
CppUnit
::
TestCase
(
"Configuration Tests"
)
{}
/*
* Unit tests related to the audio preferences
*/
void
testDefaultValueAudio
(){
CPPUNIT_ASSERT
(
Manager
::
instance
().
getConfigString
(
AUDIO
,
ALSA_CARD_ID_IN
)
==
ALSA_DFT_CARD
)
;
CPPUNIT_ASSERT
(
Manager
::
instance
().
getConfigString
(
AUDIO
,
ALSA_CARD_ID_OUT
)
==
ALSA_DFT_CARD
);
...
...
@@ -35,6 +67,9 @@ class ConfigurationTest : public CppUnit::TestCase {
CPPUNIT_ASSERT
(
Manager
::
instance
().
getConfigString
(
AUDIO
,
VOLUME_MICRO
)
==
DFT_VOL_MICRO_STR
);
}
/*
* Unit tests related to the global settings
*/
void
testDefaultValuePreferences
(){
CPPUNIT_ASSERT
(
Manager
::
instance
().
getConfigString
(
PREFERENCES
,
ZONE_TONE
)
==
DFT_ZONE
);
CPPUNIT_ASSERT
(
Manager
::
instance
().
getConfigString
(
PREFERENCES
,
CONFIG_ZEROCONF
)
==
CONFIG_ZEROCONF_DEFAULT_STR
);
...
...
@@ -51,13 +86,24 @@ class ConfigurationTest : public CppUnit::TestCase {
}
/*
* Code factoring - Common resources can be initialized here.
* This method is called by unitcpp before each test
*/
void
setUp
(){
// Load the default configuration
Manager
::
instance
().
initConfigFile
(
false
);
}
/*
* Code factoring - Common resources can be released here.
* This method is called by unitcpp after each test
*/
void
tearDown
(){
// Not much to do
}
};
/* Register our test module */
CPPUNIT_TEST_SUITE_REGISTRATION
(
ConfigurationTest
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment