Commit c58ee77e authored by Stephen Morris's avatar Stephen Morris
Browse files

[trac555] Remove redundant test class from LoggerSpecification unit tests

... and correct error in previous commit.
parent 601d7f01
......@@ -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
......
......@@ -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";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment