File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,27 @@ TEST(RawLoggingCompilationTest, PassingCheck) {
43
43
ABSL_RAW_CHECK (true , " RAW CHECK" );
44
44
}
45
45
46
+ TEST (RawLoggingCompilationTest, DebugLog) {
47
+ ABSL_RAW_DLOG (INFO, " RAW DLOG: %d" , 1 );
48
+ }
49
+
50
+ TEST (RawLoggingCompilationTest, PassingDebugCheck) {
51
+ ABSL_RAW_DCHECK (true , " failure message" );
52
+ }
53
+
46
54
// Not all platforms support output from raw log, so we don't verify any
47
55
// particular output for RAW check failures (expecting the empty string
48
56
// accomplishes this). This test is primarily a compilation test, but we
49
57
// are verifying process death when EXPECT_DEATH works for a platform.
50
58
const char kExpectedDeathOutput [] = " " ;
51
59
60
+ #if !defined(NDEBUG) // if debug build
61
+ TEST (RawLoggingDeathTest, FailingDebugCheck) {
62
+ EXPECT_DEATH_IF_SUPPORTED (ABSL_RAW_DCHECK (1 == 0 , " explanation" ),
63
+ kExpectedDeathOutput );
64
+ }
65
+ #endif // if debug build
66
+
52
67
TEST (RawLoggingDeathTest, FailingCheck) {
53
68
EXPECT_DEATH_IF_SUPPORTED (ABSL_RAW_CHECK (1 == 0 , " explanation" ),
54
69
kExpectedDeathOutput );
You can’t perform that action at this time.
0 commit comments