encfs/vendor/github.com/muflihun/easyloggingpp/test/plog-test.h
Valient Gough 5f0806c5cc Add "easylogging" from "https://github.com/muflihun/easyloggingpp@master"
git-vendor-name: easylogging
git-vendor-dir: vendor/github.com/muflihun/easyloggingpp
git-vendor-repository: https://github.com/muflihun/easyloggingpp
git-vendor-ref: master
2017-08-05 23:23:41 -07:00

19 lines
481 B
C++

#ifndef PLOG_TEST_H
#define PLOG_TEST_H
#include "test.h"
TEST(PLogTest, WriteLog) {
std::fstream file("/tmp/a/file/that/does/not/exist.txt", std::fstream::in);
if (file.is_open()) {
// We dont expect to open file
FAIL();
}
PLOG(INFO) << "This is plog";
std::string expected = BUILD_STR(getDate() << " This is plog: No such file or directory [2]\n");
std::string actual = tail(1);
EXPECT_EQ(expected, actual);
}
#endif // PLOG_TEST_H