Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (9 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/test/util/output/BaseWriterTest.cc

    r9545 r11071  
    3030                MOCK_METHOD2(printLine, void(const std::string&, OutputLevel));
    3131
    32                 virtual void output(OutputLevel level, const OutputContextContainer& context, const std::vector<std::string>& lines)
     32                virtual void output(OutputLevel level, const OutputContextContainer& context, const std::vector<std::string>& lines) override
    3333                    { this->BaseWriter::output(level, context, lines); }
    3434        };
  • code/trunk/test/util/output/ConsoleWriterTest.cc

    r10712 r11071  
    33#include "util/output/ConsoleWriter.h"
    44#include "util/output/OutputManager.h"
    5 #include "util/SharedPtr.h"
    65
    76namespace orxonox
     
    1312        {
    1413            public:
    15                 virtual void SetUp()
     14                virtual void SetUp() override
    1615                {
    1716                    // reset output manager
    18                     OutputManager::Testing::getInstancePointer() = new OutputManager();
     17                    OutputManager::Testing::getInstancePointer().reset(new OutputManager());
    1918                }
    2019
    21                 virtual void TearDown()
     20                virtual void TearDown() override
    2221                {
    2322                }
     
    2726    TEST_F(ConsoleWriterTest, Disable)
    2827    {
    29         std::ostream stream(NULL);
     28        std::ostream stream(nullptr);
    3029        EXPECT_EQ(0U, OutputManager::getInstance().getListeners().size());
    3130        ConsoleWriter writer(stream);
     
    3736    TEST_F(ConsoleWriterTest, Enable)
    3837    {
    39         std::ostream stream(NULL);
     38        std::ostream stream(nullptr);
    4039        ConsoleWriter writer(stream);
    4140        writer.disable();
  • code/trunk/test/util/output/LogWriterTest.cc

    r10624 r11071  
    44#include "util/Convert.h"
    55#include "util/output/OutputManager.h"
    6 #include "util/SharedPtr.h"
    76
    87namespace orxonox
     
    1312        {
    1413            public:
    15                 virtual void printLine(const std::string& line, OutputLevel level)
     14                virtual void printLine(const std::string& line, OutputLevel level) override
    1615                    { this->LogWriter::printLine(line, level); }
    1716        };
     
    2120        {
    2221            public:
    23                 virtual void SetUp()
     22                virtual void SetUp() override
    2423                {
    2524                    // reset output manager
    26                     OutputManager::Testing::getInstancePointer() = new OutputManager();
     25                    OutputManager::Testing::getInstancePointer().reset(new OutputManager());
    2726                }
    2827
    29                 virtual void TearDown()
     28                virtual void TearDown() override
    3029                {
    3130                }
     
    138137        std::string line = getLineWhichContains(path, "myothertestoutput");
    139138        EXPECT_FALSE(line.empty());
     139        ASSERT_TRUE(line.length() > 12);
     140
    140141        EXPECT_TRUE(isdigit(line[0]));
    141142        EXPECT_TRUE(isdigit(line[1]));
     
    146147        EXPECT_TRUE(isdigit(line[6]));
    147148        EXPECT_TRUE(isdigit(line[7]));
    148         EXPECT_EQ(' ', line[8]);
     149        EXPECT_EQ(':', line[8]);
     150        EXPECT_TRUE(isdigit(line[9]));
     151        EXPECT_TRUE(isdigit(line[10]));
     152        EXPECT_TRUE(isdigit(line[11]));
     153        EXPECT_EQ(' ', line[12]);
    149154    }
    150155
  • code/trunk/test/util/output/MemoryWriterTest.cc

    r10624 r11071  
    44#include "util/output/MemoryWriter.h"
    55#include "util/output/OutputManager.h"
    6 #include "util/SharedPtr.h"
    76
    87namespace orxonox
     
    2019        {
    2120            public:
    22                 virtual void SetUp()
     21                virtual void SetUp() override
    2322                {
    2423                    // reset output manager
    25                     OutputManager::Testing::getInstancePointer() = new OutputManager();
     24                    OutputManager::Testing::getInstancePointer().reset(new OutputManager());
    2625                }
    2726
    28                 virtual void TearDown()
     27                virtual void TearDown() override
    2928                {
    3029                }
  • code/trunk/test/util/output/OutputListenerTest.cc

    r9545 r11071  
    33#include "util/output/OutputListener.h"
    44#include "util/output/OutputManager.h"
    5 #include "util/SharedPtr.h"
    65
    76namespace orxonox
     
    342341            {
    343342                this->manager_ = new MockOutputManager();
    344                 OutputManager::Testing::getInstancePointer() = this->manager_;
     343                OutputManager::Testing::getInstancePointer().reset(this->manager_);
    345344            }
    346345
    347346            virtual void TearDown()
    348347            {
    349                 OutputManager::Testing::getInstancePointer() = new OutputManager();
     348                OutputManager::Testing::getInstancePointer().reset(new OutputManager());
    350349            }
    351350
  • code/trunk/test/util/output/OutputManagerTest.cc

    r10624 r11071  
    5454    TEST(OutputManagerTest, GetInstanceDoesNotCreateDefaultListeners)
    5555    {
    56         EXPECT_TRUE(NULL == OutputManager::getInstance().getMemoryWriter());
    57         EXPECT_TRUE(NULL == OutputManager::getInstance().getConsoleWriter());
    58         EXPECT_TRUE(NULL == OutputManager::getInstance().getLogWriter());
     56        EXPECT_TRUE(nullptr == OutputManager::getInstance().getMemoryWriter());
     57        EXPECT_TRUE(nullptr == OutputManager::getInstance().getConsoleWriter());
     58        EXPECT_TRUE(nullptr == OutputManager::getInstance().getLogWriter());
    5959    }
    6060
     
    6262    TEST(OutputManagerTest, GetInstanceAndCreateListenersCreatesDefaultListeners)
    6363    {
    64         EXPECT_TRUE(NULL != OutputManager::getInstanceAndCreateListeners().getMemoryWriter());
    65         EXPECT_TRUE(NULL != OutputManager::getInstanceAndCreateListeners().getConsoleWriter());
    66         EXPECT_TRUE(NULL != OutputManager::getInstanceAndCreateListeners().getLogWriter());
     64        EXPECT_TRUE(nullptr != OutputManager::getInstanceAndCreateListeners().getMemoryWriter());
     65        EXPECT_TRUE(nullptr != OutputManager::getInstanceAndCreateListeners().getConsoleWriter());
     66        EXPECT_TRUE(nullptr != OutputManager::getInstanceAndCreateListeners().getLogWriter());
    6767    }
    6868
  • code/trunk/test/util/output/OutputStreamTest.cc

    r9547 r11071  
    88#include "util/output/OutputManager.h"
    99#include "util/output/MemoryWriter.h"
    10 #include "util/SharedPtr.h"
    1110
    1211namespace orxonox
     
    8887            {
    8988                this->manager_ = new MockOutputManager();
    90                 OutputManager::Testing::getInstancePointer() = this->manager_;
     89                OutputManager::Testing::getInstancePointer().reset(this->manager_);
    9190            }
    9291
    9392            virtual void TearDown()
    9493            {
    95                 OutputManager::Testing::getInstancePointer() = new OutputManager();
     94                OutputManager::Testing::getInstancePointer().reset(new OutputManager());
    9695            }
    9796
Note: See TracChangeset for help on using the changeset viewer.