mirror of
https://github.com/Tencent/flare.git
synced 2026-10-17 04:41:22 +08:00
25 lines
603 B
C++
25 lines
603 B
C++
#include "glog/logging.h"
|
|
#include "glog/raw_logging.h"
|
|
|
|
#include "gflags/gflags.h"
|
|
#include "gtest/gtest.h"
|
|
|
|
TEST(GLog, Test) {
|
|
VLOG(1) << "VLOG(1)";
|
|
VLOG(2) << "VLOG(2)";
|
|
LOG(INFO) << "INFO";
|
|
LOG(WARNING) << "WARNING";
|
|
LOG(ERROR) << "ERROR";
|
|
RAW_LOG(ERROR, "RAW_LOG(ERROR)");
|
|
RAW_LOG(INFO, "sssssssss %d", 256);
|
|
}
|
|
|
|
TEST(GLogDeathTest, Fatal) { ASSERT_DEATH((LOG(FATAL) << "sssssssss"), ""); }
|
|
|
|
int main(int argc, char** argv) {
|
|
testing::InitGoogleTest(&argc, argv);
|
|
google::ParseCommandLineFlags(&argc, &argv, true);
|
|
google::InitGoogleLogging(argv[0]);
|
|
return RUN_ALL_TESTS();
|
|
}
|