Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
c58ee77e
Commit
c58ee77e
authored
Jun 01, 2011
by
Stephen Morris
Browse files
[trac555] Remove redundant test class from LoggerSpecification unit tests
... and correct error in previous commit.
parent
601d7f01
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/log/tests/logger_manager_unittest.cc
View file @
c58ee77e
...
...
@@ -186,6 +186,13 @@ TEST_F(LoggerManagerTest, FileLogger) {
// Create a specification for the file logger and use the manager to
// connect the "filelogger" logger to it.
SpecificationForFileLogger
file_spec
;
// For the first test, we want to check that the file is created
// if it does not already exist. So delete the temporary file before
// logging the first message.
unlink
(
file_spec
.
getFileName
().
c_str
());
// Set up the file appenders.
LoggerManager
manager
;
manager
.
process
(
file_spec
.
getSpecification
());
...
...
@@ -194,10 +201,6 @@ TEST_F(LoggerManagerTest, FileLogger) {
// put in the file for a later comparison.
vector
<
MessageID
>
ids
;
{
// For the first test, we want to check that the file is created
// if it does not already exist. So delete the temporary file before
// logging the first message.
unlink
(
file_spec
.
getFileName
());
// Scope-limit the logger to ensure it is destroyed after the brief
// check. This adds weight to the idea that the logger will not
...
...
src/lib/log/tests/logger_specification_unittest.cc
View file @
c58ee77e
...
...
@@ -22,18 +22,8 @@
using
namespace
isc
::
log
;
using
namespace
std
;
/// \brief LoggerSpecification Test
class
LoggerSpecificationTest
:
public
::
testing
::
Test
{
public:
LoggerSpecificationTest
()
{}
~
LoggerSpecificationTest
()
{}
};
// Check default initialization.
TEST
_F
(
LoggerSpecificationTest
,
DefaultInitialization
)
{
TEST
(
LoggerSpecificationTest
,
DefaultInitialization
)
{
LoggerSpecification
spec
;
EXPECT_EQ
(
string
(
""
),
spec
.
getName
());
...
...
@@ -44,7 +34,7 @@ TEST_F(LoggerSpecificationTest, DefaultInitialization) {
}
// Non-default initialization
TEST
_F
(
LoggerSpecificationTest
,
Initialization
)
{
TEST
(
LoggerSpecificationTest
,
Initialization
)
{
LoggerSpecification
spec
(
"alpha"
,
isc
::
log
::
ERROR
,
42
,
true
);
EXPECT_EQ
(
string
(
"alpha"
),
spec
.
getName
());
...
...
@@ -55,7 +45,7 @@ TEST_F(LoggerSpecificationTest, Initialization) {
}
// Get/Set tests
TEST
_F
(
LoggerSpecificationTest
,
SetGet
)
{
TEST
(
LoggerSpecificationTest
,
SetGet
)
{
LoggerSpecification
spec
;
spec
.
setName
(
"gamma"
);
...
...
@@ -75,7 +65,7 @@ TEST_F(LoggerSpecificationTest, SetGet) {
}
// Check option setting
TEST
_F
(
LoggerSpecificationTest
,
AddOption
)
{
TEST
(
LoggerSpecificationTest
,
AddOption
)
{
OutputOption
option1
;
option1
.
destination
=
OutputOption
::
DEST_FILE
;
option1
.
filename
=
"/tmp/example.log"
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment