File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ class LogWithNewline {
3838 raw_ostream &os)
3939 : os(os) {
4040 if (debug_type)
41- os << debug_type << " " ;
42- os << " [ " << file << " :" << line << " ] " ;
41+ os << " [ " << debug_type << " ] " ;
42+ os << file << " :" << line << " " ;
4343 }
4444 ~LogWithNewline () { os << ' \n ' ; }
4545 template <typename T> raw_ostream &operator <<(const T &t) && {
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ TEST(DebugLogTest, Basic) {
2727 std::string str;
2828 raw_string_ostream os (str);
2929 DEBUGLOG_WITH_STREAM_AND_TYPE (os, nullptr ) << " NoType" ;
30- EXPECT_TRUE (StringRef (os.str ()).starts_with (' [' ));
30+ EXPECT_FALSE (StringRef (os.str ()).starts_with (' [' ));
3131 EXPECT_TRUE (StringRef (os.str ()).ends_with (" NoType\n " ));
3232 }
3333
@@ -37,6 +37,7 @@ TEST(DebugLogTest, Basic) {
3737 raw_string_ostream os (str);
3838 DEBUGLOG_WITH_STREAM_AND_TYPE (os, " A" ) << " A" ;
3939 DEBUGLOG_WITH_STREAM_AND_TYPE (os, " B" ) << " B" ;
40+ EXPECT_TRUE (StringRef (os.str ()).starts_with (' [' ));
4041 EXPECT_THAT (os.str (), AllOf (HasSubstr (" A\n " ), HasSubstr (" B\n " )));
4142 }
4243
You can’t perform that action at this time.
0 commit comments