1 // Copyright 2007 Google Inc. All Rights Reserved.
2 // Author: Sergey Ioffe
4 // The common part of the striplog tests.
9 #include "glog/logging.h"
10 #include "base/commandlineflags.h"
13 DECLARE_bool(logtostderr);
16 using namespace GOOGLE_NAMESPACE;
18 int CheckNoReturn(bool b) {
21 LOG(FATAL) << "Fatal";
28 std::ostream &operator<<(std::ostream &str, const A&) {return str;}
30 int main(int argc, char* argv[]) {
31 FLAGS_logtostderr = true;
32 InitGoogleLogging(argv[0]);
33 LOG(INFO) << "TESTMESSAGE INFO";
34 LOG(WARNING) << 2 << "something" << "TESTMESSAGE WARNING"
35 << 1 << 'c' << A() << std::endl;
36 LOG(ERROR) << "TESTMESSAGE ERROR";
38 (flag ? LOG(INFO) : LOG(ERROR)) << "TESTMESSAGE COND";
39 LOG(FATAL) << "TESTMESSAGE FATAL";