Index: test/cctest/test-log.cc |
diff --git a/test/cctest/test-log.cc b/test/cctest/test-log.cc |
index 0370cbec45196ed67ea1cd790366f40bd996e943..6a7e54f1d11af69765201f6d62a48881dc9b2291 100644 |
--- a/test/cctest/test-log.cc |
+++ b/test/cctest/test-log.cc |
@@ -23,6 +23,7 @@ static void TearDown() { |
Logger::TearDown(); |
} |
+ |
TEST(EmptyLog) { |
SetUp(); |
CHECK_EQ(0, Logger::GetLogLines(0, NULL, 0)); |
@@ -99,4 +100,18 @@ TEST(BeyondWritePosition) { |
TearDown(); |
} |
+ |
+TEST(MemoryLoggingTurnedOff) { |
+ // Log to stdout |
+ v8::internal::FLAG_logfile = "-"; |
+ v8::internal::FLAG_log = true; |
+ Logger::Setup(); |
+ CHECK_EQ(0, Logger::GetLogLines(0, NULL, 0)); |
+ CHECK_EQ(0, Logger::GetLogLines(100, NULL, 0)); |
+ CHECK_EQ(0, Logger::GetLogLines(0, NULL, 100)); |
+ CHECK_EQ(0, Logger::GetLogLines(100, NULL, 100)); |
+ Logger::TearDown(); |
+} |
+ |
+ |
#endif // ENABLE_LOGGING_AND_PROFILING |