Line | |
---|
1 | #include <gtest/gtest.h> |
---|
2 | #include "util/Output.h" |
---|
3 | #include "util/output/ConsoleWriter.h" |
---|
4 | #include "util/output/OutputManager.h" |
---|
5 | |
---|
6 | namespace 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.