MCPcopy Create free account
hub / github.com/PDAL/PDAL / TEST

Function TEST

test/unit/LogTest.cpp:45–63  ·  view source on GitHub ↗

Make sure that we properly throw away log stuff that isn't of the right level and that we generally log correctly.

Source from the content-addressed store, hash-verified

43// Make sure that we properly throw away log stuff that isn't of the right
44// level and that we generally log correctly.
45TEST(Log, t1)
46{
47 std::string filename(Support::temppath("t1"));
48 FileUtils::deleteFile(filename);
49
50 // Scope makes sure file gets closed.
51 {
52 LogPtr l(Log::makeLog("", filename));
53
54 l->setLevel(LogLevel::Debug);
55
56 l->get(LogLevel::Debug) << "debug\n";
57 l->get(LogLevel::Debug5) << "debug5\n";
58 l->get(LogLevel::Info) << "info\n";
59 }
60
61 EXPECT_TRUE(Support::compare_text_files(filename,
62 Support::datapath("logs/t1")));
63}
64
65// Make sure that devnull thing works.
66TEST(Log, t2)

Callers

nothing calls this directly

Calls 8

temppathFunction · 0.85
deleteFileFunction · 0.85
compare_text_filesFunction · 0.85
datapathFunction · 0.85
binpathFunction · 0.85
exenameFunction · 0.85
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected