Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/testing/test/util/output/ConsoleWriterTest.cc @ 9535

Last change on this file since 9535 was 9535, checked in by landauf, 12 years ago

more tests

File size: 786 bytes
Line 
1#include <gtest/gtest.h>
2#include "util/Output.h"
3#include "util/output/ConsoleWriter.h"
4#include "util/output/OutputManager.h"
5
6namespace orxonox
7{
8    TEST(ConsoleWriterTest, Disable)
9    {
10        EXPECT_EQ(0U, OutputManager::getInstance().getListeners().size());
11        ConsoleWriter writer;
12        EXPECT_EQ(1U, OutputManager::getInstance().getListeners().size());
13        writer.disable();
14        EXPECT_EQ(0U, OutputManager::getInstance().getListeners().size());
15    }
16
17    TEST(ConsoleWriterTest, Enable)
18    {
19        ConsoleWriter writer;
20        writer.disable();
21        EXPECT_EQ(0U, OutputManager::getInstance().getListeners().size());
22        writer.enable();
23        EXPECT_EQ(1U, OutputManager::getInstance().getListeners().size());
24    }
25}
Note: See TracBrowser for help on using the repository browser.