diff --git a/deps/v8/test/cctest/test-log.cc b/deps/v8/test/cctest/test-log.cc index d72e6f0e1e08..680021508118 100644 --- a/deps/v8/test/cctest/test-log.cc +++ b/deps/v8/test/cctest/test-log.cc @@ -42,6 +42,7 @@ #include "src/natives.h" #include "src/utils.h" #include "src/v8threads.h" +#include "src/version.h" #include "src/vm-state-inl.h" #include "test/cctest/cctest.h" @@ -493,3 +494,17 @@ TEST(EquivalenceOfLoggingAndTraversal) { CHECK(false); } } + +TEST(LogVersion) { + ScopedLoggerInitializer initialize_logger; + bool exists = false; + i::Vector log( + i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true)); + CHECK(exists); + i::EmbeddedVector ref_data; + i::SNPrintF(ref_data, "v8-version,%d,%d,%d,%d,%d", i::Version::GetMajor(), + i::Version::GetMinor(), i::Version::GetBuild(), + i::Version::GetPatch(), i::Version::IsCandidate()); + CHECK_NE(NULL, StrNStr(log.start(), ref_data.start(), log.length())); + log.Dispose(); +}