< prev index next >

test/native/logging/test_log.cpp

Print this page
rev 12483 : 8172098: A lot of gtests uses TEST instead of TEST_VM
Reviewed-by: duke

@@ -39,18 +39,18 @@
   assert(ret > 0, "Failed to print prefix. Log buffer too small?");
   return (size_t) ret;
 }
 
 #ifdef ASSERT // 'test' tag is debug only
-TEST_F(LogTest, prefix) {
+TEST_VM_F(LogTest, prefix) {
   set_log_config(TestLogFileName, "logging+test=trace");
   log_trace(logging, test)(LOG_LINE_STR);
   EXPECT_TRUE(file_contains_substring(TestLogFileName, LOG_PREFIX_STR LOG_LINE_STR));
 }
 #endif
 
-TEST_F(LogTest, large_message) {
+TEST_VM_F(LogTest, large_message) {
   char big_msg[4096] = {0};
   char Xchar = '~';
 
   set_log_config(TestLogFileName, "logging=trace");
 

@@ -66,11 +66,11 @@
   size_t count = 0;
   for (size_t ps = 0 ; output[ps + count] != '\0'; output[ps + count] == Xchar ? count++ : ps++);
   EXPECT_EQ(sizeof(big_msg) - 1, count);
 }
 
-TEST_F(LogTest, enabled_logtarget) {
+TEST_VM_F(LogTest, enabled_logtarget) {
   set_log_config(TestLogFileName, "gc=debug");
 
   LogTarget(Debug, gc) log;
   EXPECT_TRUE(log.is_enabled());
 

@@ -78,11 +78,11 @@
   log.print(LOG_TEST_STRING_LITERAL);
 
   EXPECT_TRUE(file_contains_substring(TestLogFileName, LOG_TEST_STRING_LITERAL));
 }
 
-TEST_F(LogTest, disabled_logtarget) {
+TEST_VM_F(LogTest, disabled_logtarget) {
   set_log_config(TestLogFileName, "gc=info");
 
   LogTarget(Debug, gc) log;
   EXPECT_FALSE(log.is_enabled());
 

@@ -93,11 +93,11 @@
   log_info(gc)("Dummy line");
 
   EXPECT_FALSE(file_contains_substring(TestLogFileName, LOG_TEST_STRING_LITERAL));
 }
 
-TEST_F(LogTest, enabled_loghandle) {
+TEST_VM_F(LogTest, enabled_loghandle) {
   set_log_config(TestLogFileName, "gc=debug");
 
   Log(gc) log;
   LogHandle log_handle(log);
 

@@ -107,11 +107,11 @@
   log_handle.debug("%d workers", 3);
 
   EXPECT_TRUE(file_contains_substring(TestLogFileName, "3 workers"));
 }
 
-TEST_F(LogTest, disabled_loghandle) {
+TEST_VM_F(LogTest, disabled_loghandle) {
   set_log_config(TestLogFileName, "gc=info");
 
   Log(gc) log;
   LogHandle log_handle(log);
 

@@ -124,11 +124,11 @@
   log_info(gc)("Dummy line");
 
   EXPECT_FALSE(file_contains_substring(TestLogFileName, "3 workers"));
 }
 
-TEST_F(LogTest, enabled_logtargethandle) {
+TEST_VM_F(LogTest, enabled_logtargethandle) {
   set_log_config(TestLogFileName, "gc=debug");
 
   LogTarget(Debug, gc) log;
   LogTargetHandle log_handle(log);
 

@@ -138,11 +138,11 @@
   log_handle.print("%d workers", 3);
 
   EXPECT_TRUE(file_contains_substring(TestLogFileName, "3 workers"));
 }
 
-TEST_F(LogTest, disabled_logtargethandle) {
+TEST_VM_F(LogTest, disabled_logtargethandle) {
   set_log_config(TestLogFileName, "gc=info");
 
   LogTarget(Debug, gc) log;
   LogTargetHandle log_handle(log);
 
< prev index next >