File: Path.cpp

package info (click to toggle)
plog 1.1.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,404 kB
  • sloc: cpp: 13,637; ansic: 473; sh: 24; makefile: 4
file content (27 lines) | stat: -rw-r--r-- 619 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "Common.h"

#ifdef __cpp_lib_filesystem
#   include <filesystem>

SCENARIO("std::filesystem::path")
{
    GIVEN("logger is initialised")
    {
        plog::TestAppender testAppender;
        plog::Logger<PLOG_DEFAULT_INSTANCE_ID> logger(plog::verbose);
        logger.addAppender(&testAppender);

        WHEN("type is std::filesystem::path")
        {
            std::filesystem::path path("/usr/lib");
            PLOGI << path;

            THEN("the result is as expected")
            {
                CHECK_EQ(testAppender.getMessage(), PLOG_NSTR("/usr/lib"));
            }
        }
    }
}

#endif